Skip to content

Commit 2ce2672

Browse files
committed
Signal as error if GBTTrailer->packetDone missing, still account data
1 parent 908cafe commit 2ce2672

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/GBTLink.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ GBTLink::CollectedDataStatus GBTLink::collectROFCableData(const Mapping& chmap)
184184
status = None;
185185
auto* currRawPiece = rawData.currentPiece();
186186
GBTLink::ErrorType errRes = GBTLink::NoError;
187+
bool expectPacketDone = false;
187188
while (currRawPiece) { // we may loop over multiple CRU page
188189
if (dataOffset >= currRawPiece->size) {
189190
dataOffset = 0; // start of the RDH
@@ -266,11 +267,12 @@ GBTLink::CollectedDataStatus GBTLink::collectROFCableData(const Mapping& chmap)
266267
printCalibrationWord(gbtC);
267268
}
268269
dataOffset += GBTPaddedWordLength;
270+
LOGP(DEBUG, "SetCalibData for RU:{} at bc:{}/orb:{} : [{}/{}]", ruPtr->ruSWID, gbtTrg->bc, gbtTrg->orbit, gbtC->calibCounter, gbtC->calibUserField);
269271
ruPtr->calibData = {gbtC->calibCounter, gbtC->calibUserField};
270272
}
271273
}
272274
auto gbtD = reinterpret_cast<const o2::itsmft::GBTData*>(&currRawPiece->data[dataOffset]);
273-
275+
expectPacketDone = true;
274276
while (!gbtD->isDataTrailer()) { // start reading real payload
275277
nw++;
276278
if (verbosity >= VerboseData) {
@@ -321,6 +323,10 @@ GBTLink::CollectedDataStatus GBTLink::collectROFCableData(const Mapping& chmap)
321323
return (status = DataSeen);
322324
}
323325

326+
if (expectPacketDone) { // no trailer with packet done was encountered, register error
327+
GBTLINK_DECODE_ERRORCHECK(errRes, checkErrorsPacketDoneMissing(nullptr, false));
328+
return (status = DataSeen);
329+
}
324330
return (status = StoppedOnEndOfData);
325331
}
326332

Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/RUDecodeData.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ template <class Mapping>
7171
int RUDecodeData::decodeROF(const Mapping& mp)
7272
{
7373
nChipsFired = 0;
74-
calibData.clear();
7574
lastChipChecked = 0;
7675
int ntot = 0;
7776
auto* chipData = &chipsData[0];

0 commit comments

Comments
 (0)