AliMUONRawStreamTrackerHP::AliMUONRawStreamTrackerHP() :
TObject(),
-fEnableErrorLogger(kFALSE),
+ fEnableErrorLogger(kFALSE),
fDecoder(),
fDDL(0),
fBufferSize(8192),
fHadError(kFALSE),
fDone(kFALSE),
fDDLObject(NULL),
-fTotalNumberOfGlitchErrors(0),
-fTotalNumberOfParityErrors(0),
-fTotalNumberOfPaddingErrors(0)
+ fTotalNumberOfGlitchErrors(0),
+ fTotalNumberOfParityErrors(0),
+ fTotalNumberOfPaddingErrors(0),
+ fTotalNumberOfTokenLostErrors(0)
{
///
/// Default constructor.
AliMUONRawStreamTrackerHP::AliMUONRawStreamTrackerHP(AliRawReader* rawReader) :
-TObject(),
-fEnableErrorLogger(kFALSE),
+ TObject(),
+ fEnableErrorLogger(kFALSE),
fDecoder(),
fDDL(0),
fBufferSize(8192),
fkEndOfData(NULL),
fHadError(kFALSE),
fDone(kFALSE),
-fDDLObject(NULL),
-fTotalNumberOfGlitchErrors(0),
-fTotalNumberOfParityErrors(0),
-fTotalNumberOfPaddingErrors(0)
+ fDDLObject(NULL),
+ fTotalNumberOfGlitchErrors(0),
+ fTotalNumberOfParityErrors(0),
+ fTotalNumberOfPaddingErrors(0),
+ fTotalNumberOfTokenLostErrors(0)
{
///
/// Constructor with AliRawReader as argument.
fDecoder.MaxDSPs(),
fDecoder.MaxBusPatches()
);
-
- fDecoder.GetHandler().SetReader(rawReader);
+
+ fDecoder.GetHandler().SetReader(rawReader);
}
fDDL = 0;
fDone = kFALSE;
NextDDL();
- fTotalNumberOfGlitchErrors = 0;
- fTotalNumberOfPaddingErrors = 0;
- fTotalNumberOfParityErrors = 0;
+ fTotalNumberOfGlitchErrors = 0;
+ fTotalNumberOfPaddingErrors = 0;
+ fTotalNumberOfParityErrors = 0;
+ fTotalNumberOfTokenLostErrors = 0;
}
// handler we need to trap any memory allocation exception to be robust.
result = fDecoder.Decode(fBuffer, dataSize);
fHadError = (result == true ? kFALSE : kTRUE);
- fTotalNumberOfGlitchErrors += fDecoder.GetHandler().GlitchErrorCount();
- fTotalNumberOfParityErrors += fDecoder.GetHandler().ParityErrorCount();
+ fTotalNumberOfGlitchErrors += fDecoder.GetHandler().GlitchErrorCount();
+ fTotalNumberOfParityErrors += fDecoder.GetHandler().ParityErrorCount();
fTotalNumberOfPaddingErrors += fDecoder.GetHandler().PaddingErrorCount();
+ fTotalNumberOfTokenLostErrors += fDecoder.GetHandler().TokenLostCount();
}
catch (const std::bad_alloc&)
{
/// [out] \param manuId This is filled with the MANU ID of the digit.
/// [out] \param manuChannel This is filled with the MANU channel ID of the digit.
/// [out] \param adc This is filled with the ADC signal value of the digit.
- /// [in] \param skipParityErrors If this is kTRUE, we'll skip the buspatches that
- /// have some parity errors
+ /// [in] \param skipParityErrors If this is kTRUE, we'll skip the buspatches that
+ /// have some parity errors
/// \return kTRUE if we read another digit and kFALSE if we have read all the
/// digits already, i.e. at the end of the iteration.
if (fkCurrentData == NULL) return kFALSE;
- fDecoder.SendDataOnParityError(skipParityErrors);
-
retry:
// Check if we still have data to be returned for the current bus patch.
if (fkCurrentData != fkEndOfData)
{
fkCurrentData = fkCurrentBusPatch->GetData();
fkEndOfData = fkCurrentData + fkCurrentBusPatch->GetDataCount();
- if ( skipParityErrors )
- {
- Bool_t ok(kTRUE);
- for ( Int_t i = 0; i < fkCurrentBusPatch->GetLength() && ok; ++ i )
- {
- ok = fkCurrentBusPatch->IsParityOk(i);
- }
- if (!ok) fkCurrentData = fkEndOfData;
- }
+ if ( skipParityErrors )
+ {
+ Bool_t ok(kTRUE);
+ for ( Int_t i = 0; i < fkCurrentBusPatch->GetLength() && ok; ++ i )
+ {
+ ok = fkCurrentBusPatch->IsParityOk(i);
+ }
+ if (!ok) fkCurrentData = fkEndOfData;
+ }
goto retry;
}
}
///////////////////////////////////////////////////////////////////////////////
AliMUONRawStreamTrackerHP::AliDecoderEventHandler::AliDecoderEventHandler() :
-fRawReader(0x0),
+ fRawReader(0x0),
fBufferStart(NULL),
fBlockCount(0),
fBlocks(NULL),
fParityErrors(0),
fGlitchErrors(0),
fPaddingErrors(0),
+ fTokenLostErrors(0),
fWarnings(kTRUE),
- fMaxBlocks(),
- fMaxDsps(),
- fMaxBusPatches()
+ fMaxBlocks(),
+ fMaxDsps(),
+ fMaxBusPatches()
{
/// Default constructor initialises the internal parity flags buffer to
/// store 8192 elements. This array will grow dynamically if needed.
fBusPatches = new AliBusPatch[maxBlocks*maxDsps*maxBusPatches];
fEndOfBusPatches = fBusPatches;
- fMaxBlocks = maxBlocks;
- fMaxDsps = maxDsps;
- fMaxBusPatches = maxBusPatches;
+ fMaxBlocks = maxBlocks;
+ fMaxDsps = maxDsps;
+ fMaxBusPatches = maxBusPatches;
}
fParityErrors = 0;
fGlitchErrors = 0;
fPaddingErrors = 0;
+ fTokenLostErrors = 0;
// Check if we will have enough space in the fParityOk array.
// If we do not then we need to resize the array.
case kGlitchFound:
fGlitchErrors++;
message = Form(
- "Glitch error detected in DSP %d, skipping event ",
- fCurrentBlock->GetDspId()
+ "Glitch error detected in DSP %d (0x%X), skipping event ",
+ fCurrentBlock->GetDspId(), fCurrentBlock->GetDspId()
);
fRawReader->AddMajorErrorLog(error, message);
break;
);
fRawReader->AddMinorErrorLog(error, message);
break;
+
+ case kTokenLost:
+ fTokenLostErrors++;
+ word = *reinterpret_cast<const UInt_t*>(location);
+ message = Form(
+ "Lost token error detected in DSP %d (0x%X) with address 0x%X and code %d.",
+ fCurrentBlock->GetDspId(), fCurrentBlock->GetDspId(),
+ ((word & 0xFFFF0000) >> 16),
+ (word & 0xF)
+ );
+ fRawReader->AddMinorErrorLog(error, message);
+ break;
default:
message = Form(