Skip to content
Snippets Groups Projects
Commit c7639713 authored by Stephen A. Wood's avatar Stephen A. Wood
Browse files

Edit some comments to help with THtml generated documentation.

parent a95c0dc2
No related branches found
No related tags found
No related merge requests found
Showing with 87 additions and 32 deletions
...@@ -12,7 +12,7 @@ class THcAerogelHit : public THcHodoscopeHit { ...@@ -12,7 +12,7 @@ class THcAerogelHit : public THcHodoscopeHit {
private: private:
ClassDef(THcAerogelHit,0); // Aerogel hit class ClassDef(THcAerogelHit,0); // Raw Aerogel hit
}; };
#endif #endif
......
...@@ -61,8 +61,10 @@ THcAnalyzer::~THcAnalyzer() ...@@ -61,8 +61,10 @@ THcAnalyzer::~THcAnalyzer()
//_____________________________________________________________________________ //_____________________________________________________________________________
void THcAnalyzer::PrintReport(const char* templatefile, const char* ofile) void THcAnalyzer::PrintReport(const char* templatefile, const char* ofile)
{ {
// Copy template to ofile, replacing {stuff} with the evaluated // Generate "reports" such as end of run scaler/efficiency sheets
// value of stuff. // Reads a template file, copying that file to the output, replacing
// variables and expressions inside of braces ({}) with evaluated values.
// Similar but not identical to ENGINE/CTP report templates.
ifstream ifile; ifstream ifile;
ifile.open(templatefile); ifile.open(templatefile);
...@@ -139,9 +141,12 @@ void THcAnalyzer::PrintReport(const char* templatefile, const char* ofile) ...@@ -139,9 +141,12 @@ void THcAnalyzer::PrintReport(const char* templatefile, const char* ofile)
//_____________________________________________________________________________ //_____________________________________________________________________________
void THcAnalyzer::LoadInfo() void THcAnalyzer::LoadInfo()
{ {
// Copy some run information into gHcParms variables so that in can // Create several THcParms variables in gHcParms containing
// be used in reports. // run information such as
// For example run number, first event analyzed, number of events, etc. // run number, first event analyzed, number of events, etc.
// gen_run_number - Current run
// gen_run_starting_event - Id of first event analyzed
// gen_event_id_number - Id of last event analyzed
Int_t* runnum; Int_t* runnum;
Int_t* firstevent; Int_t* firstevent;
Int_t* lastevent; Int_t* lastevent;
......
...@@ -12,7 +12,7 @@ class THcCherenkovHit : public THcHodoscopeHit { ...@@ -12,7 +12,7 @@ class THcCherenkovHit : public THcHodoscopeHit {
private: private:
ClassDef(THcCherenkovHit,0); // Cherenkov hit class ClassDef(THcCherenkovHit,0); // Raw Cherenkov hit
}; };
#endif #endif
......
...@@ -173,7 +173,7 @@ protected: ...@@ -173,7 +173,7 @@ protected:
void Setup(const char* name, const char* description); void Setup(const char* name, const char* description);
void PrintSpacePoints(); void PrintSpacePoints();
ClassDef(THcDC,0) // Drift Chamber class ClassDef(THcDC,0) // Set of Drift Chambers detector
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
...@@ -78,7 +78,7 @@ private: ...@@ -78,7 +78,7 @@ private:
THcDCHit( const THcDCHit& ); THcDCHit( const THcDCHit& );
THcDCHit& operator=( const THcDCHit& ); THcDCHit& operator=( const THcDCHit& );
ClassDef(THcDCHit,2) // VDCHit class ClassDef(THcDCHit,2) // Drift Chamber Hit
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
...@@ -29,7 +29,7 @@ protected: ...@@ -29,7 +29,7 @@ protected:
Int_t fNumBins; Int_t fNumBins;
Double_t* fTable; Double_t* fTable;
ClassDef(THcDCLookupTTDConv,0) // VDC Analytic TTD Conv class ClassDef(THcDCLookupTTDConv,0) // Time to Distance conversion lookup
}; };
......
...@@ -24,7 +24,7 @@ private: ...@@ -24,7 +24,7 @@ private:
THcDCTimeToDistConv( const THcDCTimeToDistConv& ); THcDCTimeToDistConv( const THcDCTimeToDistConv& );
THcDCTimeToDistConv& operator=( const THcDCTimeToDistConv& ); THcDCTimeToDistConv& operator=( const THcDCTimeToDistConv& );
ClassDef(THcDCTimeToDistConv,0) // DCTimeToDistConv class ClassDef(THcDCTimeToDistConv,0) // Time to Distance conversion base class
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
...@@ -85,6 +85,6 @@ private: ...@@ -85,6 +85,6 @@ private:
THcDCTrack( const THcDCTrack& ); THcDCTrack( const THcDCTrack& );
THcDCTrack& operator=( const THcDCTrack& ); THcDCTrack& operator=( const THcDCTrack& );
ClassDef(THcDCTrack,0) // DCTrack class ClassDef(THcDCTrack,0) // Full Drift Chamber track
}; };
#endif #endif
...@@ -43,7 +43,7 @@ private: ...@@ -43,7 +43,7 @@ private:
THcDCWire( const THcDCWire& ); THcDCWire( const THcDCWire& );
THcDCWire& operator=( const THcDCWire& ); THcDCWire& operator=( const THcDCWire& );
ClassDef(THcDCWire,0) // VDCWire class ClassDef(THcDCWire,0) // Drift Chamber Wire class
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
...@@ -4,12 +4,8 @@ ...@@ -4,12 +4,8 @@
// //
// THcDetectorMap // THcDetectorMap
// //
// Class to read and hold Hall C style detector map // Class to read and Hall C style detector map
// // FillMap method builds a map for a specific detector
// Will need method to retrieve all map entries for a given
// detector id.
//
// Not sure we will keep this class, but still need the parsing of the map file
// //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
...@@ -54,8 +50,11 @@ struct Functor ...@@ -54,8 +50,11 @@ struct Functor
}; };
//_____________________________________________________________________________ //_____________________________________________________________________________
Int_t THcDetectorMap::FillMap(THaDetMap *detmap, const char *detectorname) Int_t THcDetectorMap::FillMap(THaDetMap *detmap, const char *detectorname)
// Should probably return a status
{ {
// Build a DAQ hardware to detector element map for detector detectorname
// Reads through the entire list of mappings, adding one element to
// detmap for each electronics channel that maps to detectorname.
list<ModChanList>::iterator imod; list<ModChanList>::iterator imod;
list<ChaninMod>::iterator ichan; list<ChaninMod>::iterator ichan;
ChaninMod Achan; ChaninMod Achan;
...@@ -171,8 +170,35 @@ Int_t THcDetectorMap::FillMap(THaDetMap *detmap, const char *detectorname) ...@@ -171,8 +170,35 @@ Int_t THcDetectorMap::FillMap(THaDetMap *detmap, const char *detectorname)
return(0); return(0);
} }
//_____________________________________________________________________________
void THcDetectorMap::Load(const char *fname) void THcDetectorMap::Load(const char *fname)
{ {
// Load a Hall C ENGINE style detector map file. The map file maps
// a given roc, slot/module, and channel # into a given detector id#, plane
// number, counter number and signal type. The mapping between detector
// names and ids is found in the comments at the begging of the map file.
// This method looks for those comments, of the form:
// XXX_ID = n
// to establish that mapping between detector name and detector ID.
//
// Lines of the form
// DETECTOR = n
// ROC = n
// SLOT = n
// are used to establish the module (roc and slot) and the detector
// for the mapping lines that follow.
// The actual mappings are of the form
// subadd, plane, counter [, signal]
// Each of these lines, combined with the detector, roc, slot values
// establish the roc, slot, subadess -> detector, plane, counter#, sigtype map
// Other lines that may be in the map file are
// NSUBADD = n
// BSUB = n
// MASK = hex value
// These define characteristics of the electronics module (# channels,
// The bit number specifying the location of the subaddress in a data word
// and hex mask that the data word is anded with to retrieve data)
static const char* const whtspc = " \t"; static const char* const whtspc = " \t";
ifstream ifile; ifstream ifile;
......
...@@ -60,7 +60,7 @@ class THcDetectorMap : public TObject { ...@@ -60,7 +60,7 @@ class THcDetectorMap : public TObject {
protected: protected:
ClassDef(THcDetectorMap,0); ClassDef(THcDetectorMap,0); // Map electronics channels to Detector, Plane, Counter, Signal
}; };
#endif #endif
......
...@@ -134,7 +134,7 @@ protected: ...@@ -134,7 +134,7 @@ protected:
Double_t* stubcoef[4]; Double_t* stubcoef[4];
std::map<int,TMatrixD*> fAA3Inv; std::map<int,TMatrixD*> fAA3Inv;
ClassDef(THcDriftChamber,0) // Drift Chamber class ClassDef(THcDriftChamber,0) // A single drift chamber
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
...@@ -109,7 +109,7 @@ protected: ...@@ -109,7 +109,7 @@ protected:
THcHodoscope* fglHod; // Hodoscope to get start time THcHodoscope* fglHod; // Hodoscope to get start time
ClassDef(THcDriftChamberPlane,0) ClassDef(THcDriftChamberPlane,0); // A single plane within a THcDriftChamber
}; };
#endif #endif
......
...@@ -57,7 +57,7 @@ protected: ...@@ -57,7 +57,7 @@ protected:
// Flag for fProperties indicating that tracks are to be sorted by chi2 // Flag for fProperties indicating that tracks are to be sorted by chi2
static const UInt_t kSortTracks = BIT(16); static const UInt_t kSortTracks = BIT(16);
ClassDef(THcHallCSpectrometer,0) //A Hall A High Resolution Spectrometer ClassDef(THcHallCSpectrometer,0) //A Hall C Spectrometer
}; };
#endif #endif
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
// //
// THcHitList // THcHitList
// //
// Add hitlist to the Hall A detector base // Class to build a Hall C ENGINE style list of raw hits from the raw data.
// May not need to inherit from THaDetectorBase since we may end up // Detectors that use hit lists need to inherit from this class
// replacing most of the methods // as well as THaTrackingDetector or THaNonTrackingDetector
// //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
...@@ -30,7 +30,8 @@ THcHitList::~THcHitList() { ...@@ -30,7 +30,8 @@ THcHitList::~THcHitList() {
void THcHitList::InitHitList(THaDetMap* detmap, void THcHitList::InitHitList(THaDetMap* detmap,
const char *hitclass, Int_t maxhits) { const char *hitclass, Int_t maxhits) {
// Probably called by ReadDatabase // Save the electronics to detector mapping
// Initialize a hit array of hits of class hitclass
fRawHitList = new TClonesArray(hitclass, maxhits); fRawHitList = new TClonesArray(hitclass, maxhits);
fRawHitClass = fRawHitList->GetClass(); fRawHitClass = fRawHitList->GetClass();
...@@ -44,6 +45,14 @@ void THcHitList::InitHitList(THaDetMap* detmap, ...@@ -44,6 +45,14 @@ void THcHitList::InitHitList(THaDetMap* detmap,
} }
Int_t THcHitList::DecodeToHitList( const THaEvData& evdata ) { Int_t THcHitList::DecodeToHitList( const THaEvData& evdata ) {
// Clear the hit list
// Find all populated channels belonging to the detector and add
// the data to the hitlist. A given counter in the detector can have
// at most one entry in the hit list. However, the raw "hit" can contain
// multiple signal types (e.g. ADC+, ADC-, TDC+, TDC-), or multiple
// hits for multihit tdcs.
// The hit list is sorted (by plane, counter) after filling.
THcRawHit* rawhit; THcRawHit* rawhit;
// cout << " Clearing TClonesArray " << endl; // cout << " Clearing TClonesArray " << endl;
fRawHitList->Clear( ); fRawHitList->Clear( );
......
...@@ -41,6 +41,6 @@ public: ...@@ -41,6 +41,6 @@ public:
protected: protected:
ClassDef(THcHitList,0) ClassDef(THcHitList,0); // List of raw hits sorted by plane, counter
}; };
#endif #endif
...@@ -131,7 +131,7 @@ protected: ...@@ -131,7 +131,7 @@ protected:
void Setup(const char* name, const char* description); void Setup(const char* name, const char* description);
ClassDef(THcHodoscope,0) // Generic hodoscope class ClassDef(THcHodoscope,0) // Hodoscope detector
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
...@@ -32,7 +32,7 @@ class THcHodoscopeHit : public THcRawHit { ...@@ -32,7 +32,7 @@ class THcHodoscopeHit : public THcRawHit {
private: private:
ClassDef(THcHodoscopeHit, 0); // Hodoscope hit class ClassDef(THcHodoscopeHit, 0); // Raw Hodoscope hit
}; };
#endif #endif
...@@ -42,6 +42,17 @@ inline static bool IsComment( const string& s, string::size_type pos ) ...@@ -42,6 +42,17 @@ inline static bool IsComment( const string& s, string::size_type pos )
void THcParmList::Load( const char* fname, Int_t RunNumber ) 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.
static const char* const whtspc = " \t"; static const char* const whtspc = " \t";
...@@ -420,6 +431,8 @@ Int_t THcParmList::LoadParmValues(const DBRequest* list, const char* prefix) ...@@ -420,6 +431,8 @@ Int_t THcParmList::LoadParmValues(const DBRequest* list, const char* prefix)
// must be given, and the memory already allocated // must be given, and the memory already allocated
// NOTE: initial code taken wholesale from THaDBFile. // NOTE: initial code taken wholesale from THaDBFile.
// GN 2012 // GN 2012
// If prefix is specified, prepend each requested parameter name with
// the prefix.
const DBRequest *ti = list; const DBRequest *ti = list;
Int_t cnt=0; Int_t cnt=0;
...@@ -561,6 +574,8 @@ Int_t THcParmList::ReadArray(const char* attrC, T* array, Int_t size) ...@@ -561,6 +574,8 @@ Int_t THcParmList::ReadArray(const char* attrC, T* array, Int_t size)
//_____________________________________________________________________________ //_____________________________________________________________________________
void THcParmList::PrintFull( Option_t* option ) const void THcParmList::PrintFull( Option_t* option ) const
{ {
// Print all the numeric parameter desciptions and values.
// Print all the text parameters
THaVarList::PrintFull(option); THaVarList::PrintFull(option);
TextList->Print(); TextList->Print();
} }
...@@ -33,7 +33,7 @@ protected: ...@@ -33,7 +33,7 @@ protected:
private: private:
ClassDef(THcRawDCHit, 0); // DC hit class ClassDef(THcRawDCHit, 0); // Raw Drift Chamber hit
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment