JAPAn
Just Another Parity Analyzer
|
Abstract base for CODA event encoding and decoding. More...
#include <VEventDecoder.h>
Public Member Functions | |
VEventDecoder () | |
virtual | ~VEventDecoder () |
virtual std::vector< UInt_t > | EncodePHYSEventHeader (std::vector< ROCID_t > &ROCList)=0 |
Create a physics-event (PHYS) header bank for the given ROCs. | |
virtual void | EncodePrestartEventHeader (int *buffer, int runnumber, int runtype, int localtime)=0 |
Encode a PRESTART control-event header. | |
virtual void | EncodeGoEventHeader (int *buffer, int eventcount, int localtime)=0 |
Encode a GO control-event header. | |
virtual void | EncodePauseEventHeader (int *buffer, int eventcount, int localtime)=0 |
Encode a PAUSE control-event header. | |
virtual void | EncodeEndEventHeader (int *buffer, int eventcount, int localtime)=0 |
Encode an END control-event header. | |
virtual Int_t | DecodeEventIDBank (UInt_t *buffer)=0 |
Decode the event ID bank and classify the event type. | |
virtual Bool_t | DecodeSubbankHeader (UInt_t *buffer) |
Decode the subbank header for the current event/bank context. | |
virtual void | PrintDecoderInfo (QwLog &out) |
Print internal decoder state for diagnostics. | |
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 () |
Protected Types | |
enum | KEYWORDS { EPICS_EVTYPE = 131 } |
![]() | |
enum | EventTypes { kSYNC_EVENT = 16 , kPRESTART_EVENT = 17 , kGO_EVENT = 18 , kPAUSE_EVENT = 19 , kEND_EVENT = 20 } |
Protected Attributes | |
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 |
Additional Inherited Members | |
![]() | |
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) |
Abstract base for CODA event encoding and decoding.
Provides the interface for encoding mock CODA events and decoding real CODA event streams. Concrete implementations handle version-specific differences (CODA 2 vs CODA 3) while exposing a common API for event type detection, bank decoding, and header processing.
Definition at line 27 of file VEventDecoder.h.
|
protected |
Enumerator | |
---|---|
EPICS_EVTYPE |
Definition at line 168 of file VEventDecoder.h.
|
inline |
Definition at line 29 of file VEventDecoder.h.
References fAllowLowSubbankIDs, fBankDataType, fControlEventFlag, fEvtLength, fEvtNumber, fEvtTag, fEvtType, fFragLength, fPhysicsEventFlag, fROC, fSubbankNum, fSubbankTag, fSubbankType, and fWordsSoFar.
|
inlinevirtual |
Definition at line 45 of file VEventDecoder.h.
|
inline |
|
pure virtual |
Decode the event ID bank and classify the event type.
buffer | Pointer to the start of the event buffer. |
Implemented in Coda2EventDecoder, and Coda3EventDecoder.
|
virtual |
Decode the subbank header for the current event/bank context.
Updates internal fields (subbank tag/type/num, ROC, fragment length) and advances the internal word counter to the first subbank data word.
buffer | Pointer to the current position in the event buffer. |
Definition at line 11 of file VEventDecoder.cc.
References QwLog::endl(), fAllowLowSubbankIDs, fBankDataType, fEvtLength, fFragLength, fROC, fSubbankNum, fSubbankTag, fSubbankType, fWordsSoFar, QwDebug, and QwError.
|
pure virtual |
Encode an END control-event header.
buffer | Output buffer (size >= 5 words) to receive the header. |
eventcount | Final event count. |
localtime | Wall-clock time (seconds) for the header timestamp. |
Implemented in Coda2EventDecoder, and Coda3EventDecoder.
|
pure virtual |
Encode a GO control-event header.
buffer | Output buffer (size >= 5 words) to receive the header. |
eventcount | Current event count. |
localtime | Wall-clock time (seconds) for the header timestamp. |
Implemented in Coda2EventDecoder, and Coda3EventDecoder.
|
pure virtual |
Encode a PAUSE control-event header.
buffer | Output buffer (size >= 5 words) to receive the header. |
eventcount | Current event count. |
localtime | Wall-clock time (seconds) for the header timestamp. |
Implemented in Coda2EventDecoder, and Coda3EventDecoder.
|
pure virtual |
Create a physics-event (PHYS) header bank for the given ROCs.
Encodes a minimal CODA-compliant PHYS event header for one trigger, suitable for mock-data generation and unit tests.
ROCList | List of ROC IDs to include in the header/banks. |
Implemented in Coda2EventDecoder, and Coda3EventDecoder.
|
pure virtual |
Encode a PRESTART control-event header.
buffer | Output buffer (size >= 5 words) to receive the header. |
runnumber | Run number to store in the header. |
runtype | Run type identifier. |
localtime | Wall-clock time (seconds) for the header timestamp. |
Implemented in Coda2EventDecoder, and Coda3EventDecoder.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Definition at line 123 of file VEventDecoder.h.
References EPICS_EVTYPE, and fEvtType.
|
inlinevirtual |
Definition at line 115 of file VEventDecoder.h.
References fPhysicsEventFlag.
|
inlinevirtual |
Definition at line 119 of file VEventDecoder.h.
References fEvtType.
|
virtual |
Print internal decoder state for diagnostics.
out | Logging stream to receive the formatted state (QwMessage/QwWarning/etc.). |
Reimplemented in Coda2EventDecoder, and Coda3EventDecoder.
Definition at line 70 of file VEventDecoder.cc.
References QwLog::endl(), fAllowLowSubbankIDs, fBankDataType, fEvtLength, fEvtNumber, fEvtTag, fEvtType, fFragLength, fPhysicsEventFlag, fROC, fSubbankNum, fSubbankTag, fSubbankType, and fWordsSoFar.
|
inline |
Definition at line 143 of file VEventDecoder.h.
References fAllowLowSubbankIDs.
|
inline |
|
inline |
|
protected |
Definition at line 165 of file VEventDecoder.h.
Referenced by DecodeSubbankHeader(), PrintDecoderInfo(), SetAllowLowSubbankIDs(), and VEventDecoder().
|
protected |
Definition at line 156 of file VEventDecoder.h.
Referenced by Coda2EventDecoder::DecodeEventIDBank(), Coda3EventDecoder::DecodeEventIDBank(), DecodeSubbankHeader(), GetBankDataType(), Coda2EventDecoder::PrintDecoderInfo(), Coda3EventDecoder::PrintDecoderInfo(), PrintDecoderInfo(), Coda3EventDecoder::trigBankErrorHandler(), and VEventDecoder().
|
protected |
Definition at line 164 of file VEventDecoder.h.
Referenced by Coda3EventDecoder::DecodeEventIDBank(), Coda3EventDecoder::InterpretBankTag(), Coda3EventDecoder::trigBankErrorHandler(), and VEventDecoder().
|
protected |
Definition at line 149 of file VEventDecoder.h.
Referenced by Coda2EventDecoder::DecodeEventIDBank(), Coda3EventDecoder::DecodeEventIDBank(), DecodeSubbankHeader(), GetEvtLength(), Coda2EventDecoder::PrintDecoderInfo(), Coda3EventDecoder::PrintDecoderInfo(), PrintDecoderInfo(), Coda3EventDecoder::trigBankErrorHandler(), and VEventDecoder().
|
protected |
CODA event number; only defined for physics events.
Definition at line 150 of file VEventDecoder.h.
Referenced by Coda2EventDecoder::DecodeEventIDBank(), Coda3EventDecoder::DecodeEventIDBank(), Coda2EventDecoder::EncodePHYSEventHeader(), Coda3EventDecoder::EncodePHYSEventHeader(), GetEvtNumber(), Coda2EventDecoder::PrintDecoderInfo(), Coda3EventDecoder::PrintDecoderInfo(), PrintDecoderInfo(), Coda3EventDecoder::trigBankDecode(), and VEventDecoder().
|
protected |
Definition at line 155 of file VEventDecoder.h.
Referenced by Coda2EventDecoder::DecodeEventIDBank(), Coda3EventDecoder::DecodeEventIDBank(), Coda2EventDecoder::PrintDecoderInfo(), Coda3EventDecoder::PrintDecoderInfo(), PrintDecoderInfo(), Coda3EventDecoder::printUserEvent(), Coda3EventDecoder::trigBankErrorHandler(), and VEventDecoder().
|
protected |
Definition at line 154 of file VEventDecoder.h.
Referenced by Coda2EventDecoder::DecodeEventIDBank(), Coda3EventDecoder::DecodeEventIDBank(), GetEvtType(), IsEPICSEvent(), IsROCConfigurationEvent(), Coda2EventDecoder::PrintDecoderInfo(), Coda3EventDecoder::PrintDecoderInfo(), PrintDecoderInfo(), Coda3EventDecoder::printUserEvent(), Coda3EventDecoder::trigBankErrorHandler(), and VEventDecoder().
|
protected |
Definition at line 151 of file VEventDecoder.h.
Referenced by AddWordsSoFarAndFragLength(), Coda2EventDecoder::DecodeEventIDBank(), Coda3EventDecoder::DecodeEventIDBank(), DecodeSubbankHeader(), GetFragLength(), PrintDecoderInfo(), SetFragLength(), and VEventDecoder().
|
protected |
Definition at line 163 of file VEventDecoder.h.
Referenced by Coda2EventDecoder::DecodeEventIDBank(), Coda3EventDecoder::DecodeEventIDBank(), Coda3EventDecoder::InterpretBankTag(), IsPhysicsEvent(), PrintDecoderInfo(), Coda3EventDecoder::trigBankErrorHandler(), and VEventDecoder().
|
protected |
Definition at line 160 of file VEventDecoder.h.
Referenced by DecodeSubbankHeader(), GetROC(), PrintDecoderInfo(), and VEventDecoder().
|
protected |
Definition at line 159 of file VEventDecoder.h.
Referenced by DecodeSubbankHeader(), PrintDecoderInfo(), and VEventDecoder().
|
protected |
Definition at line 157 of file VEventDecoder.h.
Referenced by DecodeSubbankHeader(), GetSubbankTag(), PrintDecoderInfo(), and VEventDecoder().
|
protected |
Definition at line 158 of file VEventDecoder.h.
Referenced by DecodeSubbankHeader(), GetSubbankType(), PrintDecoderInfo(), and VEventDecoder().
|
protected |
Definition at line 148 of file VEventDecoder.h.
Referenced by AddWordsSoFarAndFragLength(), Coda2EventDecoder::DecodeEventIDBank(), Coda3EventDecoder::DecodeEventIDBank(), DecodeSubbankHeader(), GetWordsSoFar(), Coda3EventDecoder::PrintDecoderInfo(), PrintDecoderInfo(), SetWordsSoFar(), Coda3EventDecoder::trigBankDecode(), Coda3EventDecoder::trigBankErrorHandler(), and VEventDecoder().