add explicit validation of profiles in Preprocessor before trying to add to them
authordsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 Sep 2010 10:29:45 +0000 (10:29 +0000)
committerdsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 Sep 2010 10:29:45 +0000 (10:29 +0000)
EMCAL/AliCaloCalibPedestal.h
EMCAL/AliEMCALPreprocessor.cxx

index 8832b25..34bd60b 100644 (file)
@@ -159,7 +159,9 @@ class AliCaloCalibPedestal : public TObject {
 
   //Saving functions
   Bool_t SaveHistograms(TString fileName, Bool_t saveEmptyHistos = kFALSE); //Saves the histograms to a .root file
-  
+
+  void Init() { ValidateProfiles(); } // do basic setup
+
  private:
   
   void ValidateProfiles(); //Makes sure that basic histos/profiles exist
index 8f85f1a..ed94b33 100644 (file)
@@ -312,7 +312,8 @@ UInt_t AliEMCALPreprocessor::ExtractPedestals(Int_t sourceFXS)
   //  Only store if new pedestal info is available
   //
   AliCaloCalibPedestal *calibPed = new AliCaloCalibPedestal(AliCaloCalibPedestal::kEmCal);
-  
+  calibPed->Init();
+
   TList* list = GetFileSources(sourceFXS,"pedestals");
   if (list && list->GetEntries()>0) {