18 using namespace sipixelobjects;
19 using namespace sipixelconstants;
40 const bool isCRCcorrect = (CRC_BIT == 0);
43 errorsInEvent = (errorsInEvent || !isCRCcorrect);
51 FEDHeader fedHeader(reinterpret_cast<const unsigned char*>(header));
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;
93 errors[detId].push_back(error);
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;
constexpr cms_uint32_t dummyDetId
virtual cms_uint32_t errorDetId(const SiPixelFrameConverter *converter, int errorType, const Word32 &word) const =0
bool check() const
Check that the trailer is OK.
bool moreTrailers() const
Log< level::Error, false > LogError
uint32_t fragmentLength() const
The length of the event fragment counted in 64-bit words including header and trailer.
bool checkHeader(bool &errorsInEvent, int fedId, const Word64 *header, SiPixelFormatterErrors &errors) const
void setErrorStatus(bool ErrorStatus)
constexpr uint64_t CRC_mask
unsigned int cms_uint32_t
void conversionError(int fedId, const SiPixelFrameConverter *converter, int status, Word32 &errorWord, SiPixelFormatterErrors &errors) const
constexpr uint32_t CRC_shift
bool checkCRC(bool &errorsInEvent, int fedId, const Word64 *trailer, SiPixelFormatterErrors &errors) const
int getConversionErrorTypeAndIssueLogMessage(int status, int fedId) const
void addErrorToCollectionDummy(int errorType, int fedId, Word64 word, SiPixelFormatterErrors &errors) const
bool checkTrailer(bool &errorsInEvent, int fedId, unsigned int nWords, const Word64 *trailer, SiPixelFormatterErrors &errors) const
Pixel error – collection of errors and error information.