Adding the '-dontprintwrongeventerror' option to the trigger reconstruction component.
handler.SetMaxFiredPerDetElem(fMaxFiredPerDetElem);
handler.SetMaxEntryPerBusPatch(fMaxEntryPerBusPatch);
- if(!fHLTMUONDecoder.Decode(rawData,bufferSize))
+ if (not fHLTMUONDecoder.Decode(rawData,bufferSize))
{
switch (TryRecover())
{
case kRecoverFull:
- HLTWarning("There was a problem with the raw data."
- " Recovered as much data as possible."
- " Will continue processing the next event."
- );
+ // Do not print the following warning for option "-dontprintparityerrors" if there
+ // were only parity errors.
+ if (fHLTMUONDecoder.GetHandler().NonParityErrorFound() or
+ (fHLTMUONDecoder.GetHandler().ParityErrorFound() and not fHLTMUONDecoder.GetHandler().DontPrintParityErrors())
+ )
+ {
+ HLTWarning("There was a problem with the raw data."
+ " Recovered as much data as possible."
+ " Will continue processing the next event."
+ );
+ }
break;
case kRecoverJustSkip:
- HLTWarning("There was a problem with the raw data."
- " Skipped corrupted data structures."
- " Will continue processing the next event."
- );
+ if (fHLTMUONDecoder.GetHandler().NonParityErrorFound() or
+ (fHLTMUONDecoder.GetHandler().ParityErrorFound() and not fHLTMUONDecoder.GetHandler().DontPrintParityErrors())
+ )
+ {
+ HLTWarning("There was a problem with the raw data."
+ " Skipped corrupted data structures."
+ " Will continue processing the next event."
+ );
+ }
break;
case kRecoverFromParityErrorsOnly:
if (fHLTMUONDecoder.GetHandler().NonParityErrorFound())
HLTError("Failed to decode the tracker DDL raw data.");
return false;
}
- HLTWarning("Found parity errors in the raw data,"
- " but will continue processing."
- );
+ if (not fHLTMUONDecoder.GetHandler().DontPrintParityErrors())
+ {
+ assert( fHLTMUONDecoder.GetHandler().ParityErrorFound() );
+ HLTWarning("Found parity errors in the raw data,"
+ " but will continue processing."
+ );
+ }
break;
default:
HLTError("Failed to decode the tracker DDL raw data.");
fSkipParityErrors(false),
fDontPrintParityErrors(false),
fPrintParityErrorAsWarning(false),
+ fParityErrorFound(false),
fNonParityErrorFound(false),
fIsMuchNoisy(false)
{
// dataCount starts from 1 because the 0-th element of fPadData is used as null value.
fDataCount = 1;
*fNofFiredDetElem = 0;
- fPrevDetElemId = 0 ;
+ fPrevDetElemId = 0;
+ fParityErrorFound = false;
fNonParityErrorFound = false;
};
/// \param location A pointer to the location in the raw data buffer
/// where the problem was found.
- if (code != kParityError) fNonParityErrorFound = true;
+ if (code == kParityError)
+ {
+ fParityErrorFound = true;
+ }
+ else
+ {
+ fNonParityErrorFound = true;
+ }
if (fDontPrintParityErrors and code == kParityError) return;
long bytepos = long(location) - long(fBufferStart) + sizeof(AliRawDataHeader);
*/
void PrintParityErrorAsWarning(bool value) { fPrintParityErrorAsWarning = value; }
+ /**
+ * Returns true if a parity error was found during the last call to Decode.
+ */
+ bool ParityErrorFound() const { return fParityErrorFound; }
+
/**
* Returns true if a non-parity error was found during the last call to Decode.
*/
bool fSkipParityErrors; ///< Flag indicating if ADC digits with parity errors should be skipped.
bool fDontPrintParityErrors; ///< Flag for controlling if messages about parity errors should be printed.
bool fPrintParityErrorAsWarning; ///< Flag for controlling if parity error messages are printed as warnings.
+ bool fParityErrorFound; ///< Flag if a parity error was found after a decoding pass.
bool fNonParityErrorFound; ///< Flag which indicates if a non parity error code was found after a decoding pass.
-
- bool fIsMuchNoisy; ///< tag for noisy buspatch.
+ bool fIsMuchNoisy; ///< tag for noisy buspatch.
};
AliMUONTrackerDDLDecoder<AliHLTMUONRawDecoder> fHLTMUONDecoder; // robust HLTMUON Decoder
* corrupt in the raw data, without trying to recover the data inside. <br>
* - parityerrors Will only continue decoding if parity errors are found
* but the decoder will stop if any other corruption is found. <br>
+ * if no <i>mode</i> option is specified then full recovery logic is enabled. <br>
* \li -skipparityerrors <br>
* Skips any ADC digit data words that contain parity errors. <br>
* \li -dontprintparityerrors <br>
{
if (TryRecover())
{
- HLTWarning("There was a problem with the raw data."
- " Recovered as much data as possible."
- " Will continue processing the next event."
- );
+ /// Fix as long as the DARC header problem is not fixed in hardware by trigger colleagues
+ if (fDecoder.GetHandler().HadNonWrongEventTypeError() or
+ (fDecoder.GetHandler().HadWrongEventTypeError() and not fDecoder.GetHandler().DontPrintWrongEventError())
+ )
+ {
+ HLTWarning("There was a problem with the raw data."
+ " Recovered as much data as possible."
+ " Will continue processing the next event."
+ );
+ }
}
else
{
fStoreInfo(false),
fInfoBufferSize(0),
fInfoBufferCount(0),
- fInfoBuffer(NULL)
+ fInfoBuffer(NULL),
+ fDontPrintWrongEventError(false),
+ fHadWrongEventTypeError(false),
+ fHadNonWrongEventTypeError(false)
{
/// Default constructor just resets the lookup table to zero and local
/// structure marker pointers to NULL.
/// Logs an error message if there was a decoding problem with the DDL payload.
long bytepos = long(location) - long(fBufferStart) + sizeof(AliRawDataHeader);
+ if (code == kWrongEventType)
+ {
+ fHadWrongEventTypeError = true;
+
+ /// Do not generate an error message if the fDontPrintWrongEventError option is set.
+ if (fDontPrintWrongEventError) return;
+ }
+ else
+ {
+ fHadNonWrongEventTypeError = true;
+ }
if (fWarnOnly)
{
HLTWarning("There is a problem with decoding the raw data."
/// Empty the info buffer.
void ZeroInfoBuffer() { fDecoder.GetHandler().ZeroInfoBuffer(); }
+ /**
+ * Returns the flag indicating if the error message for a wrong event type found
+ * in the DARC header should be suppressed.
+ */
+ bool DontPrintWrongEventError() const { return fDecoder.GetHandler().DontPrintWrongEventError(); }
+
+ /**
+ * Sets the flag indicating if the error message for a wrong event type found
+ * in the DARC header should be suppressed.
+ */
+ void DontPrintWrongEventError(bool value) { fDecoder.GetHandler().DontPrintWrongEventError(value); }
+
private:
class AliDecoderHandler : public AliMUONTriggerDDLDecoderEventHandler, public AliHLTLogging
{
assert( buffer != NULL );
fBufferStart = buffer;
+ fHadWrongEventTypeError = fHadNonWrongEventTypeError = false;
}
/**
/// Empty the info buffer.
void ZeroInfoBuffer() { fInfoBufferCount = 0; }
-
+
+ /**
+ * Returns the flag indicating if the error message for a wrong event type found
+ * in the DARC header should be suppressed.
+ */
+ bool DontPrintWrongEventError() const { return fDontPrintWrongEventError; }
+
+ /**
+ * Sets the flag indicating if the error message for a wrong event type found
+ * in the DARC header should be suppressed.
+ */
+ void DontPrintWrongEventError(bool value) { fDontPrintWrongEventError = value; }
+
+ /// Returns true if the last decoded DDL had a wrong event type error in the DARC header.
+ bool HadWrongEventTypeError() const { return fHadWrongEventTypeError; }
+
+ /**
+ * Returns true if the last decoded DDL had a different error than just a
+ * wrong event type error in the DARC header.
+ */
+ bool HadNonWrongEventTypeError() const { return fHadNonWrongEventTypeError; }
+
private:
// Do not allow copying of this class.
/// Not implemented
AliHLTUInt32_t fInfoBufferSize; ///< Number of elements storable in fInfoBuffer.
AliHLTUInt32_t fInfoBufferCount; ///< Number of elements stored in the fInfoBuffer.
AliHLTMUONTrigRecInfoStruct* fInfoBuffer; ///< Buffer for storing the debug information.
-
+ bool fDontPrintWrongEventError; ///< Flag indicating if the error message for kWrongEventType is suppressed or not.
+ bool fHadWrongEventTypeError; ///< Flag indicating if a kWrongEventType error was found in the last decoded DDL.
+ bool fHadNonWrongEventTypeError; ///< Flag indicating if a different error than kWrongEventType was found in the last decoded DDL.
+
static const AliMUONLocalInfoStruct fgkNullStruct; ///< Empty structure marker.
};
bool tryRecover = false;
bool useLocalId = true;
bool makeDebugInfo = false;
+ bool dontPrintWrongEventError = false;
double zmiddle = 0;
double bfieldintegral = 0;
continue;
}
+ if (strcmp( argv[i], "-dontprintwrongeventerror" ) == 0)
+ {
+ dontPrintWrongEventError = true;
+ continue;
+ }
+
HLTError("Unknown option '%s'.", argv[i]);
return -EINVAL;
fTrigRec->UseCrateId(fUseCrateId);
fTrigRec->UseLocalId(useLocalId);
fTrigRec->StoreDebugInfo(makeDebugInfo);
+ fTrigRec->DontPrintWrongEventError(dontPrintWrongEventError);
return 0;
}
* if an error occurs. <br>
* \li -makedebuginfo <br>
* If specified then the trigger record debug informaiton data blocks are generated. <br>
+ * \li -dontprintwrongeventerror <br>
+ * If specified the error message about an incorrect event type found in the DDL DARC
+ * header is not generated or logged. <br>
*
* <h2>Standard configuration:</h2>
* The configuration is taken from the CDB by default. It can be overridden with