class THaDetMap


 The standard detector map for a Hall A detector.

Function Members (Methods)

THaDetMap(const THaDetMap&)
virtual Int_tAddModule(UShort_t crate, UShort_t slot, UShort_t chan_lo, UShort_t chan_hi, UInt_t first = 0, UInt_t model = 0, Int_t refindex = -1, Int_t refchan = -1)
static TClass*Class()
virtual Int_tFill(const vector<Int_t>& values, UInt_t flags = 0)
virtual THaDetMap::Module*Find(UShort_t crate, UShort_t slot, UShort_t chan)
voidGetMinMaxChan(Int_t& min, Int_t& max, THaDetMap::ECountMode mode = kLogicalChan) const
UInt_tGetModel(UShort_t i) const
static UInt_tGetModel(THaDetMap::Module* d)
THaDetMap::Module*GetModule(UShort_t i) const
Int_tGetNchan(UShort_t i) const
Int_tGetSize() const
Int_tGetTotNumChan() const
virtual TClass*IsA() const
Bool_tIsADC(UShort_t i) const
static Bool_tIsADC(THaDetMap::Module* d)
Bool_tIsTDC(UShort_t i) const
static Bool_tIsTDC(THaDetMap::Module* d)
THaDetMap&operator=(const THaDetMap&)
virtual voidPrint(Option_t* opt = "") const
virtual voidReset()
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidSort()
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
THaDetMap::Module*uGetModule(UShort_t i) const

Data Members

enum ECountMode { kLogicalChan
enum EFillFlags { kDoNotClear
static const intkDetMapSizeSanity limit on map size
THaDetMap::Module*fMapArray of modules, each module is a 7-tuple
Int_tfMaplengthcurrent size of the fMap array
UShort_tfNmodulesNumber of modules (=crate,slot) in the map
static const UInt_tkADCBit
static const UInt_tkModelMask
static const UInt_tkTDCBit

Class Charts

Inheritance Chart:

Function documentation

THaDetMap(const THaDetMap& )
 Default constructor. Creates an empty detector map.
THaDetMap(const THaDetMap& )
 Copy constructor
THaDetMap& operator=(const THaDetMap& )
 THaDetMap assignment operator
Int_t AddModule(UShort_t crate, UShort_t slot, UShort_t chan_lo, UShort_t chan_hi, UInt_t first = 0, UInt_t model = 0, Int_t refindex = -1, Int_t refchan = -1)
 Add a module to the map.
Int_t Fill(const vector<Int_t>& values, UInt_t flags = 0)
 Fill the map with 'values'. Depending on 'flags', the values vector
 is interpreted as a 4-, 5-, 6- or 7-tuple:

 The first 4 values are interpreted as (crate,slot,start_chan,end_chan)
 Each of the following flags causes one more value to be used as part of
 the tuple for each module:

 kFillLogicalChannel - Logical channel number for 'start_chan'.
 kFillModel          - The module's hardware model number (see AddModule())
 kFillRefChan        - Reference channel (for pipeline TDCs etc.)
 kFillRefIndex       - Reference index (for pipeline TDCs etc.)

 If more than one flag is present, the numbers will be interpreted
 in the order the flags are listed above.
      flags = kFillModel | kFillRefChan
      the vector is interpreted as a series of 6-tuples in the order

 If kFillLogicalChannel is not set then the first logical channel numbers
 are automatically calculated for each module, assuming the numbers are

 By default, an existing map is overwritten. If the flag kDoNotClear
 is present, then the data are appended.

 The return value is the number of modules successfully added,
 or negative if an error occurred.
Int_t GetTotNumChan()
 Get sum of the number of channels of all modules in the map. This is
 typically the total number of hardware channels used by the detector.
void GetMinMaxChan(Int_t& min, Int_t& max, THaDetMap::ECountMode mode = kLogicalChan) const
 Put the minimum and maximum logical or reference channel numbers
 into min and max. If refidx is true, check refindex, else check logical
 channel numbers.
void Print(Option_t* opt = "") const
 Print the contents of the map
void Reset()
 Clear() the map and reset the array size to zero, freeing memory.
void Sort()
 Sort the map by crate/slot/low channel
Bool_t IsADC(Module* d)
Bool_t IsTDC(Module* d)
UInt_t GetModel(Module* d)
Bool_t IsADC( UShort_t i )
Bool_t IsTDC( UShort_t i )
UInt_t GetModel( UShort_t i )
Int_t GetNchan(UShort_t i) const
 Return the number of channels of the i-th module
void Clear()
{ fNmodules = 0; }
Module* Find(UShort_t crate, UShort_t slot, UShort_t chan)
Module* GetModule(UShort_t i) const
Int_t GetSize()
{ return static_cast<Int_t>(fNmodules); }
Module* uGetModule(UShort_t i) const
{ return fMap+i; }

Last change: Sat Nov 7 21:26:45 2009
Last generated: 2009-11-07 21:26

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.