Project
Loading...
Searching...
No Matches
o2::tof::Compressor< RDH, verbose, paranoid > Class Template Reference

#include <Compressor.h>

Classes

struct  CheckerSummary_t
 
struct  DecoderSummary_t
 
struct  DRMCounters_t
 
struct  SpiderSummary_t
 
struct  TRMChainCounters_t
 
struct  TRMCounters_t
 

Public Member Functions

 Compressor ()
 
 ~Compressor ()
 
bool run ()
 
void rewind ()
 
void checkSummary ()
 
void resetCounters ()
 
void setDecoderCONET (bool val)
 
void setDecoderCRUZEROES (bool val=true)
 
void setDecoderVerbose (bool val)
 
void setEncoderVerbose (bool val)
 
void setCheckerVerbose (bool val)
 
void setDecoderBuffer (const char *val)
 
void setEncoderBuffer (char *val)
 
void setDecoderBufferSize (long val)
 
void setEncoderBufferSize (long val)
 
uint32_t getDecoderByteCounter () const
 
uint32_t getEncoderByteCounter () const
 

Public Attributes

double mIntegratedBytes = 0.
 
double mIntegratedTime = 0.
 

Protected Member Functions

bool processHBF ()
 
bool processDRM ()
 
bool processLTM ()
 
bool processTRM ()
 
bool processTRMchain (int itrm, int ichain)
 
bool decoderParanoid ()
 
void decoderRewind ()
 
void decoderNext ()
 
int encoderSpider (int itrm)
 
void encoderRewind ()
 
int encoderNext ()
 
bool checkerCheck ()
 
void checkerCheckRDH ()
 

Protected Attributes

int mJumpRDH = 0
 
std::ifstream mDecoderFile
 
const charmDecoderBuffer = nullptr
 
long mDecoderBufferSize
 
const uint32_t * mDecoderPointer = nullptr
 
const uint32_t * mDecoderPointerMax = nullptr
 
const uint32_t * mDecoderPointerNext = nullptr
 
uint8_t mDecoderNextWord = 1
 
uint8_t mDecoderNextWordStep = 0
 
const RDHmDecoderRDH
 
bool mDecoderCONET = false
 
bool mDecoderVerbose = false
 
bool mDecoderError = false
 
bool mDecoderFatal = false
 
charmDecoderSaveBuffer = nullptr
 
const int mDecoderSaveBufferSize = 33554432
 
uint32_t mDecoderSaveBufferDataSize = 0
 
uint32_t mDecoderSaveBufferDataLeft = 0
 
std::ofstream mEncoderFile
 
charmEncoderBuffer = nullptr
 
long mEncoderBufferSize
 
long mEncoderBufferSizeInt
 
uint32_t * mEncoderPointer = nullptr
 
uint32_t * mEncoderPointerMax = nullptr
 
uint32_t * mEncoderPointerStart = nullptr
 
uint8_t mEncoderNextWord = 1
 
RDHmEncoderRDH
 
bool mEncoderVerbose = false
 
uint32_t mEventCounter
 
uint32_t mFatalCounter
 
uint32_t mErrorCounter
 
bool mCheckerVerbose = false
 
struct o2::tof::Compressor::DRMCounters_t mDRMCounters = {0}
 
struct o2::tof::Compressor::TRMCounters_t mTRMCounters [10] = {0}
 
struct o2::tof::Compressor::TRMChainCounters_t mTRMChainCounters [10][2] = {0}
 
struct o2::tof::Compressor::DecoderSummary_t mDecoderSummary = {nullptr}
 
struct o2::tof::Compressor::SpiderSummary_t mSpiderSummary = {0}
 
struct o2::tof::Compressor::CheckerSummary_t mCheckerSummary = {0}
 

Detailed Description

template<typename RDH, bool verbose, bool paranoid>
class o2::tof::Compressor< RDH, verbose, paranoid >

Definition at line 33 of file Compressor.h.

Constructor & Destructor Documentation

