18 using namespace sipixelobjects;
46 includeErrors =
false;
51 includeErrors = ErrorStatus;
57 if (CRC_BIT == 0)
return true;
69 FEDHeader fedHeader( reinterpret_cast<const unsigned char*>(header));
70 if ( !fedHeader.
check() )
return false;
71 if ( fedHeader.
sourceID() != fedId) {
72 LogDebug(
"PixelDataFormatter::interpretRawData, fedHeader.sourceID() != fedId")
73 <<
", sourceID = " <<fedHeader.
sourceID()
74 <<
", fedId = "<<fedId<<
", errorType = 32";
87 FEDTrailer fedTrailer(reinterpret_cast<const unsigned char*>(trailer));
88 if ( !fedTrailer.
check()) {
95 LogError(
"PixelDataFormatter::interpretRawData, fedTrailer.check: ")
96 <<
"fedTrailer.check failed, Fed: " << fedId <<
", errorType = 33";
99 if ( fedTrailer.
lenght()!= nWords) {
100 LogError(
"PROBLEM in PixelDataFormatter, fedTrailer.lenght()!= nWords !!")<<
" Fed: " << fedId <<
", errorType = 34";
101 errorsInEvent =
true;
117 LogDebug(
"")<<
" invalid ROC=25 found (errorType=25)";
118 errorsInEvent =
true;
130 LogDebug(
"")<<
" error fifo nearly full (errorType=28)";
131 errorsInEvent =
true;
135 LogDebug(
"")<<
" timeout on a channel (errorType=29)";
136 errorsInEvent =
true;
140 LogDebug(
"")<<
" TBM error trailer (errorType=30)";
141 errorsInEvent =
true;
145 LogDebug(
"")<<
" event number error (errorType=31)";
146 errorsInEvent =
true;
149 default:
return true;
155 detId = errorDetId(converter, errorType, errorWord);
156 errors[detId].push_back(error);
165 LogDebug(
"ErrorChecker::conversionError") <<
" Fed: " << fedId <<
" invalid channel Id (errorType=35)";
169 uint32_t detId = errorDetId(converter, errorType, errorWord);
170 errors[detId].push_back(error);
175 LogDebug(
"ErrorChecker::conversionError")<<
" Fed: " << fedId <<
" invalid ROC Id (errorType=36)";
179 uint32_t detId = errorDetId(converter, errorType, errorWord);
180 errors[detId].push_back(error);
185 LogDebug(
"ErrorChecker::conversionError")<<
" Fed: " << fedId <<
" invalid dcol/pixel value (errorType=37)";
189 uint32_t detId = errorDetId(converter, errorType, errorWord);
190 errors[detId].push_back(error);
195 LogDebug(
"ErrorChecker::conversionError")<<
" Fed: " << fedId <<
" dcol/pixel read out of order (errorType=38)";
199 uint32_t detId = errorDetId(converter, errorType, errorWord);
200 errors[detId].push_back(error);
204 default:
LogDebug(
"ErrorChecker::conversionError")<<
" cabling check returned unexpected result, status = "<<
status;
210 int errorType,
const Word32 & word)
const
217 case 30 :
case 31:
case 36: {
bool checkTrailer(bool &errorsInEvent, int fedId, int nWords, const Word64 *trailer, Errors &errors)
const ErrorChecker::Word32 DCOL_mask
bool checkROC(bool &errorsInEvent, int fedId, const SiPixelFrameConverter *converter, Word32 &errorWord, Errors &errors)
bool checkCRC(bool &errorsInEvent, int fedId, const Word64 *trailer, Errors &errors)
const ErrorChecker::Word32 ROC_mask
std::map< uint32_t, DetErrors > Errors
const ErrorChecker::Word32 PXID_mask
void setErrorStatus(bool ErrorStatus)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int lenght()
The length of the event fragment counted in 64-bit words including header and trailer.
void conversionError(int fedId, const SiPixelFrameConverter *converter, int status, Word32 &errorWord, Errors &errors)
const ErrorChecker::Word64 CRC_mask
const ErrorChecker::Word32 ERROR_mask
const ErrorChecker::Word32 LINK_mask
int toDetector(const sipixelobjects::ElectronicIndex &cabling, sipixelobjects::DetectorIndex &detector) const
uint32_t errorDetId(const SiPixelFrameConverter *converter, int errorType, const Word32 &word) const
Pixel error – collection of errors and error information.
const uint32_t dummyDetId
bool checkHeader(bool &errorsInEvent, int fedId, const Word64 *header, Errors &errors)