From: ivana Date: Tue, 11 Dec 2007 14:20:12 +0000 (+0000) Subject: Adding a data member fIsApplicable and its getter to handle the run types X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=581ece00a21b531996d0c84c9c952f2d69355f06;p=u%2Fmrichter%2FAliRoot.git Adding a data member fIsApplicable and its getter to handle the run types which we have nothing to do with. (Laurent) --- diff --git a/MUON/AliMUONPreprocessor.cxx b/MUON/AliMUONPreprocessor.cxx index 3fe840195f1..6fc433fd285 100644 --- a/MUON/AliMUONPreprocessor.cxx +++ b/MUON/AliMUONPreprocessor.cxx @@ -48,6 +48,7 @@ ClassImp(AliMUONPreprocessor) AliMUONPreprocessor::AliMUONPreprocessor(const char* detName, AliShuttleInterface* shuttle) : AliPreprocessor(detName, shuttle), fIsValid(kFALSE), + fIsApplicable(kTRUE), fSubprocessors(new TObjArray()), fProcessDCS(kFALSE) { @@ -69,6 +70,7 @@ AliMUONPreprocessor::ClearSubprocessors() fSubprocessors->Clear(); fProcessDCS = kFALSE; fIsValid = kFALSE; + fIsApplicable = kTRUE; } //_____________________________________________________________________________ @@ -115,6 +117,9 @@ AliMUONPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime) } } + if (! IsApplicable() ) + Log(Form("WARNING-RunType=%s is not one I should handle.",GetRunType())); + Log(Form("Initialize was %s",( IsValid() ? "fine" : "NOT OK"))); } @@ -130,6 +135,12 @@ AliMUONPreprocessor::Process(TMap* dcsAliasMap) return 99; } + if (!IsApplicable()) + { + Log("Nothing to do for me"); + return 0; + } + UInt_t rv(0); for ( Int_t i = 0; i <= fSubprocessors->GetLast(); ++i ) diff --git a/MUON/AliMUONPreprocessor.h b/MUON/AliMUONPreprocessor.h index dc51b1ac366..5cfae353334 100644 --- a/MUON/AliMUONPreprocessor.h +++ b/MUON/AliMUONPreprocessor.h @@ -57,6 +57,9 @@ public: /// Mark as invalid void Invalidate() { fIsValid = kFALSE; } + /// Whether we should do something or not + Bool_t IsApplicable() { return fIsApplicable; } + protected: AliMUONPreprocessor(const char* detName, AliShuttleInterface* shuttle); virtual ~AliMUONPreprocessor(); @@ -65,7 +68,8 @@ protected: void ClearSubprocessors(); Bool_t fIsValid; //!< whether we were correctly initialized - + Bool_t fIsApplicable; //!< whether we have something to do + private: /// Not implemented AliMUONPreprocessor(const AliMUONPreprocessor& rhs); @@ -79,7 +83,7 @@ private: TObjArray* fSubprocessors; //!< sub processors to execute Bool_t fProcessDCS; //!< whether the current subprocessor(s) needs DCS or not - ClassDef(AliMUONPreprocessor,3) // MUON Shuttle preprocessor + ClassDef(AliMUONPreprocessor,4) // MUON Shuttle preprocessor }; #endif diff --git a/MUON/AliMUONTrackerPreprocessor.cxx b/MUON/AliMUONTrackerPreprocessor.cxx index 8d813bacda0..821399b6ccf 100644 --- a/MUON/AliMUONTrackerPreprocessor.cxx +++ b/MUON/AliMUONTrackerPreprocessor.cxx @@ -75,6 +75,7 @@ AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTi TString runType = GetRunType(); fIsValid = kTRUE; + fIsApplicable = kTRUE; if ( runType == "PEDESTAL_RUN" ) // FIXME : check the name { @@ -99,7 +100,7 @@ AliMUONTrackerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTi } else { - Log(Form("WARNING-RunType=%s is not one I should handle.",runType.Data())); + fIsApplicable = kFALSE; } AliMUONPreprocessor::Initialize(run,startTime,endTime); diff --git a/MUON/AliMUONTriggerPreprocessor.cxx b/MUON/AliMUONTriggerPreprocessor.cxx index 3c7b720bcd1..02ff14bbb82 100644 --- a/MUON/AliMUONTriggerPreprocessor.cxx +++ b/MUON/AliMUONTriggerPreprocessor.cxx @@ -59,6 +59,7 @@ AliMUONTriggerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTi ClearSubprocessors(); fIsValid = kTRUE; + fIsApplicable = kTRUE; TString runType = GetRunType(); @@ -70,7 +71,7 @@ AliMUONTriggerPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTi } else { - Log(Form("WARNING-RunType=%s is not one I should handle.",runType.Data())); + fIsApplicable = kFALSE; } AliMUONPreprocessor::Initialize(run,startTime,endTime);