40 const bool isCRCcorrect = (CRC_BIT == 0);
43 errorsInEvent = (errorsInEvent || !isCRCcorrect);
52 const bool fedHeaderCorrect = fedHeader.
check();
57 LogDebug(
"PixelDataFormatter::interpretRawData, fedHeader.sourceID() != fedId")
58 <<
", sourceID = " << fedHeader.
sourceID() <<
", fedId = " <<
fedId <<
", errorType = " << errorType;
66 FEDTrailer fedTrailer(reinterpret_cast<const unsigned char*>(trailer));
67 const bool fedTrailerCorrect = fedTrailer.
check();
68 if (!fedTrailerCorrect) {
71 LogError(
"FedTrailerCheck") <<
"fedTrailer.check failed, Fed: " <<
fedId <<
", errorType = " << errorType;
76 LogError(
"FedTrailerLenght") <<
"fedTrailer.fragmentLength()!= nWords !! Fed: " <<
fedId 77 <<
", errorType = " << errorType;
102 debugMessage =
"invalid channel Id";
107 debugMessage =
"invalid ROC Id";
112 debugMessage =
"invalid dcol/pixel value";
117 debugMessage =
"dcol/pixel read out of order";
123 LogDebug(
"ErrorChecker::conversionError") <<
"Fed:" <<
fedId << debugMessage <<
"(errorType =" << errorType <<
")";
125 LogDebug(
"ErrorChecker::conversionError") <<
"cabling check returned unexpected result, status =" <<
status;
void conversionError(int fedId, const SiPixelFrameConverter *converter, int status, Word32 &errorWord, SiPixelFormatterErrors &errors) const
constexpr cms_uint32_t dummyDetId
virtual cms_uint32_t errorDetId(const SiPixelFrameConverter *converter, int errorType, const Word32 &word) const =0
Log< level::Error, false > LogError
uint32_t fragmentLength() const
The length of the event fragment counted in 64-bit words including header and trailer.
void setErrorStatus(bool ErrorStatus)
constexpr uint64_t CRC_mask
bool checkHeader(bool &errorsInEvent, int fedId, const Word64 *header, SiPixelFormatterErrors &errors) const
bool checkTrailer(bool &errorsInEvent, int fedId, unsigned int nWords, const Word64 *trailer, SiPixelFormatterErrors &errors) const
unsigned int cms_uint32_t
constexpr uint32_t CRC_shift
bool checkCRC(bool &errorsInEvent, int fedId, const Word64 *trailer, SiPixelFormatterErrors &errors) const
int getConversionErrorTypeAndIssueLogMessage(int status, int fedId) const
bool check() const
Check that the trailer is OK.
bool moreTrailers() const
Pixel error – collection of errors and error information.
void addErrorToCollectionDummy(int errorType, int fedId, Word64 word, SiPixelFormatterErrors &errors) const