#include <DCCTrailerBlock.h>
Public Member Functions | |
void | dataCheck () |
DCCTBTrailerBlock (DCCTBDataParser *parser, uint32_t *buffer, uint32_t numbBytes, uint32_t wToEnd, uint32_t wordEventOffset, uint32_t expectedLength, uint32_t expectedCRC) | |
Protected Types | |
enum | traillerFields { EOE = 0xA } |
Protected Attributes | |
uint32_t | expectedCRC_ |
uint32_t | expectedLength_ |
Definition at line 11 of file DCCTrailerBlock.h.
enum DCCTBTrailerBlock::traillerFields [protected] |
DCCTBTrailerBlock::DCCTBTrailerBlock | ( | DCCTBDataParser * | parser, |
uint32_t * | buffer, | ||
uint32_t | numbBytes, | ||
uint32_t | wToEnd, | ||
uint32_t | wordEventOffset, | ||
uint32_t | expectedLength, | ||
uint32_t | expectedCRC | ||
) |
Definition at line 4 of file DCCTrailerBlock.cc.
References dataCheck(), DCCTBBlockPrototype::errors_, DCCTBDataParser::mapper(), DCCTBBlockPrototype::mapperFields_, DCCTBBlockPrototype::parseData(), DCCTBBlockPrototype::parser_, and DCCTBDataMapper::trailerFields().
: DCCTBBlockPrototype(parser,"DCCTRAILER", buffer, numbBytes,wToEnd, wordEventOffset), expectedLength_(expectedLength){ errors_["TRAILER::EVENT LENGTH"] = 0 ; errors_["TRAILER::EOE"] = 0 ; errors_["TRAILER::CRC"] = 0 ; errors_["TRAILER::T"] = 0 ; // Get data fields from the mapper and retrieve data /////////////////////////////////////////// mapperFields_ = parser_->mapper()->trailerFields(); parseData(); // check internal data //// dataCheck(); }
void DCCTBTrailerBlock::dataCheck | ( | ) |
Definition at line 32 of file DCCTrailerBlock.cc.
References DCCTBBlockPrototype::blockError_, DCCTBBlockPrototype::checkDataField(), EOE, DCCTBBlockPrototype::errors_, DCCTBBlockPrototype::errorString_, expectedLength_, DCCTBBlockPrototype::name_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by DCCTBTrailerBlock().
{ std::string checkErrors(""); std::pair<bool,std::string> res; res = checkDataField("EVENT LENGTH",expectedLength_); if(!res.first){ checkErrors += res.second; (errors_["TRAILER::EVENT LENGTH"])++; } res = checkDataField("EOE",EOE); if(!res.first){ checkErrors += res.second; (errors_["TRAILER::EOE"])++; } res = checkDataField("T",0); if(!res.first){ checkErrors += res.second; (errors_["TRAILER::T"])++; } //checkErrors += checkDataField("CRC",expectedCRC_); if(checkErrors!=""){ errorString_ +="\n ======================================================================\n"; errorString_ += std::string(" ") + name_ + std::string(" data fields checks errors : ") ; errorString_ += checkErrors ; errorString_ += "\n ======================================================================"; blockError_ = true; } }
uint32_t DCCTBTrailerBlock::expectedCRC_ [protected] |
Definition at line 32 of file DCCTrailerBlock.h.
uint32_t DCCTBTrailerBlock::expectedLength_ [protected] |
Definition at line 31 of file DCCTrailerBlock.h.
Referenced by dataCheck().