]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPedestalSubprocessor.cxx
Updated tpc track to 5cm from 0, 0, z
[u/mrichter/AliRoot.git] / MUON / AliMUONPedestalSubprocessor.cxx
index 12d1e3adeb2c640e725c064db66bc66a360d336a..4ac64a9d394f6d3c26a2a49f361e7de630060bd0 100644 (file)
@@ -59,7 +59,8 @@ AliMUONPedestalSubprocessor::AliMUONPedestalSubprocessor(AliMUONPreprocessor* ma
                        "Upload MUON Tracker pedestals to OCDB"),
 fPedestals(0x0),
 fConfig(0x0),
-fConfigChanged(kFALSE)
+fConfigChanged(kFALSE),
+fTooFewEvents(kFALSE)
 {
   /// default ctor
 }
@@ -132,7 +133,9 @@ AliMUONPedestalSubprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endT
   delete fConfig;
   fConfig = new AliMUON2DMap(kTRUE);
   
-  Master()->Log(Form("Reading pedestal files for Run %d startTime %ld endTime %ld",
+  fTooFewEvents = kFALSE;
+  
+  Master()->Log(Form("Reading pedestal files for Run %d startTime %u endTime %u",
                      run,startTime,endTime));
   
   TList* sources = Master()->GetFileSources(kSystem,kId);
@@ -171,6 +174,7 @@ AliMUONPedestalSubprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endT
     {
       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.
+      fTooFewEvents = kTRUE;
       return kTRUE;
     }
     
@@ -221,9 +225,18 @@ AliMUONPedestalSubprocessor::Process(TMap* /*dcsAliasMap*/)
   
   if (!fPedestals || !fConfig) 
   {
-    // this is the only reason to fail for the moment : getting no pedestal or no config
-    // at all.
-    return 1;
+    if ( fTooFewEvents ) 
+    {
+      // ped run was too short, no reason to complain about that, it's "normal" 
+      // not to have pedestals in that case.
+      return 0;
+    }
+    else
+    {
+      // this is the only reason to fail for the moment : getting no pedestal or no config
+      // at all.
+      return 1;
+    }
   }
     
   AliMUON2DStoreValidator validator;