The TDataParser is the DAQ dependent part of GRSISort. It takes raw data and converts it into a generic TFragment that the rest of GRSISort can deal with. This is where event word masks are applied, and any changes to the event format must be implemented.
Definition at line 42 of file TDataParser.h.
Public Types | |
enum | EBank { EBank::kWFDN, EBank::kGRF1, EBank::kGRF2, EBank::kGRF3, EBank::kGRF4, EBank::kFME0, EBank::kFME1, EBank::kFME2, EBank::kFME3 } |
Public Member Functions | |
TDataParser () | |
virtual | ~TDataParser () |
virtual std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TFragment > > > & | AddGoodOutputQueue (size_t maxSize=50000) |
virtual std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TBadFragment > > > & | BadOutputQueue () |
virtual void | ClearQueue () |
virtual size_t | ItemsPushed () |
virtual std::string | OutputQueueStatus () |
virtual int | Process (std::shared_ptr< TRawEvent >)=0 |
void | Push (ThreadsafeQueue< std::shared_ptr< const TBadFragment >> &queue, const std::shared_ptr< TBadFragment > &frag) |
void | Push (std::vector< std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TFragment >>>> &queues, const std::shared_ptr< TFragment > &frag) |
virtual std::shared_ptr< ThreadsafeQueue< std::shared_ptr< TEpicsFrag > > > & | ScalerOutputQueue () |
virtual void | SetFinished () |
virtual void | SetNoWaveForms (bool temp=true) |
virtual void | SetRecordDiag (bool temp=true) |
virtual void | SetStatusVariables (std::atomic_size_t *itemsPopped, std::atomic_long *inputSize) |
Protected Attributes | |
std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TBadFragment > > > | fBadOutputQueue |
TChannel * | fChannel |
bool | fFragmentHasWaveform |
std::map< int, int > | fFragmentIdMap |
TFragmentMap | fFragmentMap |
std::vector< std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TFragment > > > > | fGoodOutputQueues |
std::atomic_long * | fInputSize |
std::atomic_size_t * | fItemsPopped |
unsigned long | fLastDaqId |
unsigned long | fLastNetworkPacket |
std::map< UInt_t, Long64_t > | fLastTimeStampMap |
unsigned long | fLastTriggerId |
const unsigned long | fMaxTriggerId |
bool | fNoWaveforms |
bool | fRecordDiag |
std::shared_ptr< ThreadsafeQueue< std::shared_ptr< TEpicsFrag > > > | fScalerOutputQueue |
Static Protected Attributes | |
static TGRSIOptions * | fOptions = nullptr |
#include <TDataParser.h>
|
strong |
Enumerator | |
---|---|
kWFDN | |
kGRF1 | |
kGRF2 | |
kGRF3 | |
kGRF4 | |
kFME0 | |
kFME1 | |
kFME2 | |
kFME3 |
Definition at line 50 of file TDataParser.h.
TDataParser::TDataParser | ( | ) |
Definition at line 18 of file TDataParser.cxx.
References fChannel.
|
virtual |
Definition at line 28 of file TDataParser.cxx.
References fChannel.
|
inlinevirtual |
Definition at line 53 of file TDataParser.h.
References fGoodOutputQueues.
Referenced by TUnpackingLoop::AddGoodOutputQueue().
|
inlinevirtual |
Definition at line 61 of file TDataParser.h.
References fBadOutputQueue.
Referenced by TUnpackingLoop::BadOutputQueue().
|
virtual |
Definition at line 34 of file TDataParser.cxx.
References fBadOutputQueue, fGoodOutputQueues, and fScalerOutputQueue.
Referenced by TUnpackingLoop::ClearQueue().
|
inlinevirtual |
Definition at line 76 of file TDataParser.h.
References fGoodOutputQueues.
Referenced by TUnpackingLoop::GetItemsPushed().
|
virtual |
Definition at line 80 of file TDataParser.cxx.
References fGoodOutputQueues.
Referenced by TUnpackingLoop::EndStatus().
|
pure virtual |
Implemented in TILLDataParser, THILDataParser, TGRSIDataParser, and TTdrDataParser.
Referenced by TUnpackingLoop::Iteration().
void TDataParser::Push | ( | ThreadsafeQueue< std::shared_ptr< const TBadFragment >> & | queue, |
const std::shared_ptr< TBadFragment > & | frag | ||
) |
Definition at line 72 of file TDataParser.cxx.
References fFragmentIdMap.
Referenced by TGRSIDataParser::CaenPhaToFragment(), TGRSIDataParser::CaenPsdToFragment(), THILDataParser::EagleEventToFragment(), TGRSIDataParser::EmmaMadcDataToFragment(), TGRSIDataParser::EmmaTdcDataToFragment(), TGRSIDataParser::GriffinDataToFragment(), TGRSIDataParser::RFScalerToFragment(), TTdrDataParser::TdrToFragment(), TGRSIDataParser::TigressDataToFragment(), TILLDataParser::V1SingleFippsEventToFragment(), and TILLDataParser::V2SingleFippsEventToFragment().
void TDataParser::Push | ( | std::vector< std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TFragment >>>> & | queues, |
const std::shared_ptr< TFragment > & | frag | ||
) |
Definition at line 61 of file TDataParser.cxx.
References fFragmentIdMap.
|
inlinevirtual |
Definition at line 63 of file TDataParser.h.
References fScalerOutputQueue.
Referenced by TUnpackingLoop::ScalerOutputQueue().
|
virtual |
Definition at line 52 of file TDataParser.cxx.
References fBadOutputQueue, fGoodOutputQueues, and fScalerOutputQueue.
Referenced by TUnpackingLoop::Iteration().
|
inlinevirtual |
Definition at line 46 of file TDataParser.h.
References fNoWaveforms.
Referenced by TUnpackingLoop::SetNoWaveForms().
|
inlinevirtual |
Definition at line 47 of file TDataParser.h.
References fRecordDiag.
Referenced by TUnpackingLoop::SetRecordDiag().
|
inlinevirtual |
Definition at line 65 of file TDataParser.h.
References fInputSize, and fItemsPopped.
Referenced by TUnpackingLoop::Iteration().
|
protected |
Definition at line 89 of file TDataParser.h.
Referenced by BadOutputQueue(), ClearQueue(), THILDataParser::EagleEventToFragment(), TGRSIDataParser::EmmaTdcDataToFragment(), TGRSIDataParser::GriffinDataToFragment(), TGRSIDataParser::RFScalerToFragment(), SetFinished(), TTdrDataParser::TdrToFragment(), TILLDataParser::V1SingleFippsEventToFragment(), and TILLDataParser::V2SingleFippsEventToFragment().
|
protected |
Definition at line 95 of file TDataParser.h.
Referenced by TGRSIDataParser::EmmaMadcDataToFragment(), TGRSIDataParser::SetTIGCharge(), TDataParser(), and ~TDataParser().
|
protected |
Definition at line 103 of file TDataParser.h.
Referenced by TGRSIDataParser::GriffinDataToFragment(), and TGRSIDataParser::SetGRIFPrimaryFilterPattern().
|
protected |
Definition at line 102 of file TDataParser.h.
Referenced by Push().
|
protected |
Class that holds a map of fragments per address, takes care of calculating charges for GRF4 banks.
Definition at line 105 of file TDataParser.h.
Referenced by TGRSIDataParser::GriffinDataToFragment().
|
protected |
Definition at line 88 of file TDataParser.h.
Referenced by AddGoodOutputQueue(), TGRSIDataParser::CaenPhaToFragment(), TGRSIDataParser::CaenPsdToFragment(), ClearQueue(), THILDataParser::EagleEventToFragment(), TGRSIDataParser::EmmaMadcDataToFragment(), TGRSIDataParser::EmmaTdcDataToFragment(), TGRSIDataParser::GriffinDataToFragment(), ItemsPushed(), OutputQueueStatus(), TGRSIDataParser::RFScalerToFragment(), SetFinished(), TTdrDataParser::TdrToFragment(), TGRSIDataParser::TigressDataToFragment(), TILLDataParser::V1SingleFippsEventToFragment(), and TILLDataParser::V2SingleFippsEventToFragment().
|
protected |
Definition at line 113 of file TDataParser.h.
Referenced by THILDataParser::Process(), TILLDataParser::Process(), SetStatusVariables(), and TTdrDataParser::TdrToFragment().
|
protected |
Definition at line 112 of file TDataParser.h.
Referenced by THILDataParser::Process(), TILLDataParser::Process(), SetStatusVariables(), and TTdrDataParser::TdrToFragment().
|
protected |
The last daq ID in the raw file.
Definition at line 98 of file TDataParser.h.
|
protected |
The last network packet recieved.
Definition at line 100 of file TDataParser.h.
|
protected |
Definition at line 107 of file TDataParser.h.
Referenced by TGRSIDataParser::GriffinDataToFragment().
|
protected |
The last Trigged ID in the raw File.
Definition at line 99 of file TDataParser.h.
Referenced by TGRSIDataParser::SetTIGTriggerID().
|
protected |
The last trigger ID Called.
Definition at line 97 of file TDataParser.h.
Referenced by TGRSIDataParser::SetTIGTriggerID().
|
protected |
The flag to turn wave_forms on or off.
Definition at line 93 of file TDataParser.h.
Referenced by TGRSIDataParser::GriffinDataToFragment(), SetNoWaveForms(), and TGRSIDataParser::TigressDataToFragment().
|
staticprotected |
Static pointer to TGRSIOptions, gets set on the first call of GriffinDataToFragment.
Definition at line 109 of file TDataParser.h.
Referenced by TGRSIDataParser::CaenPhaToFragment(), TGRSIDataParser::CaenPsdToFragment(), and TGRSIDataParser::GriffinDataToFragment().
|
protected |
The flag to turn on diagnostics recording.
Definition at line 94 of file TDataParser.h.
Referenced by THILDataParser::EagleEventToFragment(), TGRSIDataParser::GriffinDataToFragment(), SetRecordDiag(), TTdrDataParser::TdrToFragment(), TILLDataParser::V1SingleFippsEventToFragment(), and TILLDataParser::V2SingleFippsEventToFragment().
|
protected |
Definition at line 90 of file TDataParser.h.
Referenced by ClearQueue(), TGRSIDataParser::EPIXToScalar(), ScalerOutputQueue(), and SetFinished().