From: aszostak Date: Mon, 7 Dec 2009 22:20:17 +0000 (+0000) Subject: Fixing bug in suppression of warning message printing in the hit reconstruction compo... X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=aae30cc52b0a0766bc2da0c5e7cdf3d25b59158d;p=u%2Fmrichter%2FAliRoot.git Fixing bug in suppression of warning message printing in the hit reconstruction component. Adding the '-dontprintwrongeventerror' option to the trigger reconstruction component. --- diff --git a/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructor.cxx b/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructor.cxx index b5033503051..9061cd73791 100644 --- a/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructor.cxx +++ b/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructor.cxx @@ -313,21 +313,33 @@ bool AliHLTMUONHitReconstructor::DecodeDDL(const AliHLTUInt32_t* rawData,AliHLTU 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()) @@ -335,9 +347,13 @@ bool AliHLTMUONHitReconstructor::DecodeDDL(const AliHLTUInt32_t* rawData,AliHLTU 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."); @@ -1221,6 +1237,7 @@ AliHLTMUONHitReconstructor::AliHLTMUONRawDecoder::AliHLTMUONRawDecoder() : fSkipParityErrors(false), fDontPrintParityErrors(false), fPrintParityErrorAsWarning(false), + fParityErrorFound(false), fNonParityErrorFound(false), fIsMuchNoisy(false) { @@ -1245,7 +1262,8 @@ void AliHLTMUONHitReconstructor::AliHLTMUONRawDecoder::OnNewBuffer(const void* b // 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; }; @@ -1258,7 +1276,14 @@ void AliHLTMUONHitReconstructor::AliHLTMUONRawDecoder::OnError(ErrorCode code, c /// \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); diff --git a/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructor.h b/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructor.h index 9d569a567c2..f8a8d0eed95 100644 --- a/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructor.h +++ b/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructor.h @@ -253,6 +253,11 @@ private: */ 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. */ @@ -286,9 +291,9 @@ private: 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 fHLTMUONDecoder; // robust HLTMUON Decoder diff --git a/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructorComponent.h b/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructorComponent.h index c35ab50bb09..ae53f37feda 100644 --- a/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructorComponent.h +++ b/HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructorComponent.h @@ -97,6 +97,7 @@ extern "C" struct AliHLTMUONHitRecoLutRow; * corrupt in the raw data, without trying to recover the data inside.
* - parityerrors Will only continue decoding if parity errors are found * but the decoder will stop if any other corruption is found.
+ * if no mode option is specified then full recovery logic is enabled.
* \li -skipparityerrors
* Skips any ADC digit data words that contain parity errors.
* \li -dontprintparityerrors
diff --git a/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructor.cxx b/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructor.cxx index 64bae02d3f3..fd95f186044 100644 --- a/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructor.cxx +++ b/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructor.cxx @@ -107,10 +107,16 @@ bool AliHLTMUONTriggerReconstructor::Run( { 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 { @@ -161,7 +167,10 @@ AliHLTMUONTriggerReconstructor::AliDecoderHandler::AliDecoderHandler() : 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. @@ -1118,6 +1127,17 @@ void AliHLTMUONTriggerReconstructor::AliDecoderHandler::OnError( /// 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." diff --git a/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructor.h b/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructor.h index 0425a4d9144..89cd4ea6e22 100644 --- a/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructor.h +++ b/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructor.h @@ -133,6 +133,18 @@ public: /// 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 @@ -252,6 +264,7 @@ private: { assert( buffer != NULL ); fBufferStart = buffer; + fHadWrongEventTypeError = fHadNonWrongEventTypeError = false; } /** @@ -305,7 +318,28 @@ private: /// 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 @@ -389,7 +423,10 @@ private: 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. }; diff --git a/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.cxx b/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.cxx index 400bc472e36..8e963f19b6a 100644 --- a/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.cxx +++ b/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.cxx @@ -181,6 +181,7 @@ int AliHLTMUONTriggerReconstructorComponent::DoInit(int argc, const char** argv) bool tryRecover = false; bool useLocalId = true; bool makeDebugInfo = false; + bool dontPrintWrongEventError = false; double zmiddle = 0; double bfieldintegral = 0; @@ -396,6 +397,12 @@ int AliHLTMUONTriggerReconstructorComponent::DoInit(int argc, const char** argv) continue; } + if (strcmp( argv[i], "-dontprintwrongeventerror" ) == 0) + { + dontPrintWrongEventError = true; + continue; + } + HLTError("Unknown option '%s'.", argv[i]); return -EINVAL; @@ -510,6 +517,7 @@ int AliHLTMUONTriggerReconstructorComponent::DoInit(int argc, const char** argv) fTrigRec->UseCrateId(fUseCrateId); fTrigRec->UseLocalId(useLocalId); fTrigRec->StoreDebugInfo(makeDebugInfo); + fTrigRec->DontPrintWrongEventError(dontPrintWrongEventError); return 0; } diff --git a/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.h b/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.h index 3d4fdb20b15..6731cbe79de 100644 --- a/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.h +++ b/HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.h @@ -125,6 +125,9 @@ class AliHLTMUONTriggerReconstructor; * if an error occurs.
* \li -makedebuginfo
* If specified then the trigger record debug informaiton data blocks are generated.
+ * \li -dontprintwrongeventerror
+ * If specified the error message about an incorrect event type found in the DDL DARC + * header is not generated or logged.
* *

Standard configuration:

* The configuration is taken from the CDB by default. It can be overridden with