class 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:
THaCodaDecoder()
THaCodaDecoder(const THaCodaDecoder&)
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 stringGetEpicsString(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 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
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 Int_t* evbuffer, THaCrateMap* usermap)
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
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(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
Bool_tTHaEvData::ScalersEnabled() const
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
static voidTHaEvData::SetCrateMapName(const char* name)
voidTHaEvData::SetDebug(UInt_t level)
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& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& 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
protected:
Int_tcamac_decode(Int_t roc, const Int_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 Int_t* evbuffer)
Int_tepics_decode(const Int_t* evbuffer)
Int_tfastbus_decode(Int_t roc, const Int_t* evbuffer, Int_t p1, Int_t p2)
Int_tgendecode(const Int_t* evbuffer, THaCrateMap* map)
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 THaCrateMap* map)
Int_tloadFlag(const Int_t* evbuffer)
voidTHaEvData::makeidx(Int_t crate, Int_t slot)
voidTObject::MakeZombie()
Int_tphysics_decode(const Int_t* evbuffer)
Int_tprescale_decode(const Int_t* evbuffer)
Int_tscaler_event_decode(const Int_t* evbuffer)
Int_tvme_decode(Int_t roc, const Int_t* evbuffer, Int_t p1, Int_t p2)

Data Members

public:
enum THaEvData::[unnamed] { HED_OK
HED_WARN
HED_ERR
HED_FATAL
MAX_PSFACT
kHelicityEnabled
kScalersEnabled
kVerbose
kDebug
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
static const Int_tTHaEvData::DETMAP_FILE
static const Int_tTHaEvData::END_EVTYPE
static const Int_tTHaEvData::EPICS_EVTYPE
static const Int_tTHaEvData::GO_EVTYPE
static const Int_tTHaEvData::MAXROC
static const Int_tTHaEvData::MAXSLOT
static const Int_tTHaEvData::MAX_PHYS_EVTYPETypes up to this are physics
static const Int_tTHaEvData::PAUSE_EVTYPE
static const Int_tTHaEvData::PRESCALE_EVTYPE
static const Int_tTHaEvData::PRESTART_EVTYPE
static const Int_tTHaEvData::SCALER_EVTYPE
static const Int_tTHaEvData::SYNC_EVTYPE
static const Int_tTHaEvData::TRIGGER_FILE
static const Int_tTHaEvData::TS_PRESCALE_EVTYPE
const Int_t*THaEvData::buffer
Bool_tbuffmode
Bool_tTHaEvData::buffmode
THaCrateMap*THaEvData::cmapdefault crate map
THaSlotData**THaEvData::crateslot
Int_tdatascan
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
Bool_tTHaEvData::fDoBench
UInt_tTHaEvData::fInstanceMy instance
THaCrateMap*THaEvData::fMapPointer to active crate map
Int_tTHaEvData::fNSlotClearNumber of elements of crateslot[] to clear
Int_tTHaEvData::fNSlotUsedNumber of elements of crateslot[] actually used
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
THaFastBusWord*fb
static Bool_tTHaEvData::fgAllowUnimplIf true, allow unimplemented functions
static TStringTHaEvData::fgCrateMapNameCrate map database file name to use
static const TStringTHaEvData::fgDefaultCrateMapNameDefault crate map name
static TBitsTHaEvData::fgInstancesNumber of instances of this object
static Bool_tTHaEvData::fgNeedInitCrate map needs to be (re-)initialized
Bool_tTHaEvData::first_decode
Bool_tTHaEvData::first_load
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_tsynchextra
Bool_tTHaEvData::synchextra
Int_tsynchflag
Bool_tsynchmiss
Bool_tTHaEvData::synchmiss

Class Charts

Inheritance Chart:
TObject
THaEvData
THaCodaDecoder

Function documentation

THaCodaDecoder(const 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 Int_t* evbuffer, THaCrateMap* usermap)
 Public interface to decode the event.  Note, LoadEvent()
 MUST be called once per event BEFORE you can extract
 information about the event.
 This version of LoadEvent() uses externally provided THaCrateMap
Int_t gendecode(const Int_t* evbuffer, THaCrateMap* map)
 Main engine for decoding, called by public LoadEvent() methods
 The crate map argument is ignored. Use SetCrateMapName instead
void dump(const Int_t* evbuffer)
Int_t physics_decode(const Int_t* evbuffer)
Int_t epics_decode(const Int_t* evbuffer)
Int_t prescale_decode(const Int_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 Int_t* evbuffer)
 Decode scalers
Int_t GetScaler( const TString& spec, Int_t slot, Int_t chan )
 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)
 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'
string 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 Int_t* evbuffer, Int_t p1, Int_t p2)
Int_t vme_decode(Int_t roc, const Int_t* evbuffer, Int_t p1, Int_t p2)
 Decode VME
Int_t camac_decode(Int_t roc, const Int_t* evbuffer, Int_t p1, Int_t p2)
Int_t loadFlag(const Int_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(const THaCodaDecoder& )
void PrintOut()
{ dump(buffer); }

Last change: Sat Nov 7 21:26:43 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.