21 LogDebug(
"CRCCheck") <<
"CRC check failed, errorType = 39";
24 errors[
dummyDetId].emplace_back(*trailer, errorType, fedId);
30 FEDHeader fedHeader(reinterpret_cast<const unsigned char*>(header));
31 if (!fedHeader.
check())
34 LogDebug(
"CTPPSPixelDataFormatter::interpretRawData, fedHeader.sourceID() != fedId")
35 <<
", sourceID = " << fedHeader.
sourceID() <<
", fedId = " << fedId <<
", errorType = 32";
39 errors[
dummyDetId].emplace_back(*header, errorType, fedId);
46 bool& errorsInEvent,
int fedId,
unsigned int nWords,
const Word64* trailer,
Errors& errors)
const {
47 FEDTrailer fedTrailer(reinterpret_cast<const unsigned char*>(trailer));
48 if (!fedTrailer.
check()) {
51 errors[
dummyDetId].emplace_back(*trailer, errorType, fedId);
54 LogDebug(
"FedTrailerCheck") <<
"fedTrailer.check failed, Fed: " << fedId <<
", errorType = 33";
58 LogDebug(
"FedTrailerLenght") <<
"fedTrailer.fragmentLength()!= nWords !! Fed: " << fedId <<
", errorType = 34";
62 errors[
dummyDetId].emplace_back(*trailer, errorType, fedId);
69 bool& errorsInEvent,
int fedId, uint32_t iD,
const Word32& errorWord,
Errors& errors)
const {
76 LogDebug(
"") <<
" invalid ROC=25 found (errorType=25)";
81 LogDebug(
"") <<
" gap word found (errorType=26)";
85 LogDebug(
"") <<
" dummy word found (errorType=27)";
89 LogDebug(
"") <<
" error fifo nearly full (errorType=28)";
94 LogDebug(
"") <<
" timeout on a channel (errorType=29)";
97 LogDebug(
"") <<
" ...first errorType=29 error, this gets masked out";
103 LogDebug(
"") <<
" TBM error trailer (errorType=30)";
104 errorsInEvent =
true;
108 LogDebug(
"") <<
" event number error (errorType=31)";
109 errorsInEvent =
true;
116 if (includeErrors_) {
118 if (errorType == 30) {
119 uint32_t stateMach_bits = 4;
120 uint32_t stateMach_shift = 8;
121 uint32_t stateMach_mask = ~(~uint32_t(0) << stateMach_bits);
122 uint32_t stateMach = (errorWord >> stateMach_shift) & stateMach_mask;
123 if (stateMach == 4 || stateMach == 9)
128 errors[iD].emplace_back(errorWord, errorType, fedId);
140 LogDebug(
"ErrorChecker::conversionError") <<
" Fed: " << fedId <<
" invalid channel Id (errorType=35)";
145 LogDebug(
"ErrorChecker::conversionError") <<
" Fed: " << fedId <<
" invalid ROC Id (errorType=36)";
150 LogDebug(
"ErrorChecker::conversionError") <<
" Fed: " << fedId <<
" invalid dcol/pixel value (errorType=37)";
156 LogDebug(
"ErrorChecker::conversionError") <<
" cabling check returned unexpected result, status = " <<
state;
159 if (includeErrors_ && errorType > 0)
160 errors[iD].emplace_back(errorWord, errorType, fedId);
constexpr cms_uint32_t dummyDetId
void conversionError(int fedId, uint32_t iD, const State &state, const Word32 &errorWord, Errors &errors) const
bool checkCRC(bool &errorsInEvent, int fedId, const Word64 *trailer, Errors &errors) const
bool checkHeader(bool &errorsInEvent, int fedId, const Word64 *header, Errors &errors) const
constexpr uint32_t ROC_shift
bool check() const
Check that the trailer is OK.
bool moreTrailers() const
std::map< uint32_t, DetErrors > Errors
uint32_t fragmentLength() const
The length of the event fragment counted in 64-bit words including header and trailer.
constexpr uint32_t ERROR_mask
constexpr uint64_t CRC_mask
constexpr uint32_t OMIT_ERR_shift
void setErrorStatus(bool errorStatus)
constexpr uint32_t CRC_shift
static constexpr Word32 dummyDetId
constexpr uint32_t OMIT_ERR_mask
bool checkTrailer(bool &errorsInEvent, int fedId, unsigned int nWords, const Word64 *trailer, Errors &errors) const
bool checkROC(bool &errorsInEvent, int fedId, uint32_t iD, const Word32 &errorWord, Errors &errors) const