From 89bfc0a356577ee8fcc8168bafb621baa1262cea Mon Sep 17 00:00:00 2001
From: "Stephen A. Wood" <saw@jlab.org>
Date: Tue, 3 May 2016 09:58:53 -0400
Subject: [PATCH] Add some doxygen directives to several detectors and
 THcParmList

---
 src/THcAerogel.cxx           | 19 ++++++++--------
 src/THcDC.cxx                | 42 ++++++++++++++++--------------------
 src/THcDriftChamber.cxx      | 20 ++++++++---------
 src/THcDriftChamberPlane.cxx | 11 +++++-----
 src/THcHodoscope.cxx         | 28 ++++++++++++------------
 src/THcParmList.cxx          | 38 +++++++++++++++++---------------
 src/THcScintillatorPlane.cxx | 12 +++++------
 7 files changed, 83 insertions(+), 87 deletions(-)

diff --git a/src/THcAerogel.cxx b/src/THcAerogel.cxx
index 6106355..3828feb 100644
--- a/src/THcAerogel.cxx
+++ b/src/THcAerogel.cxx
@@ -1,13 +1,12 @@
-///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-// THcAerogel                                                                //
-//                                                                           //
-// Class for an Aerogel detector consisting of pairs of PMT's                //
-// attached to a diffuser box                                                //
-// Will have a fixed number of pairs, but need to later make this            //
-// configurable.                                                             //T
-//                                                                           //
-///////////////////////////////////////////////////////////////////////////////
+/** \class ThcAerogel
+    \ingroup Detectors
+
+Class for an Aerogel detector consisting of pairs of PMT's
+attached to a diffuser box
+Will have a fixed number of pairs, but need to later make this
+configurable.
+
+*/
 
 #include "THcAerogel.h"
 #include "TClonesArray.h"
diff --git a/src/THcDC.cxx b/src/THcDC.cxx
index 7c1216d..6a481fe 100644
--- a/src/THcDC.cxx
+++ b/src/THcDC.cxx
@@ -1,13 +1,13 @@
-///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-// THcDC                                                              //
-//                                                                           //
-// Class for a generic hodoscope consisting of multiple                      //
-// planes with multiple paddles with phototubes on both ends.                //
-// This differs from Hall A scintillator class in that it is the whole       //
-// hodoscope array, not just one plane.                                      //
-//                                                                           //
-///////////////////////////////////////////////////////////////////////////////
+/** \class THcDC
+    \ingroup Detectors
+This class analyzes a package of horizontal drift chambers.  It uses the
+first letter of the apparatus name as a prefix to parameter names.  The
+paramters, read in the Setup method, determine the number of chambers and
+the number of parameters per plane.
+
+\author S. A. Wood, based on Fortran ENGINE
+
+*/
 
 #include "THcDC.h"
 #include "THaEvData.h"
