]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Do not fail if the corresponding pedestal run was obviously bad, i.e. if the number...
authorlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 May 2010 12:38:32 +0000 (12:38 +0000)
committerlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 May 2010 12:38:32 +0000 (12:38 +0000)
MUON/AliMUONPedestalSubprocessor.cxx
MUON/AliMUONPreprocessor.h
MUON/TestMUONPreprocessor.C

index a6f7de1750395396625b18f4556aefac838ff175..12d1e3adeb2c640e725c064db66bc66a360d336a 100644 (file)
@@ -157,10 +157,24 @@ AliMUONPedestalSubprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endT
   if (!n)
   {
     Master()->Log("Failed to read any pedestals");
+
     delete fPedestals;
     fPedestals = 0;
     delete fConfig;
     fConfig = 0;
+
+    // OK, we did not get our pedestals. Check if the ped run itself
+    // was bad, i.e. too few events
+    TString nevents(Master()->GetRunParameter("totalEvents"));
+    
+    if ( nevents.Atoi() < 50 ) 
+    {
+      Master()->Log(Form("The run had only %d events, so the failure to read pedestals is normal",nevents.Atoi()));
+      // too few events, failure is normal, returns OK.
+      return kTRUE;
+    }
+    
+    // no ped, but run looks clean, that's an error
     return kFALSE;
   }
   
index 2a0ce630e173f396c6568d6508958c78136805cd..53330db242ed437372c1c180db7152d0d626f3f2 100644 (file)
@@ -45,6 +45,12 @@ public:
                                   validityStart,validityInfinite);
   }
   
+  /// Publish AliPreprocessor::GetRunParameter
+  const char* GetRunParameter(const char* param)
+  {
+    return AliPreprocessor::GetRunParameter(param);
+  }
+  
   /// Publish AliPreprocessor::GetFile function
   const char* GetFile(Int_t system, const char* id, const char* source)
   {
index 1909348462967ea500e9462dd647b0609ad328a5..340879a38a3e844186eefa5275ed892766ddd67d 100644 (file)
@@ -238,6 +238,8 @@ void TestMUONPreprocessor(Int_t runNumber=80,
   // In real life the parameters will be retrieved automatically from the run logbook;
   shuttle->SetInputRunType(runType);
   
+  shuttle->AddInputRunParameter("totalEvents","20");
+                                
   // Create the preprocessor that should be tested, it registers itself automatically to the shuttle
   new AliMUONTrackerPreprocessor(shuttle);
   new AliMUONTriggerPreprocessor(shuttle);