ROOT logo
Podd » (UNKNOWN) » THaEvData

class THaEvData: public TObject

   Hall A Event Data from One "Event"

   This is a pure virtual base class.  You should not
   instantiate this directly (and actually CAN not), but
   rather use THaCodaDecoder or (less likely) a sim class like

   This class is intended to provide a crate/slot structure
   for derived classes to use.  All derived class must define and
   implement LoadEvent(const int*).  See the header.

   original author  Robert Michaels (

   modified for abstraction by Ken Rossato (

Function Members (Methods)

    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
const char*DevType(Int_t crate, Int_t slot) const
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
voidEnableBenchmarks(Bool_t enable = true)
voidEnableHelicity(Bool_t enable = true)
voidEnableScalers(Bool_t enable = true)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Int_tGetData(Int_t crate, Int_t slot, Int_t chan, Int_t hit) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual doubleGetEpicsData(const char* tag, Int_t event = 0) const
virtual TStringGetEpicsString(const char* tag, Int_t event = 0) const
virtual doubleGetEpicsTime(const char* tag, Int_t event = 0) const
Int_tGetEvLength() const
Int_tGetEvNum() const
virtual ULong64_tGetEvTime() const
Int_tGetEvType() const
virtual Int_tGetHelicity() const
virtual Int_tGetHelicity(const TString&) const
virtual const char*TObject::GetIconName() const
UInt_tGetInstance() const
static UInt_tGetInstances()
virtual Decoder::Module*GetModule(Int_t roc, Int_t slot) const
virtual const char*TObject::GetName() const
Int_tGetNextChan(Int_t crate, Int_t slot, Int_t index) const
Int_tGetNumChan(Int_t crate, Int_t slot) const
Int_tGetNumHits(Int_t crate, Int_t slot, Int_t chan) const
Int_tGetNumRaw(Int_t crate, Int_t slot) const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
TStringGetOrigPS() const
virtual Int_tGetPrescaleFactor(Int_t) const
Int_tGetRawData(Int_t i) const
Int_tGetRawData(Int_t crate, Int_t i) const
Int_tGetRawData(Int_t crate, Int_t slot, Int_t hit) const
Int_tGetRawData(Int_t crate, Int_t slot, Int_t chan, Int_t hit) const
const UInt_t*GetRawDataBuffer(Int_t crate) const
Int_tGetRocLength(Int_t crate) const
Int_tGetRunNum() const
ULong64_tGetRunTime() const
Int_tGetRunType() const
virtual Int_tGetScaler(Int_t, Int_t, Int_t) const
virtual Int_tGetScaler(const TString&, Int_t, Int_t) const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
Bool_tHelicityEnabled() const
static voidhexdump(const char* cbuff, size_t len)
Bool_tInCrate(Int_t crate, Int_t i) const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tIsEpicsEvent() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tIsLoadedEpics(const char*) const
Bool_tTObject::IsOnHeap() const
Bool_tIsPhysicsTrigger() const
Bool_tIsPrescaleEvent() const
Bool_tIsPrestartEvent() const
Bool_tIsScalerEvent() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsSpecialEvent() const
Bool_tTObject::IsZombie() const
virtual Int_tLoadEvent(const UInt_t* evbuffer)
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual voidPrintOut() const
virtual voidPrintSlotData(Int_t crate, Int_t slot) const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
Bool_tScalersEnabled() const
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetCrateMapName(const char* name)
voidSetDebug(UInt_t level)
virtual voidSetDebugFile(ofstream* file)
static voidSetDefaultCrateMapName(const char* name)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetOrigPS(Int_t event_type)
virtual voidSetRunTime(ULong64_t tloc)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetVerbose(UInt_t level)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Bool_tGoodCrateSlot(Int_t crate, Int_t slot) const
Bool_tGoodIndex(Int_t crate, Int_t slot) const
Int_tidx(Int_t crate, Int_t slot) const
Int_tidx(Int_t crate, Int_t slot)
Int_tinit_slotdata(const Decoder::THaCrateMap* map)
voidmakeidx(Int_t crate, Int_t slot)

Data Members

enum { HED_OK
enum TObject::EStatusBits { kCanDelete
enum TObject::[unnamed] { kIsOnHeap
Decoder::THaCrateMap*fMapPointer to active crate map
const UInt_t*buffer
ULong64_tevt_timeEvent time. Not directly supported by CODA
TStringfCrateMapNameCrate map database file name to use
Int_tfDebugDebug/verbosity level
ofstream*fDebugFiledebug output
UInt_tfInstanceMy instance
Int_tfNSlotClearNumber of elements of crateslot[] to clear
Int_tfNSlotUsedNumber of elements of crateslot[] actually used
Bool_tfNeedInitCrate map needs to be (re-)initialized
ULong64_tfRunTimeCODA run time (Unix time) from prestart event
UShort_t*fSlotClear[fNSlotClear] Indices of crateslot[] to clear
UShort_t*fSlotUsed[fNSlotUsed] Indices of crateslot[] used
static Bool_tfgAllowUnimplIf true, allow unimplemented functions
static TStringfgDefaultCrateMapNameDefault crate map name
static TBitsfgInstancesNumber of instances of this object
static const Double_tkBigdefault value for invalid data
Int_trun_typeCODA run type from prestart event

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

const char* DevType(Int_t crate, Int_t slot) const
 Device type in crate, slot
void SetRunTime(ULong64_t tloc)
 Set run time and re-initialize crate map (and possibly other
 database parameters for the new time.
void EnableBenchmarks(Bool_t enable = true)
 Enable/disable run time reporting
void EnableHelicity(Bool_t enable = true)
 Enable/disable helicity decoding
void EnableScalers(Bool_t enable = true)
 Enable/disable scaler decoding
void SetVerbose(UInt_t level)
 Set verbosity level. Identical to SetDebug(). Kept for compatibility.
void SetDebug(UInt_t level)
 Set debug level
void SetOrigPS(Int_t event_type)
TString GetOrigPS() const
void hexdump(const char* cbuff, size_t len)
 Hexdump buffer 'cbuff' of length 'nlen'
void SetDefaultCrateMapName(const char* name)
 Static function to set fgDefaultCrateMapName. Call this function to set a
 global default name for all decoder instances before initialization. This
 is usually what you want to do for a given replay.
void SetCrateMapName(const char* name)
 Set fCrateMapName for this decoder instance only
int init_cmap()
void makeidx(Int_t crate, Int_t slot)
 Activate crate/slot
void PrintOut() const
void PrintSlotData(Int_t crate, Int_t slot) const
 Print the contents of (crate, slot).
int init_slotdata(const Decoder::THaCrateMap* map)
 Update lists of used/clearable slots in case crate map changed
Module* GetModule(Int_t roc, Int_t slot) const
Int_t idx(Int_t crate, Int_t slot) const
Utility function to index into the crateslot array
Int_t idx(Int_t crate, Int_t slot)
Like idx() const, but initializes empty slots
Bool_t GoodCrateSlot(Int_t crate, Int_t slot) const
Bool_t GoodIndex(Int_t crate, Int_t slot) const
Int_t GetRocLength(Int_t crate) const
Int_t GetNumHits(Int_t crate, Int_t slot, Int_t chan) const
 Number hits in crate, slot, channel
Int_t GetData(Int_t crate, Int_t slot, Int_t chan, Int_t hit) const
 Return the data in crate, slot, channel #chan and hit# hit
Int_t GetNumRaw(Int_t crate, Int_t slot) const
 Number of raw words in crate, slot
Int_t GetRawData(Int_t crate, Int_t slot, Int_t hit) const
 Raw words in crate, slot
Int_t GetRawData(Int_t crate, Int_t slot, Int_t chan, Int_t hit) const
 Return the Rawdata in crate, slot, channel #chan and hit# hit
Int_t GetRawData(Int_t i) const
 Raw words in evbuffer at location #i.
Int_t GetRawData(Int_t crate, Int_t i) const
 Raw words in evbuffer within crate #crate.
const UInt_t* GetRawDataBuffer(Int_t crate) const
 Direct access to the event buffer for the given crate,
 e.g. for fast header word searches
Bool_t InCrate(Int_t crate, Int_t i) const
 To tell if the index "i" poInt_ts to a word inside crate #crate.
Int_t GetNumChan(Int_t crate, Int_t slot) const
 Get number of unique channels hit
Int_t GetNextChan(Int_t crate, Int_t slot, Int_t index) const
 Get list of unique channels hit (indexed by index=0,getNumChan()-1)
Bool_t IsPhysicsTrigger() const
Bool_t IsScalerEvent() const
 Either 'event type 140' or events with the synchronous readout
 of scalers (roc11, etc).
 Important: A scaler event can also be a physics event.
Bool_t IsPrestartEvent() const
Bool_t IsEpicsEvent() const
Bool_t IsPrescaleEvent() const
Bool_t IsSpecialEvent() const
Bool_t HelicityEnabled() const
 Test if helicity decoding enabled
Bool_t ScalersEnabled() const
 Test if scaler decoding enabled
double GetEpicsData(const char* tag, Int_t event = 0) const
double GetEpicsTime(const char* tag, Int_t event = 0) const
TString GetEpicsString(const char* tag, Int_t event = 0) const
Int_t LoadEvent(const UInt_t* evbuffer)
 Load CODA data evbuffer. Derived classes MUST implement this function.
Int_t GetEvType() const
 Basic access to the decoded data
{ return event_type; }
Int_t GetEvLength() const
{ return event_length; }
Int_t GetEvNum() const
{ return event_num; }
Int_t GetRunNum() const
 Run time/date. Time of prestart event (UNIX time).
{ return run_num; }
ULong64_t GetRunTime() const
{ return fRunTime; }
Int_t GetRunType() const
{ return run_type; }
ULong64_t GetEvTime() const
 Optional functionality that may be implemented by derived classes
{ return evt_time; }
Int_t GetHelicity() const
 Returns Beam Helicity (-1,0,+1)  '0' is 'unknown'
{ return 0; }
Int_t GetHelicity(const TString& ) const
 Beam Helicity for spec="left","right"
{ return GetHelicity(); }
Int_t GetPrescaleFactor(Int_t ) const
 User can GetScaler, alternativly to GetSlotData for scalers
 spec = "left", "right", "rcs" for event type 140 scaler "events"
 spec = "evleft" or "evright" for L,R scalers injected into datastream.
{ assert(fgAllowUnimpl); return -1; }
Int_t GetScaler(Int_t , Int_t , Int_t ) const
{ assert(ScalersEnabled() && fgAllowUnimpl); return kMaxInt; }
Int_t GetScaler(const TString& , Int_t , Int_t ) const
{ return GetScaler(0,0,0); }
void SetDebugFile(ofstream* file)
{ fDebugFile = file; }
Bool_t IsLoadedEpics(const char* ) const
{ return false; }
UInt_t GetInstance() const
{ return fInstance; }
UInt_t GetInstances()
{ return fgInstances.CountBits(); }