JAPAn
Just Another Parity Analyzer
|
CODA version 3 event decoder implementation. More...
#include <Coda3EventDecoder.h>
Data Structures | |
class | coda_format_error |
class | TBOBJ |
Public Types | |
enum | { HED_OK = 0 , HED_WARN = -63 , HED_ERR = -127 , HED_FATAL = -255 } |
Public Member Functions | |
Coda3EventDecoder () | |
~Coda3EventDecoder () override | |
std::vector< UInt_t > | EncodePHYSEventHeader (std::vector< ROCID_t > &ROCList) override |
void | EncodePrestartEventHeader (int *buffer, int runnumber, int runtype, int localtime) override |
void | EncodeGoEventHeader (int *buffer, int eventcount, int localtime) override |
void | EncodePauseEventHeader (int *buffer, int eventcount, int localtime) override |
void | EncodeEndEventHeader (int *buffer, int eventcount, int localtime) override |
Int_t | DecodeEventIDBank (UInt_t *buffer) override |
![]() | |
VEventDecoder () | |
virtual | ~VEventDecoder () |
virtual Bool_t | DecodeSubbankHeader (UInt_t *buffer) |
Decode the subbank header for the current event/bank context. | |
virtual Bool_t | IsPhysicsEvent () |
virtual Bool_t | IsROCConfigurationEvent () |
virtual Bool_t | IsEPICSEvent () |
UInt_t | GetWordsSoFar () const |
UInt_t | GetEvtNumber () const |
UInt_t | GetEvtLength () const |
UInt_t | GetFragLength () const |
UInt_t | GetEvtType () const |
UInt_t | GetBankDataType () const |
UInt_t | GetSubbankTag () const |
UInt_t | GetSubbankType () const |
ROCID_t | GetROC () const |
void | SetWordsSoFar (UInt_t val) |
void | AddWordsSoFarAndFragLength () |
void | SetFragLength (UInt_t val) |
void | SetAllowLowSubbankIDs (Bool_t val=kFALSE) |
![]() | |
MQwCodaControlEvent () | |
~MQwCodaControlEvent () | |
void | ResetControlParameters () |
void | ProcessControlEvent (UInt_t evtype, UInt_t *buffer) |
void | ReportRunSummary () |
UInt_t | GetStartTime () |
UInt_t | GetPrestartTime () |
UInt_t | GetPrestartRunNumber () |
UInt_t | GetRunType () |
UInt_t | GetGoTime (int index=0) |
UInt_t | GetGoEventCount (int index=0) |
UInt_t | GetPauseTime (int index=0) |
UInt_t | GetPauseEventCount (int index=0) |
UInt_t | GetEndTime () |
UInt_t | GetEndEventCount () |
TString | GetStartSQLTime () |
TString | GetEndSQLTime () |
time_t | GetStartUnixTime () |
time_t | GetEndUnixTime () |
Static Public Attributes | |
static const UInt_t | MAX_PHYS_EVTYPE = 14 |
static const UInt_t | TS_PRESCALE_EVTYPE = 120 |
static const UInt_t | PRESCALE_EVTYPE = 133 |
static const UInt_t | DETMAP_FILE = 135 |
static const UInt_t | DAQCONFIG_FILE1 = 137 |
static const UInt_t | DAQCONFIG_FILE2 = 138 |
static const UInt_t | TRIGGER_FILE = 136 |
static const UInt_t | SCALER_EVTYPE = 140 |
static const UInt_t | SBSSCALER_EVTYPE = 141 |
static const UInt_t | HV_DATA_EVTYPE = 150 |
Protected Member Functions | |
UInt_t | InterpretBankTag (UInt_t tag) |
Int_t | trigBankDecode (UInt_t *buffer) |
void | trigBankErrorHandler (Int_t flag) |
ULong64_t | GetEvTime () const |
void | SetEvTime (ULong64_t evtime) |
Int_t | LoadTrigBankInfo (UInt_t index_buffer) |
![]() | |
void | ProcessSync (UInt_t local_time, UInt_t statuscode) |
void | ProcessPrestart (UInt_t local_time, UInt_t local_runnumber, UInt_t local_runtype) |
void | ProcessGo (UInt_t local_time, UInt_t evt_count) |
void | ProcessPause (UInt_t local_time, UInt_t evt_count) |
void | ProcessEnd (UInt_t local_time, UInt_t evt_count) |
Protected Attributes | |
UInt_t | tsEvType |
UInt_t | block_size |
ULong64_t | evt_time |
UInt_t | trigger_bits |
TBOBJ | tbank |
uint32_t | TSROCNumber |
![]() | |
UInt_t | fWordsSoFar |
UInt_t | fEvtLength |
UInt_t | fEvtNumber |
CODA event number; only defined for physics events. | |
UInt_t | fFragLength |
UInt_t | fEvtType |
UInt_t | fEvtTag |
UInt_t | fBankDataType |
BankID_t | fSubbankTag |
UInt_t | fSubbankType |
UInt_t | fSubbankNum |
ROCID_t | fROC |
Bool_t | fPhysicsEventFlag |
Bool_t | fControlEventFlag |
Bool_t | fAllowLowSubbankIDs |
![]() | |
Bool_t | fFoundControlEvents |
UInt_t | fPrestartTime |
UInt_t | fPrestartRunNumber |
UInt_t | fRunType |
UInt_t | fEndTime |
UInt_t | fEndEventCount |
UInt_t | fNumberPause |
std::vector< UInt_t > | fPauseEventCount |
std::vector< UInt_t > | fPauseTime |
UInt_t | fNumberGo |
std::vector< UInt_t > | fGoEventCount |
std::vector< UInt_t > | fGoTime |
UInt_t | fStartTime |
TDatime | fPrestartDatime |
TDatime | fStartDatime |
TDatime | fEndDatime |
Private Member Functions | |
void | printUserEvent (const UInt_t *buffer) |
void | PrintDecoderInfo (QwLog &out) override |
Additional Inherited Members | |
![]() | |
enum | KEYWORDS { EPICS_EVTYPE = 131 } |
![]() | |
enum | EventTypes { kSYNC_EVENT = 16 , kPRESTART_EVENT = 17 , kGO_EVENT = 18 , kPAUSE_EVENT = 19 , kEND_EVENT = 20 } |
CODA version 3 event decoder implementation.
Concrete decoder for CODA 3.x format event streams, handling the specific data structures, bank formats, and trigger information used in CODA 3. Provides encoding and decoding capabilities for both real and mock data.
Definition at line 22 of file Coda3EventDecoder.h.
anonymous enum |
|
inline |
Definition at line 25 of file Coda3EventDecoder.h.
References block_size, evt_time, trigger_bits, tsEvType, and TSROCNumber.
|
inlineoverride |
Definition at line 31 of file Coda3EventDecoder.h.
|
overridevirtual |
Determine if a buffer contains a PHYS, control, or other event.
buffer | Event buffer to decode. |
Implements VEventDecoder.
Definition at line 95 of file Coda3EventDecoder.cc.
References block_size, QwLog::endl(), evt_time, VEventDecoder::fBankDataType, VEventDecoder::fControlEventFlag, VEventDecoder::fEvtLength, VEventDecoder::fEvtNumber, VEventDecoder::fEvtTag, VEventDecoder::fEvtType, VEventDecoder::fFragLength, VEventDecoder::fPhysicsEventFlag, VEventDecoder::fWordsSoFar, gQwLog, HED_OK, InterpretBankTag(), QwLog::kDebug, PrintDecoderInfo(), printUserEvent(), MQwCodaControlEvent::ProcessControlEvent(), QwDebug, QwVerbose, QwWarning, tbank, trigBankDecode(), trigBankErrorHandler(), trigger_bits, and tsEvType.
|
overridevirtual |
Create an END event EVIO header.
buffer | Output buffer (>= 5 words). |
eventcount | Number of events. |
localtime | Event time. |
Implements VEventDecoder.
Definition at line 84 of file Coda3EventDecoder.cc.
References MQwCodaControlEvent::ProcessEnd().
|
overridevirtual |
Create a GO event EVIO header.
buffer | Output buffer (>= 5 words). |
eventcount | Number of events. |
localtime | Event time. |
Implements VEventDecoder.
Definition at line 62 of file Coda3EventDecoder.cc.
References MQwCodaControlEvent::ProcessGo().
|
overridevirtual |
Create a PAUSE event EVIO header.
buffer | Output buffer (>= 5 words). |
eventcount | Number of events. |
localtime | Event time. |
Implements VEventDecoder.
Definition at line 73 of file Coda3EventDecoder.cc.
References MQwCodaControlEvent::ProcessPause().
|
overridevirtual |
Create a PHYS event EVIO header.
ROCList | List of ROC IDs. |
Implements VEventDecoder.
Definition at line 17 of file Coda3EventDecoder.cc.
References VEventDecoder::fEvtNumber.
|
overridevirtual |
Create a PRESTART event EVIO header.
buffer | Output buffer (>= 5 words). |
runnumber | Run number. |
runtype | Run type. |
localtime | Event time. |
Implements VEventDecoder.
Definition at line 51 of file Coda3EventDecoder.cc.
References MQwCodaControlEvent::ProcessPrestart().
|
inlineprotected |
|
protected |
Determine event type and set control/physics flags based on bank tag.
Definition at line 168 of file Coda3EventDecoder.cc.
References QwLog::endl(), VEventDecoder::fControlEventFlag, VEventDecoder::fPhysicsEventFlag, MQwCodaControlEvent::kEND_EVENT, MQwCodaControlEvent::kGO_EVENT, MQwCodaControlEvent::kPRESTART_EVENT, and QwWarning.
Referenced by DecodeEventIDBank().
|
protected |
Load TI trigger bank info for the i-th event in block.
Definition at line 374 of file Coda3EventDecoder.cc.
References evt_time, tbank, trigger_bits, and tsEvType.
Referenced by trigBankDecode().
|
overrideprivatevirtual |
Print internal decoder state for diagnostics.
Reimplemented from VEventDecoder.
Definition at line 262 of file Coda3EventDecoder.cc.
References QwLog::endl(), VEventDecoder::fBankDataType, VEventDecoder::fEvtLength, VEventDecoder::fEvtNumber, VEventDecoder::fEvtTag, VEventDecoder::fEvtType, and VEventDecoder::fWordsSoFar.
Referenced by DecodeEventIDBank().
|
private |
Print non-PHYS, non-control "user" events.
Definition at line 207 of file Coda3EventDecoder.cc.
References DAQCONFIG_FILE1, DAQCONFIG_FILE2, QwLog::endl(), VEventDecoder::EPICS_EVTYPE, VEventDecoder::fEvtTag, VEventDecoder::fEvtType, HV_DATA_EVTYPE, PRESCALE_EVTYPE, QwMessage, QwWarning, SBSSCALER_EVTYPE, and SCALER_EVTYPE.
Referenced by DecodeEventIDBank().
|
inlineprotected |
|
protected |
Decode the TI trigger bank for PHYS events.
Definition at line 273 of file Coda3EventDecoder.cc.
References block_size, QwLog::endl(), VEventDecoder::fEvtNumber, VEventDecoder::fWordsSoFar, HED_ERR, HED_OK, LoadTrigBankInfo(), QwError, tbank, and TSROCNumber.
Referenced by DecodeEventIDBank().
|
protected |
Display a warning and reset state for a given TI error flag.
Definition at line 409 of file Coda3EventDecoder.cc.
References block_size, QwLog::endl(), evt_time, VEventDecoder::fBankDataType, VEventDecoder::fControlEventFlag, VEventDecoder::fEvtLength, VEventDecoder::fEvtTag, VEventDecoder::fEvtType, VEventDecoder::fPhysicsEventFlag, VEventDecoder::fWordsSoFar, HED_ERR, HED_FATAL, HED_OK, HED_WARN, QwError, QwWarning, tbank, trigger_bits, and tsEvType.
Referenced by DecodeEventIDBank().
|
protected |
Definition at line 89 of file Coda3EventDecoder.h.
Referenced by Coda3EventDecoder(), DecodeEventIDBank(), trigBankDecode(), and trigBankErrorHandler().
|
static |
Definition at line 140 of file Coda3EventDecoder.h.
Referenced by printUserEvent().
|
static |
Definition at line 141 of file Coda3EventDecoder.h.
Referenced by printUserEvent().
|
static |
Definition at line 139 of file Coda3EventDecoder.h.
|
protected |
Definition at line 90 of file Coda3EventDecoder.h.
Referenced by Coda3EventDecoder(), DecodeEventIDBank(), GetEvTime(), LoadTrigBankInfo(), SetEvTime(), and trigBankErrorHandler().
|
static |
Definition at line 145 of file Coda3EventDecoder.h.
Referenced by printUserEvent().
|
static |
Definition at line 134 of file Coda3EventDecoder.h.
|
static |
Definition at line 138 of file Coda3EventDecoder.h.
Referenced by printUserEvent().
|
static |
Definition at line 144 of file Coda3EventDecoder.h.
Referenced by printUserEvent().
|
static |
Definition at line 143 of file Coda3EventDecoder.h.
Referenced by printUserEvent().
|
protected |
Definition at line 129 of file Coda3EventDecoder.h.
Referenced by DecodeEventIDBank(), LoadTrigBankInfo(), trigBankDecode(), and trigBankErrorHandler().
|
protected |
Definition at line 91 of file Coda3EventDecoder.h.
Referenced by Coda3EventDecoder(), DecodeEventIDBank(), LoadTrigBankInfo(), and trigBankErrorHandler().
|
static |
Definition at line 142 of file Coda3EventDecoder.h.
|
static |
Definition at line 135 of file Coda3EventDecoder.h.
|
protected |
Definition at line 89 of file Coda3EventDecoder.h.
Referenced by Coda3EventDecoder(), DecodeEventIDBank(), LoadTrigBankInfo(), and trigBankErrorHandler().
|
protected |
Definition at line 151 of file Coda3EventDecoder.h.
Referenced by Coda3EventDecoder(), and trigBankDecode().