]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding a data member fIsApplicable and its getter to handle the run types
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 11 Dec 2007 14:20:12 +0000 (14:20 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 11 Dec 2007 14:20:12 +0000 (14:20 +0000)
which we have nothing to do with.
(Laurent)

MUON/AliMUONPreprocessor.cxx
MUON/AliMUONPreprocessor.h
MUON/AliMUONTrackerPreprocessor.cxx
MUON/AliMUONTriggerPreprocessor.cxx

index 3fe840195f1384d9bd5eb6cf03f75c8fca85bddb..6fc433fd2857b79cb38310b41216037befcb53e1 100644 (file)
@@ -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 )
index dc51b1ac366c9dd5530c785360dbd075eea1ff2f..5cfae3533345c1d4f5a648c55815ed7875205198 100644 (file)
@@ -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
index 8d813bacda0443fae51b10d56fce1534f12d1f5f..821399b6ccf72f2d985eb126a53e54ee6077d2e0 100644 (file)
@@ -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);
index 3c7b720bcd196aeaa5773b8aa472d81cf84dfcf1..02ff14bbb82394c3580f2de747543dc5c3080535 100644 (file)
@@ -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);