From 8a772986ae1f2b99578f28f4b674c19e2ea4baa2 Mon Sep 17 00:00:00 2001
From: Markus Frank <markus.frank@cern.ch>
Date: Thu, 11 Dec 2014 19:53:20 +0000
Subject: [PATCH] Improve the doxygen documentation

---
 DDAlign/include/DDAlign/AlignmentOperators.h   | 15 ++++++++-------
 DDAlign/include/DDAlign/AlignmentTransaction.h |  3 ++-
 DDCond/include/DDCond/ConditionsTransaction.h  |  4 +++-
 DDG4/plugins/Geant4EventReaderHepEvt.cpp       |  6 +++++-
 DDG4/plugins/Geant4EventReaderHepMC.cpp        |  2 ++
 DDG4/plugins/Geant4FieldSetup.cpp              |  2 ++
 DDG4/plugins/Geant4SDActions.cpp               |  4 ++++
 7 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/DDAlign/include/DDAlign/AlignmentOperators.h b/DDAlign/include/DDAlign/AlignmentOperators.h
index 4986d0640..b37a9fb3c 100644
--- a/DDAlign/include/DDAlign/AlignmentOperators.h
+++ b/DDAlign/include/DDAlign/AlignmentOperators.h
@@ -29,7 +29,8 @@ namespace DD4hep {
      *  \version  1.0
      *  \ingroup  DD4HEP_ALIGN
      */
-    struct AlignmentOperator  {
+    class AlignmentOperator  {
+    public:
       typedef AlignmentStack::StackEntry Entry;
       typedef AlignmentCache::Cache      Cache;
       typedef std::vector<Entry*>        Entries;
@@ -49,7 +50,7 @@ namespace DD4hep {
      *  \version  1.0
      *  \ingroup  DD4HEP_ALIGN
      */
-    struct AlignmentSelector : public AlignmentOperator {
+    class AlignmentSelector : public AlignmentOperator {
     public: 
       const Entries& entries;
       /// Initializing functor constructor
@@ -68,7 +69,7 @@ namespace DD4hep {
      *  \version  1.0
      *  \ingroup  DD4HEP_ALIGN
      */
-    template <typename T> struct AlignmentActor : public AlignmentOperator {
+    template <typename T> class AlignmentActor : public AlignmentOperator {
     public: 
       /// Initializing functor constructor
       AlignmentActor(AlignmentCache& c, Nodes& n) : AlignmentOperator(c,n) { init(); }
@@ -79,10 +80,10 @@ namespace DD4hep {
 
     /// Helper namespace to specialize functionality  \ingroup  DD4HEP_ALIGN
     namespace DDAlign_standard_operations  {
-      struct node_print;
-      struct node_reset;
-      struct node_align;
-      struct node_delete;
+      class node_print;
+      class node_reset;
+      class node_align;
+      class node_delete;
     }
 
     // Specializations
diff --git a/DDAlign/include/DDAlign/AlignmentTransaction.h b/DDAlign/include/DDAlign/AlignmentTransaction.h
index a08a2e58e..f77c07bbb 100644
--- a/DDAlign/include/DDAlign/AlignmentTransaction.h
+++ b/DDAlign/include/DDAlign/AlignmentTransaction.h
@@ -30,7 +30,8 @@ namespace DD4hep {
      *  \version  1.0
      *  \ingroup  DD4HEP_ALIGN
      */
-    struct AlignmentTransaction {
+    class AlignmentTransaction {
+    public:
       /// Internal flag to remember transaction contexts
       bool flag;
       /// Reference to the current LCDD instance
diff --git a/DDCond/include/DDCond/ConditionsTransaction.h b/DDCond/include/DDCond/ConditionsTransaction.h
index 60439455f..2498c481f 100644
--- a/DDCond/include/DDCond/ConditionsTransaction.h
+++ b/DDCond/include/DDCond/ConditionsTransaction.h
@@ -31,7 +31,9 @@ namespace DD4hep {
      *  \version  1.0
      *  \ingroup  DD4HEP_CONDITIONS
      */
-    struct ConditionsTransaction {
+    class ConditionsTransaction {
+    public:
+
       /// Internal flag to remember transaction contexts
       bool flag;
       /// Reference to the current LCDD instance
diff --git a/DDG4/plugins/Geant4EventReaderHepEvt.cpp b/DDG4/plugins/Geant4EventReaderHepEvt.cpp
index cb87b858d..0a7e288b3 100644
--- a/DDG4/plugins/Geant4EventReaderHepEvt.cpp
+++ b/DDG4/plugins/Geant4EventReaderHepEvt.cpp
@@ -52,11 +52,13 @@ namespace DD4hep {
 //====================================================================
 // #include "DDG4/Geant4EventReaderHepEvt"
 
+// Framework include files
 #include "DDG4/Factories.h"
 #include "DD4hep/Printout.h"
 #include "CLHEP/Units/SystemOfUnits.h"
 #include "CLHEP/Units/PhysicalConstants.h"
 
+// C/C++ include files
 #include <cerrno>
 
 using namespace std;
@@ -65,7 +67,9 @@ using namespace DD4hep::Simulation;
 typedef DD4hep::ReferenceBitMask<int> PropertyMask;
 
 #define HEPEvtShort 1
-#define HEPEvtLong 2
+#define HEPEvtLong  2
+
+// Local declarations in anaonymous namespace
 namespace {
   class Geant4EventReaderHepEvtShort : public Geant4EventReaderHepEvt  {
   public:
diff --git a/DDG4/plugins/Geant4EventReaderHepMC.cpp b/DDG4/plugins/Geant4EventReaderHepMC.cpp
index 815f54e44..7bef3d981 100644
--- a/DDG4/plugins/Geant4EventReaderHepMC.cpp
+++ b/DDG4/plugins/Geant4EventReaderHepMC.cpp
@@ -56,12 +56,14 @@ namespace DD4hep {
 //====================================================================
 // #include "DDG4/Geant4EventReaderHepMC"
 
+// Framework include files
 #include "DDG4/Factories.h"
 #include "DD4hep/Printout.h"
 #include "DDG4/Geant4Primary.h"
 #include "CLHEP/Units/SystemOfUnits.h"
 #include "CLHEP/Units/PhysicalConstants.h"
 
+// C/C++ include files
 #include <cerrno>
 #include <algorithm>
 
diff --git a/DDG4/plugins/Geant4FieldSetup.cpp b/DDG4/plugins/Geant4FieldSetup.cpp
index de646a24a..749e37207 100644
--- a/DDG4/plugins/Geant4FieldSetup.cpp
+++ b/DDG4/plugins/Geant4FieldSetup.cpp
@@ -24,7 +24,9 @@ using namespace DD4hep;
 using namespace DD4hep::Simulation;
 typedef DD4hep::Geometry::LCDD lcdd_t;
 
+/// Local declaration in anonymous namespace
 namespace {
+
   struct Geant4FieldSetup;
   struct Geant4SetupPropertyMap {
     const map<string,string>& vals;
diff --git a/DDG4/plugins/Geant4SDActions.cpp b/DDG4/plugins/Geant4SDActions.cpp
index 16434403c..6fdc1b946 100644
--- a/DDG4/plugins/Geant4SDActions.cpp
+++ b/DDG4/plugins/Geant4SDActions.cpp
@@ -22,7 +22,10 @@ using namespace std;
 #include "G4VProcess.hh"
 
 
+/// Namespace for the AIDA detector description toolkit
 namespace DD4hep {
+
+  /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit
   namespace Simulation   {
 
     typedef Geant4HitData::Contribution HitContribution;
@@ -229,6 +232,7 @@ namespace DD4hep {
 	cell = 0;
       }
 
+      /// Helper function to decide if the hit has to be extracted and saved in the collection
       bool mustSaveTrack(const G4Track* tr)  const   {
 	return current > 0 && current != tr->GetTrackID();
       }
-- 
GitLab