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

Start writing a THcDetectorMap class to fill a THaDetMap from

the Hall C style detector map.
parent 48fcb3a8
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,12 @@ inline static bool IsComment( const string& s, string::size_type pos )
(s[pos] == '!') );
}
virtual Int_t THcDetectorMap::FillMap(THaDetMap *detmap, string *detectorname) {
Int_t detectorid=3; // Get this from detectorname
// Loop through the list looking for all hardware channels that
// are detectorid. Sort and try to minimize AddModule calls
}
void THcDetectorMap::Load(const char *fname)
{
......
......@@ -17,6 +17,15 @@ class THcDetectorMap : public TObject {
virtual void Load(const char *fname);
// Member variables needed
// List of detector IDs.
// Hardware to logical detector mapping for each detector
// Mapping between detector names and numbers
// Hardwire, but later configure
struct Detector {
UInt_t did; // Numberical Detector ID
TList*
protected:
ClassDef(THcDetectorMap,0);
......
......@@ -68,6 +68,11 @@ THaAnalysisObject::EStatus THcHodoscope::Init( const TDatime& date )
// maximum number of hits after setting up the detector map
THcHitList::InitHitList(fDetMap, "THcHodoscopeHit", 100);
if( gHcDetectorMap->FillMap("detectorname",fDetMap) < 0 ) {
Error( Here(here), "Error filling detectormap for %s.",
"detectorname");
return kInitError;
}
return fStatus = kOK;
}
......
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