From 00b90452f95f68aace80b8f037b6a1fbbaf2d480 Mon Sep 17 00:00:00 2001
From: Markus Frank <markus.frank@cern.ch>
Date: Fri, 4 Dec 2015 20:12:21 +0000
Subject: [PATCH] Add code documentation

---
 DDEve/DDEve/DDEve.C        |  3 +++
 DDEve/DDEve/DDG4IO.C       |  4 ++++
 DDG4/examples/TEve.C       |  2 ++
 DDG4/examples/initAClick.C | 20 ++++++++++++++++++++
 DDG4/examples/run.C        | 19 +++++++++++++++++++
 5 files changed, 48 insertions(+)

diff --git a/DDEve/DDEve/DDEve.C b/DDEve/DDEve/DDEve.C
index 9acec4cc1..2a30eb184 100644
--- a/DDEve/DDEve/DDEve.C
+++ b/DDEve/DDEve/DDEve.C
@@ -12,8 +12,11 @@
 //
 //==========================================================================
 
+// C/C++ include files
 #include <string>
 #include <cerrno>
+
+// ROOT include files
 #include "TError.h"
 #include "TSystem.h"
 
diff --git a/DDEve/DDEve/DDG4IO.C b/DDEve/DDEve/DDG4IO.C
index fbed3af2a..fb90825fc 100644
--- a/DDEve/DDEve/DDG4IO.C
+++ b/DDEve/DDEve/DDG4IO.C
@@ -25,7 +25,11 @@ namespace DD4hep { namespace Simulation {
     typedef Geant4HitData SimpleHit;
   }}
 #else
+
+// C/C++ include files
 #include <typeinfo>
+
+// ROOT include files
 #include "TROOT.h"
 #include "TClass.h"
 
diff --git a/DDG4/examples/TEve.C b/DDG4/examples/TEve.C
index db5615079..af45add8c 100644
--- a/DDG4/examples/TEve.C
+++ b/DDG4/examples/TEve.C
@@ -10,6 +10,8 @@
 //
 //====================================================================
 #include "DD4hep/LCDD.h"
+
+// ROOT include files
 #include "TGeoManager.h"
 #include "TEveGeoNode.h"
 #include "TGLViewer.h"
diff --git a/DDG4/examples/initAClick.C b/DDG4/examples/initAClick.C
index 80e4f30d8..78afdea0e 100644
--- a/DDG4/examples/initAClick.C
+++ b/DDG4/examples/initAClick.C
@@ -1,6 +1,23 @@
+// $Id: $
+//==========================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------------
+// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
+// All rights reserved.
+//
+// For the licensing terms see $DD4hepINSTALL/LICENSE.
+// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
+//
+// Author     : M.Frank
+//
+//==========================================================================
+
+// ROOT include files
 #include "TInterpreter.h"
 #include "TSystem.h"
 #include "RVersion.h"
+
+// C/C++ include files
 #include <iostream>
 #include <string>
 
@@ -14,6 +31,7 @@ string make_str(const char* data)  {
   return string(data);
 }
 
+/// Process a single command in the ROOT interpreter
 int processCommand(const char* command, bool end_process)   {
   int status;
   // Disabling auto-parse is a hack required by a bug in ROOT
@@ -27,6 +45,7 @@ int processCommand(const char* command, bool end_process)   {
   return status;
 }
 
+/// Process a ROOT AClick given a file
 int processMacro(const char* macro, bool end_process)   {
   int status;
   string cmd = ".X ";
@@ -35,6 +54,7 @@ int processMacro(const char* macro, bool end_process)   {
   return processCommand(cmd.c_str(), end_process);
 }
 
+/// Initialize the ROOT environment to compile and execute a ROOT AClick
 int initAClick(const char* command=0)  {
   string rootsys = make_str(gSystem->Getenv("ROOTSYS"));
   string g4_base = make_str(gSystem->Getenv("G4INSTALL"));
diff --git a/DDG4/examples/run.C b/DDG4/examples/run.C
index 763b4ac86..0e1fc31c6 100644
--- a/DDG4/examples/run.C
+++ b/DDG4/examples/run.C
@@ -1,5 +1,24 @@
+// $Id: $
+//==========================================================================
+//  AIDA Detector description implementation for LCD
+//--------------------------------------------------------------------------
+// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
+// All rights reserved.
+//
+// For the licensing terms see $DD4hepINSTALL/LICENSE.
+// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
+//
+// Author     : M.Frank
+//
+//==========================================================================
+
+// ROOT include files
 #include "TInterpreter.h"
+
+// C/C++ include files
 #include <string>
+
+// Run a ROOT macro
 void run(const char* macro)  {
   char cmd[1024];
   const char* dd4hep_install = getenv("DD4hepINSTALL");
-- 
GitLab