Fix crash when running MUON QA on runs which do not contain muon tracker (Diego)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Apr 2012 12:50:01 +0000 (12:50 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Apr 2012 12:50:01 +0000 (12:50 +0000)
MUON/AliMUONTriggerQADataMakerRec.cxx

index db3288e..ab453ee 100644 (file)
@@ -206,11 +206,7 @@ void AliMUONTriggerQADataMakerRec::InitRaws()
   // RS: Since there is no sense in cloning trigger scalers per trigger, I am (for the moment) forbidding their cloning
 
   AliCodeTimerAuto("",0);
-  
-  fDigitStoreFromRaw = new AliMUONDigitStoreV2R();
-  fTriggerStoreFromRaw = new AliMUONTriggerStoreV1();
-  fTriggerStoreReprocessRaw = new AliMUONTriggerStoreV1();
-  
+    
   const Bool_t expert   = kTRUE ; 
   const Bool_t saveCorr = kTRUE ; 
   const Bool_t image    = kTRUE ; 
@@ -574,10 +570,13 @@ void AliMUONTriggerQADataMakerRec::MakeRaws(AliRawReader* rawReader)
     //fTriggerInputGlobalDataHPt[reg][bit]=0;
     //}
     //}
-
-  fDigitStoreFromRaw->Clear();
-  fTriggerStoreFromRaw->Clear();
-  fTriggerStoreReprocessRaw->Clear();
+  
+  if ( fDigitStoreFromRaw ) fDigitStoreFromRaw->Clear();
+  else fDigitStoreFromRaw = new AliMUONDigitStoreV2R();
+  if ( fTriggerStoreFromRaw ) fTriggerStoreFromRaw->Clear();
+  else fTriggerStoreFromRaw =  new AliMUONTriggerStoreV1();
+  if ( fTriggerStoreReprocessRaw ) fTriggerStoreReprocessRaw->Clear();
+  else fTriggerStoreReprocessRaw = new AliMUONTriggerStoreV1();
 
     AliMUONGlobalTrigger inputGlobalTrigger;