#include <DCCDataParser.h>
Public Types | |
enum | DCCDataParserGlobalFields { EMPTYEVENTSIZE = 32 } |
Public Member Functions | |
std::pair< uint32_t, uint32_t > | checkEventLength (uint32_t *pointerToEvent, uint32_t bytesToEnd, bool singleEvent=false) |
std::vector< DCCTBEventBlock * > & | dccEvents () |
uint32_t | dccId () |
DCCTBDataParser (std::vector< uint32_t > parserParameters, bool parseInternalData=true, bool debug=true) | |
bool | debug () |
std::map< std::string, uint32_t > & | errorCounters () |
std::vector< std::pair < uint32_t, std::pair < uint32_t *, uint32_t > > > | events () |
uint32_t * | getBuffer () |
std::string | getDecString (uint32_t data) |
std::string | getHexString (uint32_t data) |
std::string | getIndexedData (uint32_t indexed, uint32_t *pointer) |
std::string | index (uint32_t position) |
DCCTBDataMapper * | mapper () |
uint32_t | numbSRF () |
uint32_t | numbTriggerSamples () |
uint32_t | numbTTs () |
uint32_t | numbXtalSamples () |
void | parseBuffer (uint32_t *buffer, uint32_t bufferSize, bool singleEvent=false) |
void | parseFile (std::string fileName, bool singleEvent=false) |
std::vector< uint32_t > | parserParameters () |
void | resetErrorCounters () |
void | setParameters (std::vector< uint32_t > newParameters) |
uint32_t | srpBlockSize () |
uint32_t | srpId () |
uint32_t | tcc1Id () |
uint32_t | tcc2Id () |
uint32_t | tcc3Id () |
uint32_t | tcc4Id () |
uint32_t | tccBlockSize () |
~DCCTBDataParser () | |
Protected Types | |
enum | DCCTBDataParserFields { EVENTLENGTHMASK = 0xFFFFFF, BOEBEGIN = 28, BOEMASK = 0xF, BOE =0x5, EOEBEGIN = 28, EOEMASK = 0xF, EOE =0xA } |
Protected Member Functions | |
void | computeBlockSizes () |
Protected Attributes | |
uint32_t * | buffer_ |
uint32_t | bufferSize_ |
std::vector< DCCTBEventBlock * > | dccEvents_ |
bool | debug_ |
std::map< std::string, uint32_t > | errors_ |
std::string | eventErrors_ |
std::vector< std::pair < uint32_t, std::pair < uint32_t *, uint32_t > > > | events_ |
DCCTBDataMapper * | mapper_ |
std::vector< uint32_t > | parameters |
bool | parseInternalData_ |
uint32_t | processedEvent_ |
uint32_t | srpBlockSize_ |
uint32_t | tccBlockSize_ |
Definition at line 27 of file DCCDataParser.h.
|
protected |
Enumerator | |
---|---|
EVENTLENGTHMASK | |
BOEBEGIN | |
BOEMASK | |
BOE | |
EOEBEGIN | |
EOEMASK | |
EOE |
Definition at line 165 of file DCCDataParser.h.
DCCTBDataParser::DCCTBDataParser | ( | std::vector< uint32_t > | parserParameters, |
bool | parseInternalData = true , |
||
bool | debug = true |
||
) |
Class constructor: takes a vector of 10 parameters and flags for parseInternalData and debug Parameters are: 0 - crystal samples (default is 10) 1 - number of trigger time samples (default is 1) 2 - number of TT (default is 68) 3 - number of SR Flags (default is 68) 4 - DCC id 5 - SR id [6-9] - TCC[6-9] id
Definition at line 9 of file DCCDataParser.cc.
References computeBlockSizes(), mapper_, and resetErrorCounters().
DCCTBDataParser::~DCCTBDataParser | ( | ) |
Class destructor
Definition at line 347 of file DCCDataParser.cc.
References dccEvents_, and mapper_.
std::pair< uint32_t, uint32_t > DCCTBDataParser::checkEventLength | ( | uint32_t * | pointerToEvent, |
uint32_t | bytesToEnd, | ||
bool | singleEvent = false |
||
) |
Check if EVENT LENGTH is coeherent and if BOE/EOE are correctly written returns 3 bits code with the error found + event length
Definition at line 218 of file DCCDataParser.cc.
References BOE, BOEBEGIN, BOEMASK, EMPTYEVENTSIZE, EOEBEGIN, EOEMASK, errors_, EVENTLENGTHMASK, events_, getDecString(), and query::result.
Referenced by parseBuffer().
|
protected |
Definition at line 35 of file DCCDataParser.cc.
References nTT, numbSRF(), numbTriggerSamples(), numbTTs(), srpBlockSize_, and tccBlockSize_.
Referenced by DCCTBDataParser(), and setParameters().
|
inline |
Get method for DCCEventBlocks vector
Definition at line 199 of file DCCDataParser.h.
References dccEvents_.
Referenced by EcalTB07DaqFormatter::interpretRawData(), and EcalTBDaqFormatter::interpretRawData().
|
inline |
|
inline |
Get methods for debug flag
Definition at line 198 of file DCCDataParser.h.
References debug_.
Referenced by DCCTBEventBlock::DCCTBEventBlock(), DCCTBSRPBlock::DCCTBSRPBlock(), DCCTBTCCBlock::DCCTBTCCBlock(), DCCTBXtalBlock::DCCTBXtalBlock(), DCCTBXtalBlock::increment(), DCCTBSRPBlock::increment(), DCCTBTCCBlock::increment(), and DCCTBTowerBlock::parseXtalData().
|
inline |
Get method for error counters map
Definition at line 200 of file DCCDataParser.h.
References errors_.
|
inline |
Get method for events
Definition at line 201 of file DCCDataParser.h.
References events_.
|
inline |
Retrieves a pointer to the data buffer
Definition at line 131 of file DCCDataParser.h.
References buffer_.
std::string DCCTBDataParser::getDecString | ( | uint32_t | data | ) |
Methods to get data strings formatted as decimal/hexadecimal, indexes and indexed data
Definition at line 301 of file DCCDataParser.cc.
References data.
Referenced by DCCTBDataMapper::buildDCCFields(), DCCTBDataMapper::buildSRPFields(), DCCTBDataMapper::buildTCCFields(), DCCTBDataMapper::buildXtalFields(), DCCTBBlockPrototype::checkDataField(), checkEventLength(), DCCTBEventBlock::dataCheck(), DCCTBTowerBlock::dataCheck(), DCCTBTCCBlock::dataCheck(), DCCTBEventBlock::DCCTBEventBlock(), DCCTBEventBlock::eventErrorString(), parseBuffer(), DCCTBBlockPrototype::parseData(), DCCTBTowerBlock::parseXtalData(), DCCTBTCCBlock::triggerFlags(), DCCTBTCCBlock::triggerSamples(), and DCCTBXtalBlock::xtalDataSamples().
std::string DCCTBDataParser::getHexString | ( | uint32_t | data | ) |
std::string DCCTBDataParser::getIndexedData | ( | uint32_t | indexed, |
uint32_t * | pointer | ||
) |
Definition at line 328 of file DCCDataParser.cc.
References getHexString(), index(), and run_regression::ret.
std::string DCCTBDataParser::index | ( | uint32_t | position | ) |
Definition at line 287 of file DCCDataParser.cc.
Referenced by getIndexedData().
|
inline |
Get method for DCCTBDataMapper
Definition at line 179 of file DCCDataParser.h.
References mapper_.
Referenced by DCCTBEventBlock::DCCTBEventBlock(), DCCTBSRPBlock::DCCTBSRPBlock(), DCCTBTCCBlock::DCCTBTCCBlock(), DCCTBTowerBlock::DCCTBTowerBlock(), DCCTBTrailerBlock::DCCTBTrailerBlock(), and DCCTBXtalBlock::DCCTBXtalBlock().
|
inline |
Definition at line 185 of file DCCDataParser.h.
References parameters.
Referenced by computeBlockSizes(), and DCCTBSRPBlock::DCCTBSRPBlock().
|
inline |
Definition at line 183 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBDataMapper::buildTCCFields(), and computeBlockSizes().
|
inline |
Definition at line 184 of file DCCDataParser.h.
References parameters.
Referenced by computeBlockSizes(), DCCTBTCCBlock::DCCTBTCCBlock(), DCCTBTCCBlock::triggerFlags(), and DCCTBTCCBlock::triggerSamples().
|
inline |
Definition at line 182 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBDataMapper::buildXtalFields(), DCCTBTowerBlock::parseXtalData(), and DCCTBXtalBlock::xtalDataSamples().
void DCCTBDataParser::parseBuffer | ( | uint32_t * | buffer, |
uint32_t | bufferSize, | ||
bool | singleEvent = false |
||
) |
Parse data from a buffer
Definition at line 114 of file DCCDataParser.cc.
References buffer_, checkEventLength(), dccEvents_, EMPTYEVENTSIZE, eventErrors_, events_, getDecString(), parseInternalData_, processedEvent_, and resetErrorCounters().
Referenced by EcalTB07DaqFormatter::interpretRawData(), EcalTBDaqFormatter::interpretRawData(), and parseFile().
void DCCTBDataParser::parseFile | ( | std::string | fileName, |
bool | singleEvent = false |
||
) |
Parse data from file
Definition at line 61 of file DCCDataParser.cc.
References buffer_, bufferSize_, convertXMLtoSQLite_cfg::fileName, i, analyzePatCOC_cfg::inputFile, parseBuffer(), and resetErrorCounters().
|
inline |
Get methods for parser parameters;
Definition at line 181 of file DCCDataParser.h.
References parameters.
void DCCTBDataParser::resetErrorCounters | ( | ) |
Reset Error Counters
Definition at line 23 of file DCCDataParser.cc.
References errors_.
Referenced by DCCTBDataParser(), parseBuffer(), and parseFile().
|
inline |
Set method for parser parameters
Definition at line 193 of file DCCDataParser.h.
References computeBlockSizes(), and parameters.
|
inline |
Get methods for block sizes
Definition at line 195 of file DCCDataParser.h.
References srpBlockSize_.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
inline |
Definition at line 187 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBSRPBlock::dataCheck().
|
inline |
Definition at line 188 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
inline |
Definition at line 189 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
inline |
Definition at line 190 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
inline |
Definition at line 191 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
inline |
Definition at line 196 of file DCCDataParser.h.
References tccBlockSize_.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
protected |
Definition at line 145 of file DCCDataParser.h.
Referenced by getBuffer(), parseBuffer(), and parseFile().
|
protected |
Definition at line 146 of file DCCDataParser.h.
Referenced by parseFile().
|
protected |
Definition at line 155 of file DCCDataParser.h.
Referenced by dccEvents(), parseBuffer(), and ~DCCTBDataParser().
|
protected |
Definition at line 161 of file DCCDataParser.h.
Referenced by debug().
|
protected |
Definition at line 162 of file DCCDataParser.h.
Referenced by checkEventLength(), errorCounters(), and resetErrorCounters().
|
protected |
Definition at line 152 of file DCCDataParser.h.
Referenced by parseBuffer().
|
protected |
Definition at line 158 of file DCCDataParser.h.
Referenced by checkEventLength(), events(), and parseBuffer().
|
protected |
Definition at line 153 of file DCCDataParser.h.
Referenced by DCCTBDataParser(), mapper(), and ~DCCTBDataParser().
|
protected |
Definition at line 163 of file DCCDataParser.h.
Referenced by dccId(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::inputTags(), numbSRF(), numbTriggerSamples(), numbTTs(), numbXtalSamples(), parserParameters(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::properties(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::recursePSetProperties(), setParameters(), srpId(), tcc1Id(), tcc2Id(), tcc3Id(), and tcc4Id().
|
protected |
Definition at line 160 of file DCCDataParser.h.
Referenced by parseBuffer().
|
protected |
Definition at line 151 of file DCCDataParser.h.
Referenced by parseBuffer().
|
protected |
Definition at line 148 of file DCCDataParser.h.
Referenced by computeBlockSizes(), and srpBlockSize().
|
protected |
Definition at line 149 of file DCCDataParser.h.
Referenced by computeBlockSizes(), and tccBlockSize().