protections against failures in deleting event content
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Aug 2012 20:36:54 +0000 (20:36 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Aug 2012 20:36:54 +0000 (20:36 +0000)
PWG/EMCAL/AliEmcalEsdTpcTrackTask.cxx
PWG/EMCAL/AliEmcalMCTrackSelector.cxx
PWG/EMCAL/AliEmcalParticleMaker.cxx
PWG/EMCAL/AliEmcalPicoTrackMaker.cxx
PWGJE/EMCALJetTasks/AliEmcalJetTask.cxx
PWGJE/EMCALJetTasks/AliHadCorrTask.cxx
PWGJE/EMCALJetTasks/AliJetModelBaseTask.cxx

index 7e09f2cb8813c98604dfc4cffcefa2ec9c3f5d32..f79b28755637b586a059bed8a08a4eef1e40f1ff 100644 (file)
@@ -88,6 +88,7 @@ void AliEmcalEsdTpcTrackTask::UserExec(Option_t *)
   }
 
   // add tracks to event if not yet there
+  fTracks->Delete();
   if (!(InputEvent()->FindListObject(fTracksName)))
     InputEvent()->AddObject(fTracks);
 
index 26165688d94cc2e61fff49941c52da8534b6a904..8a83cc211a81e9c53830984cd847cc0deb103ab0 100644 (file)
@@ -72,6 +72,7 @@ void AliEmcalMCTrackSelector::UserExec(Option_t *)
   }
 
   // add tracks to event if not yet there
+  fTracksOut->Delete();
   if (!(event->FindListObject(fTracksOutName))) {
     event->AddObject(fTracksOut);
   }
index 6f3b96062b60e58be1ec335fcf9a97b7f7fe117f..f970146670124c7118597da73c46703ea2458ea7 100644 (file)
@@ -62,9 +62,11 @@ Bool_t AliEmcalParticleMaker::Run()
   // Create th emcal particles
 
   // add tracks to event if not yet there
+  fTracksOut->Delete();
   if (!(InputEvent()->FindListObject(fTracksOutName))) {
     InputEvent()->AddObject(fTracksOut);
   }
+  fCaloClustersOut->Delete();
   if (!(InputEvent()->FindListObject(fCaloOutName))) {
     InputEvent()->AddObject(fCaloClustersOut);
   }
index c00fdd16eac3da1a12cf8e5a4a9368882ef42d32..121f87c5e1d1dccd96427bfe1de12af531205dd6 100644 (file)
@@ -104,6 +104,7 @@ void AliEmcalPicoTrackMaker::UserExec(Option_t *)
   }
 
   // add tracks to event if not yet there
+  fTracksOut->Delete();
   if (!(InputEvent()->FindListObject(fTracksOutName))) {
     InputEvent()->AddObject(fTracksOut);
   }
index e6a362f6e61b041d079767109186c1657dc6a562..212af95fbca1f677cb4eba6671dd8cbe589072ed 100644 (file)
@@ -397,6 +397,7 @@ Bool_t AliEmcalJetTask::DoInit()
   }
 
   // add jets to event if not yet there
+  fJets->Delete();
   if (!(fEvent->FindListObject(fJetsName)))
     fEvent->AddObject(fJets);
   else {
index 5ace53e4aad1c75231810859e7c8129ca2ef697a..120dce8db7d377e069d109de9aeb5d6affd46c9b 100644 (file)
@@ -509,6 +509,7 @@ Bool_t AliHadCorrTask::Run()
   // Run the hadronic correction
 
   // post output in event if not yet present
+  fOutClusters->Delete();
   if (!(InputEvent()->FindListObject(fOutCaloName)))
     InputEvent()->AddObject(fOutClusters);
   
index 97e4f519810b9c5a47e94f24bcc3cdbf350fcdea..bc964af5b364d8c19aafc85d2c87526c34272b5e 100644 (file)
@@ -289,6 +289,7 @@ void AliJetModelBaseTask::ExecOnce()
     }
 
     if (fCopyArray) {
+      fOutTracks->Delete();
       if (!(InputEvent()->FindListObject(fOutTracksName)))
        InputEvent()->AddObject(fOutTracks);
     }
@@ -321,6 +322,7 @@ void AliJetModelBaseTask::ExecOnce()
     }
 
     if (fCopyArray) {
+      fOutClusters->Delete();
       if (!(InputEvent()->FindListObject(fOutCaloName)))
        InputEvent()->AddObject(fOutClusters);
     }