ROOT logo
Podd » (UNKNOWN) » Decoder::THaSlotData

class Decoder::THaSlotData


   THaSlotData
   Data in one slot of one crate from DAQ.

   THaSlotData contains data from one slot of one crate
   from a CODA event.  Public methods allow to obtain
   raw data for this crate & slot, or to obtain TDC, ADC,
   or scaler data for each channel in the slot.  Methods
   clearEvent() and loadData() should only be used by
   the decoder.  WARNING: For efficiency, only the
   hit counters are zero'd each event, not the data
   arrays, see below.

   author  Robert Michaels (rom@jlab.org)


Function Members (Methods)

public:
virtual~THaSlotData()
static TClass*Class()
voidclearEvent()
intcompressdataindex(int numidx)
voiddefine(int crate, int slot, UShort_t nchan = DEFNCHAN, UShort_t ndata = DEFNDATA, UShort_t nhitperchan = DEFNHITCHAN)
const char*devType() const
intgetCrate() const
intgetData(int chan, int hit) const
Decoder::Module*GetModule()
intgetNextChan(int index) const
intgetNumChan() const
intgetNumHits(int chan) const
intgetNumRaw() const
intgetRawData(int hit) const
intgetRawData(int chan, int hit) const
intgetSlot() const
virtual TClass*IsA() const
Int_tLoadBank(const UInt_t* p, Int_t pos, Int_t len)
intloadData(int chan, int dat, int raw)
intloadData(const char* type, int chan, int dat, int raw)
Int_tLoadIfSlot(const UInt_t* evbuffer, const UInt_t* pstop)
intloadModule(const Decoder::THaCrateMap* map)
Decoder::THaSlotData&operator=(const Decoder::THaSlotData&)
voidprint() const
voidprint_to_file() const
voidSetDebugFile(ofstream* file)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
Decoder::THaSlotDataTHaSlotData()
Decoder::THaSlotDataTHaSlotData(const Decoder::THaSlotData&)
Decoder::THaSlotDataTHaSlotData(int crate, int slot)

Data Members

public:
static const intDEFNCHANDefault number of channels
static const intDEFNDATADefault number of data words
static const intDEFNHITCHANDefault number of hits per channel
private:
UShort_tallocdAllocated size of data arrays
UShort_tallociAllocated size of dataindex array
UShort_t*chanindex[channel] gives hitindex
UShort_t*chanlistchanlist[hitindex]
intcrate
int*datadata[hit] (only data bits)
UShort_t*dataindex[idxlist] pointer to rawdata and data
TStringdevice
booldidinitrue if object initialized via define()
ofstream*fDebugFiledebug output to this file, if nonzero
Decoder::Module*fModule
UShort_tfirstfreedataidxpointer to first free space in dataindex array
UShort_t*idxlist[channel] pointer to 1st entry in dataindex
UShort_tmaxcNumber of channels for this device
UShort_tmaxdMax number of data words per event
UShort_t*numHitsnumHits[channel]
UShort_t*numMaxHits[channel] current maximum number of hits
UShort_tnumchanhitcan be zero'd by clearEvent each event.
UShort_tnumhitperchanexpected number of hits per channel
UShort_tnumholesdataidx
UShort_tnumrawHit counters (numraw, numHits, numchanhit)
int*rawDatarawData[hit] (all bits)
intslot
Int_t*xnumHitssame as numHits

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

THaSlotData()
{}
THaSlotData(int crate, int slot)
{}
~THaSlotData()
void define(int crate, int slot, UShort_t nchan = DEFNCHAN, UShort_t ndata = DEFNDATA, UShort_t nhitperchan = DEFNHITCHAN)
 Must call define once if you are really going to use this slot.
 Otherwise its an empty slot which does not use much memory.
int loadModule(const Decoder::THaCrateMap* map)
Int_t LoadIfSlot(const UInt_t* evbuffer, const UInt_t* pstop)
 returns how many words seen.
Int_t LoadBank(const UInt_t* p, Int_t pos, Int_t len)
 returns how many words seen.
int loadData(const char* type, int chan, int dat, int raw)
int loadData(int chan, int dat, int raw)
 NEW (6/2014).
void print() const
void print_to_file() const
THaSlotData()
const char* devType() const
int getNumRaw() const
{ return numraw; }
int getRawData(int hit) const
int getRawData(int chan, int hit) const
int getNumHits(int chan) const
int getNumChan() const
int getNextChan(int index) const
int getData(int chan, int hit) const
int getCrate() const
{ return crate; }
int getSlot() const
{ return slot; }
void clearEvent()
void SetDebugFile(ofstream* file)
{ fDebugFile = file; }
Module* GetModule()
{ return fModule; }
int compressdataindex(int numidx)