|
|
Go to the documentation of this file.
21 constexpr
int CRC_bits = 1;
29 constexpr
int CRC_shift = 2;
51 int CRC_BIT = (*trailer >> CRC_shift) & CRC_mask;
65 if (!fedHeader.
check())
68 LogDebug(
"PixelDataFormatter::interpretRawData, fedHeader.sourceID() != fedId")
69 <<
", sourceID = " << fedHeader.
sourceID() <<
", fedId = " <<
fedId <<
", errorType = 32";
82 FEDTrailer fedTrailer(reinterpret_cast<const unsigned char*>(trailer));
83 if (!fedTrailer.
check()) {
90 LogError(
"FedTrailerCheck") <<
"fedTrailer.check failed, Fed: " <<
fedId <<
", errorType = 33";
94 LogError(
"FedTrailerLenght") <<
"fedTrailer.fragmentLength()!= nWords !! Fed: " <<
fedId <<
", errorType = 34";
113 LIKELY(errorType < 25)
return true;
117 LogDebug(
"") <<
" invalid ROC=25 found (errorType=25)";
118 errorsInEvent =
true;
128 LogDebug(
"") <<
" error fifo nearly full (errorType=28)";
129 errorsInEvent =
true;
133 LogDebug(
"") <<
" timeout on a channel (errorType=29)";
134 errorsInEvent =
true;
136 LogDebug(
"") <<
" ...first errorType=29 error, this gets masked out";
142 LogDebug(
"") <<
" TBM error trailer (errorType=30)";
143 errorsInEvent =
true;
147 LogDebug(
"") <<
" event number error (errorType=31)";
148 errorsInEvent =
true;
157 if (errorType == 30) {
158 int StateMach_bits = 4;
159 int StateMach_shift = 8;
160 uint32_t StateMach_mask = ~(~uint32_t(0) << StateMach_bits);
161 int StateMach = (errorWord >> StateMach_shift) & StateMach_mask;
162 if (StateMach == 4 || StateMach == 9)
169 detId = errorDetId(
converter, errorType, errorWord);
179 LogDebug(
"ErrorCheckerPhase0::conversionError") <<
" Fed: " <<
fedId <<
" invalid channel Id (errorType=35)";
189 LogDebug(
"ErrorCheckerPhase0::conversionError") <<
" Fed: " <<
fedId <<
" invalid ROC Id (errorType=36)";
199 LogDebug(
"ErrorCheckerPhase0::conversionError")
200 <<
" Fed: " <<
fedId <<
" invalid dcol/pixel value (errorType=37)";
210 LogDebug(
"ErrorCheckerPhase0::conversionError")
211 <<
" Fed: " <<
fedId <<
" dcol/pixel read out of order (errorType=38)";
221 LogDebug(
"ErrorCheckerPhase0::conversionError")
222 <<
" cabling check returned unexpected result, status = " <<
status;
257 const int DB0_shift = 0;
258 const int DB1_shift = DB0_shift + 1;
259 const int DB2_shift = DB1_shift + 1;
260 const int DB3_shift = DB2_shift + 1;
261 const int DB4_shift = DB3_shift + 1;
264 int CH1 = (
word >> DB0_shift) & DataBit_mask;
265 int CH2 = (
word >> DB1_shift) & DataBit_mask;
266 int CH3 = (
word >> DB2_shift) & DataBit_mask;
267 int CH4 = (
word >> DB3_shift) & DataBit_mask;
268 int CH5 = (
word >> DB4_shift) & DataBit_mask;
272 int BLOCK = (
word >> BLOCK_shift) & BLOCK_mask;
273 int localCH = 1 * CH1 + 2 * CH2 + 3 * CH3 + 4 * CH4 + 5 * CH5;
275 chanNmbr = (BLOCK / 2) * 9 + localCH;
277 chanNmbr = ((BLOCK - 1) / 2) * 9 + 4 + localCH;
278 if ((chanNmbr < 1) || (chanNmbr > 36))
285 cabling.
link = chanNmbr;
unsigned int cms_uint32_t
Pixel error – collection of errors and error information.
bool checkTrailer(bool &errorsInEvent, int fedId, unsigned int nWords, const Word64 *trailer, Errors &errors) override
void conversionError(int fedId, const SiPixelFrameConverter *converter, int status, Word32 &errorWord, Errors &errors) override
const uint32_t OMIT_ERR_mask
const uint32_t OMIT_ERR_shift
bool check() const
Check that the trailer is OK.
const uint32_t OMIT_ERR_bits
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
bool checkHeader(bool &errorsInEvent, int fedId, const Word64 *header, Errors &errors) override
const uint32_t PXID_shift
bool moreTrailers() const
const uint32_t LINK_shift
Log< level::Error, false > LogError
cms_uint32_t errorDetId(const SiPixelFrameConverter *converter, int errorType, const Word32 &word) const override
bool checkCRC(bool &errorsInEvent, int fedId, const Word64 *trailer, Errors &errors) override
const uint32_t DCOL_shift
bool checkROC(bool &errorsInEvent, int fedId, const SiPixelFrameConverter *converter, const SiPixelFedCabling *theCablingTree, Word32 &errorWord, Errors &errors) override
std::map< cms_uint32_t, DetErrors > Errors
void setErrorStatus(bool ErrorStatus) override
const uint32_t ERROR_mask
uint32_t fragmentLength() const
The length of the event fragment counted in 64-bit words including header and trailer.