]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPreprocessor.cxx
Load pythia libraries.
[u/mrichter/AliRoot.git] / MUON / AliMUONPreprocessor.cxx
index cb3a85493217947473c355d4c640040484599b0e..cd02d6d31d9998c8900864dfe1422ab1029c5585 100644 (file)
@@ -47,9 +47,10 @@ ClassImp(AliMUONPreprocessor)
 //_____________________________________________________________________________
 AliMUONPreprocessor::AliMUONPreprocessor(const char* detName, AliShuttleInterface* shuttle)
 : AliPreprocessor(detName, shuttle),
+  fIsValid(kFALSE),
+  fIsApplicable(kTRUE),
   fSubprocessors(new TObjArray()),
-  fProcessDCS(kFALSE),
-  fIsValid(kFALSE)
+  fProcessDCS(kFALSE)
 {
   /// ctor
 }
@@ -69,6 +70,7 @@ AliMUONPreprocessor::ClearSubprocessors()
   fSubprocessors->Clear();
   fProcessDCS = kFALSE;
   fIsValid = kFALSE;
+  fIsApplicable = kTRUE;
 }
 
 //_____________________________________________________________________________
@@ -90,19 +92,21 @@ AliMUONPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
   delete AliMpSegmentation::Instance(false);
   delete AliMpDDLStore::Instance(false);
   
-  // Load mapping from CDB for this run
-  
-  fIsValid = kTRUE;
+  if ( ! IsApplicable() ) {
+    Log(Form("WARNING-RunType=%s is not one I should handle.",GetRunType()));
+    return;
+  }   
   
-  AliCDBEntry* e = GetFromOCDB("Calib", "Mapping");
-  if (!e)
+  // Load mapping from CDB for this run
+  AliCDBEntry* cdbEntry = GetFromOCDB("Calib", "Mapping");
+  if (!cdbEntry)
   {
     Log("Could not get Mapping from OCDB !");
     fIsValid = kFALSE;
   }
   
-  e = GetFromOCDB("Calib", "DDLStore");
-  if (!e)
+  cdbEntry = GetFromOCDB("Calib", "DDLStore");
+  if (!cdbEntry)
   {
     Log("Could not get DDLStore from OCDB");
     fIsValid = kFALSE;
@@ -116,6 +120,7 @@ AliMUONPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
       Subprocessor(i)->Initialize(run,startTime,endTime);
     }
   }
+  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 )