added check on list of sources found on FXS (Alberto)
authorcheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Dec 2007 19:35:39 +0000 (19:35 +0000)
committercheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Dec 2007 19:35:39 +0000 (19:35 +0000)
VZERO/AliVZEROPreprocessor.cxx

index ab634ec..17878f0 100644 (file)
@@ -113,8 +113,7 @@ UInt_t AliVZEROPreprocessor::Process(TMap* dcsAliasMap)
                calibData->SetPedestal(Pedestals);
                calibData->SetSigma(Sigmas);                    
                calibData->SetGain(Gains); }                            
-               
-       delete sourceList; 
+
        delete source;      
   
   // Check that everything was properly transmitted
@@ -127,14 +126,19 @@ UInt_t AliVZEROPreprocessor::Process(TMap* dcsAliasMap)
   
   // Now we store the VZERO Calibration Object into CalibrationDB
   
-  AliCDBMetaData metaData;
-  metaData.SetBeamPeriod(0);
-  metaData.SetResponsible("Brigitte Cheynis");
-  metaData.SetComment("This preprocessor fills an AliVZEROCalibData object");
+  Bool_t result = kFALSE;
+  if(sourceList && sourceList->GetEntries()>0)
+  {
+       AliCDBMetaData metaData;
+       metaData.SetBeamPeriod(0);
+       metaData.SetResponsible("Brigitte Cheynis");
+       metaData.SetComment("This preprocessor fills an AliVZEROCalibData object");
 
-  Bool_t result = Store("Calib", "Data", calibData, &metaData, 0, kTRUE);
+       result = Store("Calib", "Data", calibData, &metaData, 0, kTRUE);
+  }
 
   delete calibData;
+  delete sourceList; 
 
   if (!result) return 1;   
   return 0;