#include <DCCDataParser.h>
Public Types | |
enum | DCCDataParserGlobalFields { EMPTYEVENTSIZE = 32 } |
Public Member Functions | |
std::pair< uint32_t, uint32_t > | checkEventLength (const uint32_t *pointerToEvent, uint32_t bytesToEnd, bool singleEvent=false) |
std::vector< DCCTBEventBlock * > & | dccEvents () |
uint32_t | dccId () |
DCCTBDataParser (const 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< const uint32_t *, uint32_t > > > | events () |
const 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 (const 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 (const 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 | |
const 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< const 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 25 of file DCCDataParser.h.
|
protected |
Enumerator | |
---|---|
EVENTLENGTHMASK | |
BOEBEGIN | |
BOEMASK | |
BOE | |
EOEBEGIN | |
EOEMASK | |
EOE |
Definition at line 159 of file DCCDataParser.h.
DCCTBDataParser::DCCTBDataParser | ( | const 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 7 of file DCCDataParser.cc.
References computeBlockSizes(), mapper_, and resetErrorCounters().
DCCTBDataParser::~DCCTBDataParser | ( | ) |
Class destructor
Definition at line 331 of file DCCDataParser.cc.
References dccEvents_, and mapper_.
std::pair< uint32_t, uint32_t > DCCTBDataParser::checkEventLength | ( | const 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 206 of file DCCDataParser.cc.
References BOE, BOEBEGIN, BOEMASK, EMPTYEVENTSIZE, EOEBEGIN, EOEMASK, errors_, EVENTLENGTHMASK, events_, getDecString(), mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by parseBuffer().
|
protected |
Definition at line 29 of file DCCDataParser.cc.
References l1trig_cff::nTT, numbSRF(), numbTriggerSamples(), numbTTs(), srpBlockSize_, and tccBlockSize_.
Referenced by DCCTBDataParser(), and setParameters().
|
inline |
Get method for DCCEventBlocks vector
Definition at line 195 of file DCCDataParser.h.
References dccEvents_.
Referenced by EcalTBDaqFormatter::interpretRawData(), and EcalTB07DaqFormatter::interpretRawData().
|
inline |
|
inline |
Get methods for debug flag
Definition at line 194 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 196 of file DCCDataParser.h.
References errors_.
|
inline |
Get method for events
Definition at line 197 of file DCCDataParser.h.
References events_.
|
inline |
Retrieves a pointer to the data buffer
Definition at line 125 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 290 of file DCCDataParser.cc.
References edmScanValgrind::buffer, data, and AlCaHLTBitMon_QueryRunRegistry::string.
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 | ) |
Definition at line 302 of file DCCDataParser.cc.
References edmScanValgrind::buffer, data, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getIndexedData().
std::string DCCTBDataParser::getIndexedData | ( | uint32_t | indexed, |
uint32_t * | pointer | ||
) |
Definition at line 313 of file DCCDataParser.cc.
References getHexString(), index(), position, runTheMatrix::ret, and AlCaHLTBitMon_QueryRunRegistry::string.
std::string DCCTBDataParser::index | ( | uint32_t | position | ) |
Definition at line 277 of file DCCDataParser.cc.
References position, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getIndexedData(), and BeautifulSoup.PageElement::insert().
|
inline |
Get method for DCCTBDataMapper
Definition at line 172 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 178 of file DCCDataParser.h.
References parameters.
Referenced by computeBlockSizes(), and DCCTBSRPBlock::DCCTBSRPBlock().
|
inline |
Definition at line 176 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBDataMapper::buildTCCFields(), and computeBlockSizes().
|
inline |
Definition at line 177 of file DCCDataParser.h.
References parameters.
Referenced by computeBlockSizes(), DCCTBTCCBlock::DCCTBTCCBlock(), DCCTBTCCBlock::triggerFlags(), and DCCTBTCCBlock::triggerSamples().
|
inline |
Definition at line 175 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBDataMapper::buildXtalFields(), DCCTBTowerBlock::parseXtalData(), and DCCTBXtalBlock::xtalDataSamples().
void DCCTBDataParser::parseBuffer | ( | const uint32_t * | buffer, |
uint32_t | bufferSize, | ||
bool | singleEvent = false |
||
) |
Parse data from a buffer
Definition at line 104 of file DCCDataParser.cc.
References edmScanValgrind::buffer, buffer_, checkEventLength(), dccEvents_, EMPTYEVENTSIZE, eventErrors_, events_, getDecString(), parseInternalData_, processedEvent_, resetErrorCounters(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by EcalTBDaqFormatter::interpretRawData(), EcalTB07DaqFormatter::interpretRawData(), and parseFile().
void DCCTBDataParser::parseFile | ( | std::string | fileName, |
bool | singleEvent = false |
||
) |
Parse data from file
Definition at line 57 of file DCCDataParser.cc.
References bufferSize_, MillePedeFileConverter_cfg::fileName, mps_fire::i, makeListRunsInFiles::inputFile, makeListRunsInFiles::myData, parseBuffer(), resetErrorCounters(), and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Get methods for parser parameters;
Definition at line 174 of file DCCDataParser.h.
References parameters.
void DCCTBDataParser::resetErrorCounters | ( | ) |
Reset Error Counters
Definition at line 18 of file DCCDataParser.cc.
References errors_.
Referenced by DCCTBDataParser(), parseBuffer(), and parseFile().
|
inline |
Set method for parser parameters
Definition at line 186 of file DCCDataParser.h.
References computeBlockSizes(), and parameters.
|
inline |
Get methods for block sizes
Definition at line 191 of file DCCDataParser.h.
References srpBlockSize_.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
inline |
Definition at line 180 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBSRPBlock::dataCheck().
|
inline |
Definition at line 181 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
inline |
Definition at line 182 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
inline |
Definition at line 183 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
inline |
Definition at line 184 of file DCCDataParser.h.
References parameters.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
inline |
Definition at line 192 of file DCCDataParser.h.
References tccBlockSize_.
Referenced by DCCTBEventBlock::DCCTBEventBlock().
|
protected |
Definition at line 139 of file DCCDataParser.h.
Referenced by getBuffer(), and parseBuffer().
|
protected |
Definition at line 140 of file DCCDataParser.h.
Referenced by parseFile().
|
protected |
Definition at line 149 of file DCCDataParser.h.
Referenced by dccEvents(), parseBuffer(), and ~DCCTBDataParser().
|
protected |
Definition at line 155 of file DCCDataParser.h.
Referenced by debug().
|
protected |
Definition at line 156 of file DCCDataParser.h.
Referenced by checkEventLength(), errorCounters(), and resetErrorCounters().
|
protected |
Definition at line 146 of file DCCDataParser.h.
Referenced by parseBuffer().
|
protected |
Definition at line 152 of file DCCDataParser.h.
Referenced by checkEventLength(), events(), and parseBuffer().
|
protected |
Definition at line 147 of file DCCDataParser.h.
Referenced by DCCTBDataParser(), mapper(), and ~DCCTBDataParser().
|
protected |
Definition at line 157 of file DCCDataParser.h.
Referenced by dccId(), numbSRF(), numbTriggerSamples(), numbTTs(), numbXtalSamples(), parserParameters(), setParameters(), srpId(), tcc1Id(), tcc2Id(), tcc3Id(), and tcc4Id().
|
protected |
Definition at line 154 of file DCCDataParser.h.
Referenced by parseBuffer().
|
protected |
Definition at line 145 of file DCCDataParser.h.
Referenced by parseBuffer().
|
protected |
Definition at line 142 of file DCCDataParser.h.
Referenced by computeBlockSizes(), and srpBlockSize().
|
protected |
Definition at line 143 of file DCCDataParser.h.
Referenced by computeBlockSizes(), and tccBlockSize().