+ bool logAsMajorError = true;
+
+ // Build the detailed part of the error message if high detail selected.
+ const char* detail = "";
+ if (fRawStream->GetLoggingDetailLevel() == kHighErrorDetail)
+ {
+ bool blockPtrOk = fBlockCount > 0;
+ bool dspPtrOk = blockPtrOk ? fCurrentBlock->GetDspCount() > 0 : false;
+ bool buspatchPtrOk = dspPtrOk ? fCurrentDSP->GetBusPatchCount() > 0 : false;
+ // We subtract 1 from the current numbers of blocks, DSPs
+ // and bus patches to get the iBlock, iDsp and iBus indices.
+ detail = Form(
+ "At byte %lu in DDL %d, event %d, iBlock %d, iDsp %d [DSP ID: %d (0x%X)],"
+ " iBus %d [bus patch ID: %d (0x%X)].",
+ (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeader),
+ AliDAQ::DdlID("MUONTRK", fRawStream->GetDDL()),
+ fRawStream->GetReader()->GetEventIndex(),
+ int(fBlockCount)-1,
+ blockPtrOk ? int(fCurrentBlock->GetDspCount())-1 : -1,
+ blockPtrOk ? fCurrentBlock->GetDspId() : -1,
+ blockPtrOk ? fCurrentBlock->GetDspId() : -1,
+ dspPtrOk ? int(fCurrentDSP->GetBusPatchCount())-1 : -1,
+ buspatchPtrOk ? fCurrentBusPatch->GetBusPatchId() : -1,
+ buspatchPtrOk ? fCurrentBusPatch->GetBusPatchId() : -1
+ );
+ }
+
+ // Build the log message.