◆ Compressor()

template<typename RDH , bool verbose, bool paranoid>
o2::tof::Compressor< RDH, verbose, paranoid >::Compressor ( )
inline

Definition at line 37 of file Compressor.h.

◆ ~Compressor()

template<typename RDH , bool verbose, bool paranoid>
o2::tof::Compressor< RDH, verbose, paranoid >::~Compressor ( )
inline

Definition at line 38 of file Compressor.h.

Member Function Documentation

◆ checkerCheck()

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::checkerCheck ( )
protected

checker private functions and data members

checker check

increment check counter

check TOF Data Header

check DRM

check DRM Data Header

check DRM decode error

check DRM Data Trailer

get DRM relevant data

check RDH

check enable/participating mask

check DRM clock status

check DRM fault mask

check DRM readout timeout

check DRM event words (careful with pointers because we have 64 bits extra! only for CRU data!

check current diagnostic word

check LTM

check participating LTM

check LTM Data Header

check LTM Data Trailer

clear LTM summary data

loop over TRMs

check current diagnostic word

set current slot id

check participating TRM

check TRM bit in DRM fault mask

check TRM Data Header

check TRM decode error

check TRM Data Trailer

increment TRM header counter

check TRM empty flag

check TRM EventCounter

check TRM empty bit

check TRM event words (careful with pointers because we have 64 bits extra! only for CRU data!

loop over TRM chains

check TRM Chain Header

check TRM Chain Trailer

increment TRM Chain header counter

check TDC errors

check TRM Chain event counter

check TRM Chain Status

check TRM Chain BunchID

clear TRM chain summary data

end of loop over TRM chains

clear TRM summary data

end of loop over TRMs

check current diagnostic word

clear DRM summary data

Definition at line 986 of file Compressor.cxx.

◆ checkerCheckRDH()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::checkerCheckRDH ( )
protected

check orbit

check FEE id

Definition at line 1396 of file Compressor.cxx.

◆ checkSummary()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::checkSummary ( )

Definition at line 1440 of file Compressor.cxx.

◆ decoderNext()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::decoderNext ( )
inlineprotected

Definition at line 123 of file Compressor.h.

◆ decoderParanoid()

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::decoderParanoid ( )
protected

decoder private functions and data members

decoder paranoid

Definition at line 851 of file Compressor.cxx.

◆ decoderRewind()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::decoderRewind ( )
inlineprotected

Definition at line 122 of file Compressor.h.

◆ encoderNext()

template<typename RDH , bool verbose, bool paranoid>
int o2::tof::Compressor< RDH, verbose, paranoid >::encoderNext ( )
inlineprotected

Definition at line 161 of file Compressor.h.

◆ encoderRewind()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::encoderRewind ( )
inlineprotected

Definition at line 154 of file Compressor.h.

◆ encoderSpider()

template<typename RDH , bool verbose, bool paranoid>
int o2::tof::Compressor< RDH, verbose, paranoid >::encoderSpider ( int  itrm)
protected

encoder private functions and data members

encoder spider

reset packed hits counter

loop over TRM chains

loop over TDCs

loop over hits

loop over frames

check if frame is empty

Definition at line 866 of file Compressor.cxx.

◆ getDecoderByteCounter()

template<typename RDH , bool verbose, bool paranoid>
uint32_t o2::tof::Compressor< RDH, verbose, paranoid >::getDecoderByteCounter ( ) const
inline

Definition at line 99 of file Compressor.h.

◆ getEncoderByteCounter()

template<typename RDH , bool verbose, bool paranoid>
uint32_t o2::tof::Compressor< RDH, verbose, paranoid >::getEncoderByteCounter ( ) const
inline

Definition at line 100 of file Compressor.h.

◆ processDRM()

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::processDRM ( )
protected

init decoder

check TOF Data Header

TOF Orbit

check DRM Data Header

DRM Header Word 1

DRM Header Word 2

DRM Header Word 3

DRM Header Word 4

DRM Header Word 5

encode Crate Header

encode Crate Orbit

loop over DRM payload

LTM global header detected

TRM Data Header detected

DRM Data Trailer detected

filler detected

encode Crate Trailer

check event

encode Diagnostic Words

encode TDC errors

DRM Test Word detected

decode error

decode error detected, be paranoid

end of loop over DRM payload

Definition at line 298 of file Compressor.cxx.

◆ processHBF()

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::processHBF ( )
protected

check that we got the first RDH open

loop until RDH close

do some minimal RDH sanity checks

copy DRM payload to save buffer

move to next RDH

check next RDH is within buffer

otherwise return

do some minimal RDH sanity checks

copy RDH open to encoder buffer

process DRM data

bring encoder pointer back if fatal error and flag it

updated encoder RDH open

copy RDH close to encoder buffer

CAREFUL WITH THE PAGE COUNTER

move to next RDH

check next RDH is within buffer

otherwise return

Definition at line 107 of file Compressor.cxx.

◆ processLTM()

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::processLTM ( )
protected

process LTM

loop over LTM payload

LTM global trailer detected

success

Definition at line 607 of file Compressor.cxx.

◆ processTRM()

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::processTRM ( )
protected

process TRM

loop over TRM payload

TRM Chain-A Header detected

TRM Chain-B Header detected

TRM Data Trailer detected

filler detected

encoder Spider

success

decode error

decode error detected, be always paranoid

end of loop over TRM payload

never reached

Definition at line 654 of file Compressor.cxx.

◆ processTRMchain()

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::processTRMchain ( int  itrm,
int  ichain 
)
protected

process TRM chain

loop over TRM Chain payload

TDC hit detected

TDC error detected

TRM Chain Trailer detected

decode error

decode error detected, be alway paranoid

end of loop over TRM chain payload

success

Definition at line 752 of file Compressor.cxx.

◆ resetCounters()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::resetCounters ( )

Definition at line 1425 of file Compressor.cxx.

◆ rewind()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::rewind ( )
inline

Definition at line 64 of file Compressor.h.

◆ run()

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::run ( )
inline

Definition at line 40 of file Compressor.h.

◆ setCheckerVerbose()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::setCheckerVerbose ( bool  val)
inline

Definition at line 88 of file Compressor.h.

◆ setDecoderBuffer()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::setDecoderBuffer ( const char val)
inline

Definition at line 90 of file Compressor.h.

◆ setDecoderBufferSize()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::setDecoderBufferSize ( long  val)
inline

Definition at line 92 of file Compressor.h.

◆ setDecoderCONET()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::setDecoderCONET ( bool  val)
inline

Definition at line 73 of file Compressor.h.

◆ setDecoderCRUZEROES()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::setDecoderCRUZEROES ( bool  val = true)
inline

Definition at line 81 of file Compressor.h.

◆ setDecoderVerbose()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::setDecoderVerbose ( bool  val)
inline

Definition at line 86 of file Compressor.h.

◆ setEncoderBuffer()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::setEncoderBuffer ( char val)
inline

Definition at line 91 of file Compressor.h.

◆ setEncoderBufferSize()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::setEncoderBufferSize ( long  val)
inline

Definition at line 93 of file Compressor.h.

◆ setEncoderVerbose()

template<typename RDH , bool verbose, bool paranoid>
void o2::tof::Compressor< RDH, verbose, paranoid >::setEncoderVerbose ( bool  val)
inline

Definition at line 87 of file Compressor.h.

Member Data Documentation

◆ mCheckerSummary

template<typename RDH , bool verbose, bool paranoid>
struct o2::tof::Compressor::CheckerSummary_t o2::tof::Compressor< RDH, verbose, paranoid >::mCheckerSummary = {0}
protected

◆ mCheckerVerbose

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::mCheckerVerbose = false
protected

Definition at line 189 of file Compressor.h.

◆ mDecoderBuffer

template<typename RDH , bool verbose, bool paranoid>
const char* o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderBuffer = nullptr
protected

Definition at line 134 of file Compressor.h.

◆ mDecoderBufferSize

template<typename RDH , bool verbose, bool paranoid>
long o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderBufferSize
protected

Definition at line 135 of file Compressor.h.

◆ mDecoderCONET

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderCONET = false
protected

Definition at line 142 of file Compressor.h.

◆ mDecoderError

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderError = false
protected

Definition at line 144 of file Compressor.h.

◆ mDecoderFatal

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderFatal = false
protected

Definition at line 145 of file Compressor.h.

◆ mDecoderFile

template<typename RDH , bool verbose, bool paranoid>
std::ifstream o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderFile
protected

Definition at line 133 of file Compressor.h.

◆ mDecoderNextWord

template<typename RDH , bool verbose, bool paranoid>
uint8_t o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderNextWord = 1
protected

Definition at line 139 of file Compressor.h.

◆ mDecoderNextWordStep

template<typename RDH , bool verbose, bool paranoid>
uint8_t o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderNextWordStep = 0
protected

Definition at line 140 of file Compressor.h.

◆ mDecoderPointer

template<typename RDH , bool verbose, bool paranoid>
const uint32_t* o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderPointer = nullptr
protected

Definition at line 136 of file Compressor.h.

◆ mDecoderPointerMax

template<typename RDH , bool verbose, bool paranoid>
const uint32_t* o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderPointerMax = nullptr
protected

Definition at line 137 of file Compressor.h.

◆ mDecoderPointerNext

template<typename RDH , bool verbose, bool paranoid>
const uint32_t* o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderPointerNext = nullptr
protected

Definition at line 138 of file Compressor.h.

◆ mDecoderRDH

template<typename RDH , bool verbose, bool paranoid>
const RDH* o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderRDH
protected

Definition at line 141 of file Compressor.h.

◆ mDecoderSaveBuffer

template<typename RDH , bool verbose, bool paranoid>
char* o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderSaveBuffer = nullptr
protected

Definition at line 146 of file Compressor.h.

◆ mDecoderSaveBufferDataLeft

template<typename RDH , bool verbose, bool paranoid>
uint32_t o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderSaveBufferDataLeft = 0
protected

Definition at line 149 of file Compressor.h.

◆ mDecoderSaveBufferDataSize

template<typename RDH , bool verbose, bool paranoid>
uint32_t o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderSaveBufferDataSize = 0
protected

Definition at line 148 of file Compressor.h.

◆ mDecoderSaveBufferSize

template<typename RDH , bool verbose, bool paranoid>
const int o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderSaveBufferSize = 33554432
protected

Definition at line 147 of file Compressor.h.

◆ mDecoderSummary

template<typename RDH , bool verbose, bool paranoid>
struct o2::tof::Compressor::DecoderSummary_t o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderSummary = {nullptr}
protected

◆ mDecoderVerbose

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::mDecoderVerbose = false
protected

Definition at line 143 of file Compressor.h.

◆ mDRMCounters

template<typename RDH , bool verbose, bool paranoid>
struct o2::tof::Compressor::DRMCounters_t o2::tof::Compressor< RDH, verbose, paranoid >::mDRMCounters = {0}
protected

◆ mEncoderBuffer

template<typename RDH , bool verbose, bool paranoid>
char* o2::tof::Compressor< RDH, verbose, paranoid >::mEncoderBuffer = nullptr
protected

Definition at line 171 of file Compressor.h.

◆ mEncoderBufferSize

template<typename RDH , bool verbose, bool paranoid>
long o2::tof::Compressor< RDH, verbose, paranoid >::mEncoderBufferSize
protected

Definition at line 172 of file Compressor.h.

◆ mEncoderBufferSizeInt

template<typename RDH , bool verbose, bool paranoid>
long o2::tof::Compressor< RDH, verbose, paranoid >::mEncoderBufferSizeInt
protected

Definition at line 173 of file Compressor.h.

◆ mEncoderFile

template<typename RDH , bool verbose, bool paranoid>
std::ofstream o2::tof::Compressor< RDH, verbose, paranoid >::mEncoderFile
protected

Definition at line 170 of file Compressor.h.

◆ mEncoderNextWord

template<typename RDH , bool verbose, bool paranoid>
uint8_t o2::tof::Compressor< RDH, verbose, paranoid >::mEncoderNextWord = 1
protected

Definition at line 177 of file Compressor.h.

◆ mEncoderPointer

template<typename RDH , bool verbose, bool paranoid>
uint32_t* o2::tof::Compressor< RDH, verbose, paranoid >::mEncoderPointer = nullptr
protected

Definition at line 174 of file Compressor.h.

◆ mEncoderPointerMax

template<typename RDH , bool verbose, bool paranoid>
uint32_t* o2::tof::Compressor< RDH, verbose, paranoid >::mEncoderPointerMax = nullptr
protected

Definition at line 175 of file Compressor.h.

◆ mEncoderPointerStart

template<typename RDH , bool verbose, bool paranoid>
uint32_t* o2::tof::Compressor< RDH, verbose, paranoid >::mEncoderPointerStart = nullptr
protected

Definition at line 176 of file Compressor.h.

◆ mEncoderRDH

template<typename RDH , bool verbose, bool paranoid>
RDH* o2::tof::Compressor< RDH, verbose, paranoid >::mEncoderRDH
protected

Definition at line 178 of file Compressor.h.

◆ mEncoderVerbose

template<typename RDH , bool verbose, bool paranoid>
bool o2::tof::Compressor< RDH, verbose, paranoid >::mEncoderVerbose = false
protected

Definition at line 179 of file Compressor.h.

◆ mErrorCounter

template<typename RDH , bool verbose, bool paranoid>
uint32_t o2::tof::Compressor< RDH, verbose, paranoid >::mErrorCounter
protected

Definition at line 188 of file Compressor.h.

◆ mEventCounter

template<typename RDH , bool verbose, bool paranoid>
uint32_t o2::tof::Compressor< RDH, verbose, paranoid >::mEventCounter
protected

Definition at line 186 of file Compressor.h.

◆ mFatalCounter

template<typename RDH , bool verbose, bool paranoid>
uint32_t o2::tof::Compressor< RDH, verbose, paranoid >::mFatalCounter
protected

Definition at line 187 of file Compressor.h.

◆ mIntegratedBytes

template<typename RDH , bool verbose, bool paranoid>
double o2::tof::Compressor< RDH, verbose, paranoid >::mIntegratedBytes = 0.

Definition at line 109 of file Compressor.h.

◆ mIntegratedTime

template<typename RDH , bool verbose, bool paranoid>
double o2::tof::Compressor< RDH, verbose, paranoid >::mIntegratedTime = 0.

Definition at line 110 of file Compressor.h.

◆ mJumpRDH

template<typename RDH , bool verbose, bool paranoid>
int o2::tof::Compressor< RDH, verbose, paranoid >::mJumpRDH = 0
protected

Definition at line 131 of file Compressor.h.

◆ mSpiderSummary

template<typename RDH , bool verbose, bool paranoid>
struct o2::tof::Compressor::SpiderSummary_t o2::tof::Compressor< RDH, verbose, paranoid >::mSpiderSummary = {0}
protected

◆ mTRMChainCounters

template<typename RDH , bool verbose, bool paranoid>
struct o2::tof::Compressor::TRMChainCounters_t o2::tof::Compressor< RDH, verbose, paranoid >::mTRMChainCounters[10][2] = {0}
protected

◆ mTRMCounters

template<typename RDH , bool verbose, bool paranoid>
struct o2::tof::Compressor::TRMCounters_t o2::tof::Compressor< RDH, verbose, paranoid >::mTRMCounters[10] = {0}
protected

The documentation for this class was generated from the following files: