#include <EventFilter/EcalTBRawToDigi/src/DCCTrailerBlock.h>
Public Member Functions | |
void | dataCheck () |
DCCTBTrailerBlock (DCCTBDataParser *parser, ulong *buffer, ulong numbBytes, ulong wToEnd, ulong wordEventOffset, ulong expectedLength, ulong expectedCRC) | |
Protected Types | |
enum | traillerFields { EOE = 0xA } |
Protected Attributes | |
ulong | expectedCRC_ |
ulong | expectedLength_ |
Definition at line 11 of file DCCTrailerBlock.h.
enum DCCTBTrailerBlock::traillerFields [protected] |
DCCTBTrailerBlock::DCCTBTrailerBlock | ( | DCCTBDataParser * | parser, | |
ulong * | buffer, | |||
ulong | numbBytes, | |||
ulong | wToEnd, | |||
ulong | wordEventOffset, | |||
ulong | expectedLength, | |||
ulong | expectedCRC | |||
) |
Definition at line 4 of file DCCTrailerBlock.cc.
References dataCheck(), DCCTBBlockPrototype::errors_, DCCTBDataParser::mapper(), DCCTBBlockPrototype::mapperFields_, DCCTBBlockPrototype::parseData(), DCCTBBlockPrototype::parser_, and DCCTBDataMapper::trailerFields().
00012 : DCCTBBlockPrototype(parser,"DCCTRAILER", buffer, numbBytes,wToEnd, wordEventOffset), 00013 expectedLength_(expectedLength){ 00014 00015 errors_["TRAILER::EVENT LENGTH"] = 0 ; 00016 errors_["TRAILER::EOE"] = 0 ; 00017 errors_["TRAILER::CRC"] = 0 ; 00018 errors_["TRAILER::T"] = 0 ; 00019 00020 // Get data fields from the mapper and retrieve data /////////////////////////////////////////// 00021 mapperFields_ = parser_->mapper()->trailerFields(); 00022 parseData(); 00024 00025 // check internal data //// 00026 dataCheck(); 00028 00029 }
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 res.
Referenced by DCCTBTrailerBlock().
00032 { 00033 00034 std::string checkErrors(""); 00035 00036 std::pair<bool,std::string> res; 00037 00038 res = checkDataField("EVENT LENGTH",expectedLength_); 00039 if(!res.first){ checkErrors += res.second; (errors_["TRAILER::EVENT LENGTH"])++; } 00040 00041 res = checkDataField("EOE",EOE); 00042 if(!res.first){ checkErrors += res.second; (errors_["TRAILER::EOE"])++; } 00043 00044 res = checkDataField("T",0); 00045 if(!res.first){ checkErrors += res.second; (errors_["TRAILER::T"])++; } 00046 00047 //checkErrors += checkDataField("CRC",expectedCRC_); 00048 00049 if(checkErrors!=""){ 00050 errorString_ +="\n ======================================================================\n"; 00051 errorString_ += std::string(" ") + name_ + std::string(" data fields checks errors : ") ; 00052 errorString_ += checkErrors ; 00053 errorString_ += "\n ======================================================================"; 00054 blockError_ = true; 00055 } 00056 }
ulong DCCTBTrailerBlock::expectedCRC_ [protected] |
Definition at line 32 of file DCCTrailerBlock.h.
ulong DCCTBTrailerBlock::expectedLength_ [protected] |