Hall C ROOT/C++ Analyzer (hcana)
THcDetectorMap Class Reference

Class to read and hold a Hall C style detector map.

FillMap method builds a map for a specific detector

Author
S. A. Wood

Definition at line 14 of file THcDetectorMap.h.

Classes

struct  ChaninMod
 
struct  Channel
 
struct  IDMap
 
struct  ModChanList
 

Public Member Functions

bool compare (const ChaninMod *first, const ChaninMod *second)
 
virtual Int_t FillMap (THaDetMap *detmap, const char *detectorname)
 
virtual void Load (const char *fname)
 
 THcDetectorMap ()
 
virtual ~THcDetectorMap ()
 
- Public Member Functions inherited from TObject
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
virtual void Browse (TBrowser *b)
 
virtual const char * ClassName () const
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 
virtual Int_t Compare (const TObject *obj) const
 
virtual void Copy (TObject &object) const
 
virtual void Delete (Option_t *option="")
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Dump () const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual TObjectFindObject (const char *name) const
 
virtual TObjectFindObject (const TObject *obj) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual const char * GetName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
virtual ULong_t Hash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 
virtual Bool_t IsFolder () const
 
Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 
void MayNotUse (const char *method) const
 
virtual Bool_t Notify ()
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete[] (void *ptr)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Paint (Option_t *option="")
 
virtual void Pop ()
 
virtual void Print (Option_t *option="") const
 
virtual Int_t Read (const char *name)
 
virtual void RecursiveRemove (TObject *obj)
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetDrawOption (Option_t *option="")
 
virtual void SetUniqueID (UInt_t uid)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
 TObject ()
 
 TObject (const TObject &object)
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 
virtual ~TObject ()
 

Public Attributes

IDMap fIDMap [50]
 
Int_t fNchans
 
Int_t fNIDs
 
Channel fTable [10000]
 
std::list< ModChanListmlist
 
- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 

Protected Member Functions

 ClassDef (THcDetectorMap, 0)
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EStatusBits
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 

#include <THcDetectorMap.h>

Inheritance diagram for THcDetectorMap:

Constructor & Destructor Documentation

THcDetectorMap::THcDetectorMap ( )

Definition at line 31 of file THcDetectorMap.cxx.

THcDetectorMap::~THcDetectorMap ( )
virtual

Definition at line 36 of file THcDetectorMap.cxx.

Member Function Documentation

THcDetectorMap::ClassDef ( THcDetectorMap  ,
 
)
protected
bool THcDetectorMap::compare ( const ChaninMod first,
const ChaninMod second 
)

Definition at line 40 of file THcDetectorMap.cxx.

Int_t THcDetectorMap::FillMap ( THaDetMap *  detmap,
const char *  detectorname 
)
virtual
Parameters
detmapDestination of DAQ hardware to detector element map
detectornameName of the detector

Called by each detector object to build a DAQ hardware to detector element map for the detector.

Definition at line 51 of file THcDetectorMap.cxx.

void THcDetectorMap::Load ( const char *  fname)
virtual
Parameters
fnamename of file containing ENGINE style detector map

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 [, subadd]

are used to establish the module (roc and slot) and the detector for the mapping lines that follow. If a SLOT line has a second value, that value is the channel of that slot that contains a reference time.

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)

A channel giving a reference time for a given slot can be set by putting

REFCHAN = subadd

after a SLOT line. (The above SLOT=n,subadd is deprecated). The line:

REFINDEX = index

indicates that all following mapping definition use the index'th reference time. It must be given after each SLOT command. A channel for a reference time is given by specifying a plane number of at least 1000 in a mapping line

subadd, 1000, 0, index

The reference time may be used by any channel of the same detector in the same ROC. If a reference time is used by several different detectors, this mapping line must be duplicated for each detector. More than one reference time may be specified per ROC by mulitple values for index.

Definition at line 186 of file THcDetectorMap.cxx.

Member Data Documentation

IDMap THcDetectorMap::fIDMap[50]

Definition at line 60 of file THcDetectorMap.h.

Int_t THcDetectorMap::fNchans

Definition at line 23 of file THcDetectorMap.h.

Int_t THcDetectorMap::fNIDs

Definition at line 61 of file THcDetectorMap.h.

Channel THcDetectorMap::fTable[10000]

Definition at line 37 of file THcDetectorMap.h.

std::list<ModChanList> THcDetectorMap::mlist

Definition at line 54 of file THcDetectorMap.h.

Collaboration diagram for THcDetectorMap:

The documentation for this class was generated from the following files: