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

class Decoder::THaCodaDecoder: public THaEvData


   THaCodaDecoder
   Hall A Event Data from one CODA "Event"

   THaCodaDecoder contains facilities to load an event buffer
   from a CODA "event" and get information about the event,
   such as event type, TDC hits, scalers, prescale factors,
   etc.  The idea of an "event" is not just a physics trigger,
   but more generally any separate record inserted into CODA,
   e.g. EPICS insertion.  The user must "LoadEvent" each
   event before extracting information about the event.
   The "evbuffer" may come from a CODA file or ET connection.
   There is no need to create/destroy an THaEvData object each
   event because hit counters are cleared each event.
   There are various kinds of events including:
      1. physics triggers
      2. scaler events (asynch insertion of scalers)
      3. EPICS "events"
      4. prescale factors (one "event" at start of run).
      5. etc, etc. (see the online DAQ documentation)
   Public routines allow to fetch these data.



Function Members (Methods)

public:
virtual~THaCodaDecoder()
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*THaEvData::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
voidTHaEvData::EnableBenchmarks(Bool_t enable = true)
voidTHaEvData::EnableHelicity(Bool_t enable = true)
voidTHaEvData::EnableScalers(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_tTHaEvData::GetData(Int_t crate, Int_t slot, Int_t chan, Int_t hit) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Double_tGetEpicsData(const char* tag, Int_t event = 0) const
virtual TStringGetEpicsString(const char* tag, Int_t event = 0) const
virtual Double_tGetEpicsTime(const char* tag, Int_t event = 0) const
Int_tTHaEvData::GetEvLength() const
Int_tTHaEvData::GetEvNum() const
virtual ULong64_tTHaEvData::GetEvTime() const
Int_tTHaEvData::GetEvType() const
virtual Int_tTHaEvData::GetHelicity() const
virtual Int_tTHaEvData::GetHelicity(const TString&) const
virtual const char*TObject::GetIconName() const
UInt_tTHaEvData::GetInstance() const
static UInt_tTHaEvData::GetInstances()
virtual Decoder::Module*THaEvData::GetModule(Int_t roc, Int_t slot) const
virtual const char*TObject::GetName() const
Int_tTHaEvData::GetNextChan(Int_t crate, Int_t slot, Int_t index) const
Int_tTHaEvData::GetNumChan(Int_t crate, Int_t slot) const
Int_tTHaEvData::GetNumHits(Int_t crate, Int_t slot, Int_t chan) const
Int_tTHaEvData::GetNumRaw(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
TStringTHaEvData::GetOrigPS() const
virtual Int_tGetPrescaleFactor(Int_t trigger) const
Int_tTHaEvData::GetRawData(Int_t i) const
Int_tTHaEvData::GetRawData(Int_t crate, Int_t i) const
Int_tTHaEvData::GetRawData(Int_t crate, Int_t slot, Int_t hit) const
Int_tTHaEvData::GetRawData(Int_t crate, Int_t slot, Int_t chan, Int_t hit) const
const UInt_t*THaEvData::GetRawDataBuffer(Int_t crate) const
Int_tTHaEvData::GetRocLength(Int_t crate) const
Int_tTHaEvData::GetRunNum() const
ULong64_tTHaEvData::GetRunTime() const
Int_tTHaEvData::GetRunType() const
virtual Int_tGetScaler(const TString& spec, Int_t slot, Int_t chan) const
virtual Int_tGetScaler(Int_t roc, Int_t slot, Int_t chan) const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
Bool_tTHaEvData::HelicityEnabled() const
static voidTHaEvData::hexdump(const char* cbuff, size_t len)
Bool_tTHaEvData::InCrate(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_tTHaEvData::IsEpicsEvent() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tIsLoadedEpics(const char* tag) const
Bool_tTObject::IsOnHeap() const
Bool_tTHaEvData::IsPhysicsTrigger() const
Bool_tTHaEvData::IsPrescaleEvent() const
Bool_tTHaEvData::IsPrestartEvent() const
Bool_tTHaEvData::IsScalerEvent() const
virtual Bool_tTObject::IsSortable() const
Bool_tTHaEvData::IsSpecialEvent() 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 voidTHaEvData::PrintSlotData(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_tTHaEvData::ScalersEnabled() const
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidTHaEvData::SetCrateMapName(const char* name)
voidTHaEvData::SetDebug(UInt_t level)
virtual voidTHaEvData::SetDebugFile(ofstream* file)
static voidTHaEvData::SetDefaultCrateMapName(const char* name)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
voidTHaEvData::SetOrigPS(Int_t event_type)
virtual voidSetRunTime(ULong64_t tloc)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidTHaEvData::SetVerbose(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
Decoder::THaCodaDecoderTHaCodaDecoder()
Decoder::THaCodaDecoderTHaCodaDecoder(const Decoder::THaCodaDecoder&)
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
protected:
Int_tcamac_decode(Int_t roc, const UInt_t* evbuffer, Int_t p1, Int_t p2)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
static voiddump(const UInt_t* evbuffer)
Int_tepics_decode(const UInt_t* evbuffer)
Int_tfastbus_decode(Int_t roc, const UInt_t* evbuffer, Int_t p1, Int_t p2)
Int_tgendecode(const UInt_t* evbuffer)
Bool_tTHaEvData::GoodCrateSlot(Int_t crate, Int_t slot) const
Bool_tTHaEvData::GoodIndex(Int_t crate, Int_t slot) const
Int_tTHaEvData::idx(Int_t crate, Int_t slot) const
Int_tTHaEvData::idx(Int_t crate, Int_t slot)
Int_tTHaEvData::init_cmap()
Int_tTHaEvData::init_slotdata(const Decoder::THaCrateMap* map)
Int_tloadFlag(const UInt_t* evbuffer)
voidTHaEvData::makeidx(Int_t crate, Int_t slot)
voidTObject::MakeZombie()
Int_tphysics_decode(const UInt_t* evbuffer)
Int_tprescale_decode(const UInt_t* evbuffer)
Int_tscaler_event_decode(const UInt_t* evbuffer)
Int_tvme_decode(Int_t roc, const UInt_t* evbuffer, Int_t p1, Int_t p2)

Data Members

public:
Decoder::THaCrateMap*THaEvData::fMapPointer to active crate map
protected:
THaEvData::BankDat_tTHaEvData::bankdat[50]
const UInt_t*THaEvData::buffer
Bool_tTHaEvData::buffmode
Decoder::THaSlotData**THaEvData::crateslot
Int_tdatascan
Decoder::THaEpics*epicsEPICS is done by us, not THaEvData.
Int_tTHaEvData::event_length
Int_tTHaEvData::event_num
Int_tTHaEvData::event_type
Int_tTHaEvData::evscaler
ULong64_tTHaEvData::evt_timeEvent time. Not directly supported by CODA
THaBenchmark*THaEvData::fBench
TStringTHaEvData::fCrateMapNameCrate map database file name to use
Int_tTHaEvData::fDebugDebug/verbosity level
ofstream*THaEvData::fDebugFiledebug output
Bool_tTHaEvData::fDoBench
UInt_tTHaEvData::fInstanceMy instance
Int_tTHaEvData::fNSlotClearNumber of elements of crateslot[] to clear
Int_tTHaEvData::fNSlotUsedNumber of elements of crateslot[] actually used
Bool_tTHaEvData::fNeedInitCrate map needs to be (re-)initialized
ULong64_tTHaEvData::fRunTimeCODA run time (Unix time) from prestart event
UShort_t*THaEvData::fSlotClear[fNSlotClear] Indices of crateslot[] to clear
UShort_t*THaEvData::fSlotUsed[fNSlotUsed] Indices of crateslot[] used
Bool_tTHaEvData::fTrigSupPS
Decoder::THaFastBusWord*fb
static Bool_tTHaEvData::fgAllowUnimplIf true, allow unimplemented functions
static TStringTHaEvData::fgDefaultCrateMapNameDefault crate map name
static TBitsTHaEvData::fgInstancesNumber of instances of this object
Bool_tTHaEvData::first_decode
Bool_tfirst_scaler
static const Double_tTHaEvData::kBigdefault value for invalid data
Int_tnumscaler_crate
Int_tpsfact[12]
Int_tTHaEvData::recent_event
THaEvData::RocDat_tTHaEvData::rocdat[32]
Int_tTHaEvData::run_num
Int_tTHaEvData::run_typeCODA run type from prestart event
Int_tscaler_crate[32]stored from cratemap for fast ref.
TStringscalerdef[32]
Bool_tTHaEvData::synchextra
Int_tsynchflag
Bool_tTHaEvData::synchmiss

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

THaCodaDecoder()
~THaCodaDecoder()
Int_t GetPrescaleFactor(Int_t trigger) const
 To get the prescale factors for trigger number "trigger_type"
 (valid types are 1,2,3...)
Int_t LoadEvent(const UInt_t* evbuffer)
 Public interface to decode the event.  Note, LoadEvent()
 MUST be called once per event BEFORE you can extract
 information about the event.
Int_t gendecode(const UInt_t* evbuffer)
 Main engine for decoding, called by public LoadEvent() methods
void dump(const UInt_t* evbuffer)
Int_t physics_decode(const UInt_t* evbuffer)
Int_t epics_decode(const UInt_t* evbuffer)
Int_t prescale_decode(const UInt_t* evbuffer)
 Decodes prescale factors from either
 TS_PRESCALE_EVTYPE(default) = PS factors
 read from Trig. Super. registors (since 11/03)
   - or -
 PRESCALE_EVTYPE = PS factors from traditional
     "prescale.dat" file.
Int_t scaler_event_decode(const UInt_t* evbuffer)
 Decode scalers
Int_t GetScaler(const TString& spec, Int_t slot, Int_t chan) const
 Get scaler data by spectrometer, slot, and channel
 spec = "left" or "right" for the "scaler events" (type 140)
 and spec = "evleft" and "evright" for scalers
 that are part of the event (ev) readout.
Int_t GetScaler(Int_t roc, Int_t slot, Int_t chan) const
 Get scaler data by roc, slot, chan.
Bool_t IsLoadedEpics(const char* tag) const
 Test if the given EPICS variable name has been loaded
double GetEpicsData(const char* tag, Int_t event = 0) const
 EPICS data which is nearest CODA event# 'event'
 event == 0 --> get latest data
 Tag is EPICS variable, e.g. 'IPM1H04B.XPOS'
TString GetEpicsString(const char* tag, Int_t event = 0) const
 EPICS string data which is nearest CODA event# 'event'
 event == 0 --> get latest data
double GetEpicsTime(const char* tag, Int_t event = 0) const
 EPICS time stamp
 event == 0 --> get latest data
Int_t fastbus_decode(Int_t roc, const UInt_t* evbuffer, Int_t p1, Int_t p2)
Int_t vme_decode(Int_t roc, const UInt_t* evbuffer, Int_t p1, Int_t p2)
 Decode VME
Int_t camac_decode(Int_t roc, const UInt_t* evbuffer, Int_t p1, Int_t p2)
Int_t loadFlag(const UInt_t* evbuffer)
 Looks for buffer mode and synch problems.  The latter are recoverable
 but extremely rare, so I haven't bothered to write recovery a code yet,
 but at least this warns you.
void SetRunTime(ULong64_t tloc)
 Set run time and re-initialize crate map (and possibly other
 database parameters for the new time.
THaCodaDecoder()
void PrintOut() const
{ dump(buffer); }