@@ -81,7 +81,7 @@ THcDC::THcDC(
 //_____________________________________________________________________________
 void THcDC::Setup(const char* name, const char* description)
 {
-
+  // Create the chamber and plane objects using parameters.
   static const char* const here = "Setup";
 
   THaApparatus *app = GetApparatus();
@@ -173,6 +173,8 @@ THcDC::THcDC( ) :
 //_____________________________________________________________________________
 THaAnalysisObject::EStatus THcDC::Init( const TDatime& date )
 {
+  // Register the plane objects with the appropriate chambers.
+  // Trigger ReadDatabase to load the remaining parameters
   Setup(GetName(), GetTitle());	// Create the subdetectors here
   EffInit();
 
@@ -237,23 +239,13 @@ THaAnalysisObject::EStatus THcDC::Init( const TDatime& date )
 //_____________________________________________________________________________
 Int_t THcDC::ReadDatabase( const TDatime& date )
 {
-  // Read this detector's parameters from the database file 'fi'.
+  // Read this detector's parameters from the ThcParmList
   // This function is called by THaDetectorBase::Init() once at the
   // beginning of the analysis.
   // 'date' contains the date/time of the run being analyzed.
 
   //  static const char* const here = "ReadDatabase()";
 
-  // Read data from database 
-  // Pull values from the THcParmList instead of reading a database
-  // file like Hall A does.
-
-  // We will probably want to add some kind of method to gHcParms to allow
-  // bulk retrieval of parameters of interest.
-
-  // Will need to determine which spectrometer in order to construct
-  // the parameter names (e.g. hscin_1x_nr vs. sscin_1x_nr)
-
   delete [] fXCenter;  fXCenter = new Double_t [fNChambers];
   delete [] fYCenter;  fYCenter = new Double_t [fNChambers];
   delete [] fMinHits;  fMinHits = new Int_t [fNChambers];
@@ -338,7 +330,7 @@ Int_t THcDC::ReadDatabase( const TDatime& date )
 //_____________________________________________________________________________
 Int_t THcDC::DefineVariables( EMode mode )
 {
-  // Initialize global variables and lookup table for decoder
+  // Initialize global variables for histograms and Root tree
 
   if( mode == kDefine && fIsSetup ) return kOK;
   fIsSetup = ( mode == kDefine );
@@ -442,7 +434,9 @@ void THcDC::ClearEvent()
 //_____________________________________________________________________________
 Int_t THcDC::Decode( const THaEvData& evdata )
 {
-
+  // Decode event into hit list.
+  // Pass hit list to the planes.
+  // Load hits from planes into chamber objects
   ClearEvent();
   Int_t num_event = evdata.GetEvNum();
   if (fdebugprintrawdc ||fdebugprintdecodeddc || fdebuglinkstubs || fdebugtrackprint) cout << " event num = " << num_event << endl;
diff --git a/src/THcDriftChamber.cxx b/src/THcDriftChamber.cxx
index 95906b6..7d90148 100644
--- a/src/THcDriftChamber.cxx
+++ b/src/THcDriftChamber.cxx
@@ -1,13 +1,13 @@
-///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-// THcDriftChamber                                                           //
-//                                                                           //
-// Subdetector class to hold a bunch of planes constituting a chamber        //
-// This class will be created by the THcDC class which will also create      //
-// the plane objects.                                                        //
-// The THcDC class will then pass this class a list of the planes.           //
-//                                                                           //
-///////////////////////////////////////////////////////////////////////////////
+/** \class ThcDriftChamber
+    \ingroup Detectors
+
+Subdetector class to hold a bunch of planes constituting a chamber
+This class will be created by the THcDC class which will also create
+the plane objects.
+
+The THcDC class will then pass this class a list of the planes.
+
+*/
 
 #include "THcDriftChamber.h"
 #include "THcDC.h"
diff --git a/src/THcDriftChamberPlane.cxx b/src/THcDriftChamberPlane.cxx
index b83cae3..2e73b1c 100644
--- a/src/THcDriftChamberPlane.cxx
+++ b/src/THcDriftChamberPlane.cxx
@@ -1,10 +1,9 @@
-//*-- Author :
+/** \class ThcDriftChamberPlane
+    \ingroup Detectors
 
-//////////////////////////////////////////////////////////////////////////
-//
-// THcDriftChamberPlane
-//
-//////////////////////////////////////////////////////////////////////////
+Class for a a single Hall C horizontal drift chamber plane
+
+*/
 
 #include "THcDC.h"
 #include "THcDriftChamberPlane.h"
diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx
index 7beeb16..07bbe97 100644
--- a/src/THcHodoscope.cxx
+++ b/src/THcHodoscope.cxx
@@ -1,17 +1,17 @@
-///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-// THcHodoscope                                                              //
-//                                                                           //
-// Class for a generic hodoscope consisting of multiple                      //
-// planes with multiple paddles with phototubes on both ends.                //
-// This differs from Hall A scintillator class in that it is the whole       //
-// hodoscope array, not just one plane.                                      //
-//                                                                           //
-// Date July 8 2014:                                                         //
-// Zafr Ahmed                                                                //
-// Beta and chis square are calculated for each of the hodoscope track.      //
-// Two new variables are added. fBeta and fBetaChisq                         //
-//                                                                           //
+/** \class THcHodoscope
+    \ingroup Detectors
+
+Class for a generic hodoscope consisting of multiple
+planes with multiple paddles with phototubes on both ends.
+This differs from Hall A scintillator class in that it is the whole
+hodoscope array, not just one plane.
+
+*/
+// Date July 8 2014:
+// Zafr Ahmed
+// Beta and chis square are calculated for each of the hodoscope track.
+// Two new variables are added. fBeta and fBetaChisq
+//
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "THcSignalHit.h"
diff --git a/src/THcParmList.cxx b/src/THcParmList.cxx
index 23ff5be..ddf9e65 100644
--- a/src/THcParmList.cxx
+++ b/src/THcParmList.cxx
@@ -1,10 +1,10 @@
-//*-- Author : Stephen A. Wood 10.02.2012
+/** \class THcParmList
+    \ingroup Core
 
-// THcParmList
-//
-// A THaVarList that holds parameters read from
-// the legacy ENGINE parameter file format
-//
+A class that can read and hold the parmaters from the CTP formatted
+parameter files used by the Fortran ENGINE.
+
+*/
 
 #define INCLUDESTR "#include"
 
@@ -42,17 +42,21 @@ inline static bool IsComment( const string& s, string::size_type pos )
 
 void THcParmList::Load( const char* fname, Int_t RunNumber )
 {
-  // Read a CTP style parameter file.
-  //
-  // Parameter values and arrays of values are cached in a THaVarList
-  // and are available for use elsewhere in the analyzer.
-  // Text strings are saved in a THaTextvars list.
-  // Parameter files can contain "include" statements of the form
-  //   #include "filename"
-  //
-  // If a run number is given, ignore input until a line with a matching
-  // run number or run number range is found.  All parameters following
-  // the are read until a non matching run number or range is encountered.
+  /**
+Read a CTP style parameter file.
+
+Parameter values and arrays of values are cached in a THaVarList
+and are available for use elsewhere in the analyzer.
+Text strings are saved in a THaTextvars list.
+Parameter files can contain "include" statements of the form
+~~~
+   #include "filename"
+~~~
+
+If a run number is given, ignore input until a line with a matching
+run number or run number range is found.  All parameters following
+the are read until a non matching run number or range is encountered.
+  */
 
   static const char* const whtspc = " \t";
 
diff --git a/src/THcScintillatorPlane.cxx b/src/THcScintillatorPlane.cxx
index 5a6ada3..31b3acd 100644
--- a/src/THcScintillatorPlane.cxx
+++ b/src/THcScintillatorPlane.cxx
@@ -1,10 +1,10 @@
-//*-- Author :
+/** \class THcScintillatorPlane
+    \ingroup Detectors
 
-//////////////////////////////////////////////////////////////////////////
-//
-// THcScintillatorPlane
-//
-//////////////////////////////////////////////////////////////////////////
+This class implements a single plane of scintillators.  The THaHodoscope
+class instatiates one object per plane.
+
+*/
 #include "TMath.h"
 #include "THcScintillatorPlane.h"
 #include "TClonesArray.h"
-- 
GitLab