Corrected delete of TObjArrays created by TString::Tokenize
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Jan 2013 08:13:43 +0000 (08:13 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Jan 2013 08:13:43 +0000 (08:13 +0000)
PWGPP/TRD/AliTRDcheckESD.cxx

index 31176a4..256e1e5 100644 (file)
@@ -511,14 +511,14 @@ void AliTRDcheckESD::UserExec(Option_t *){
   //  Int_t nGlobalTracks = fESD->GetNumberOfTracks();
   //cout << "TRD/All tracks: " << nTRDtracks << "/" << nGlobalTracks << endl;
   //
-  delete triggers;
-  delete userTriggers;
   //
   for(Int_t i=0; i<nTrigFired; ++i) 
     ((TH1F*)fHistos->At(kTriggerDefs))->Fill(triggerIndices[i]);
 
   if(!hasGoodTriggers) {
     PostData(1, fHistos);
+    delete triggers;
+    delete userTriggers;
     return;
   }
   
@@ -818,6 +818,8 @@ void AliTRDcheckESD::UserExec(Option_t *){
   
   
   
+  delete triggers;
+  delete userTriggers;
   delete [] valuesMatchingPhiEtaCF;
   delete [] valuesMatchingPtCF;
   delete [] valuesBCCF;