More protections needed for CAF
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 13 Nov 2011 10:19:16 +0000 (10:19 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 13 Nov 2011 10:19:16 +0000 (10:19 +0000)
R. Shahoyan

PWG1/HMPID/AliHMPIDTaskQA.cxx
PWG1/ITS/AliAnalysisTaskSDDRP.cxx
PWG1/TRD/AliTRDcalibration.cxx
PWG1/TRD/AliTRDcheckESD.cxx
PWG1/TRD/AliTRDcheckPID.cxx
PWG1/TRD/AliTRDinfoGen.cxx
PWG1/TRD/AliTRDpidRefMakerLQ.cxx
PWG1/TRD/AliTRDrecoTask.cxx
PWG1/TRD/AliTRDresolution.cxx
PWG3/muon/AliAnalysisTaskMuonQA.cxx

index 536a20f..4107460 100644 (file)
@@ -201,7 +201,7 @@ AliHMPIDTaskQA::~AliHMPIDTaskQA() {
   //destructor
   //
   Info("~AliHMPIDTaskQA","Calling Destructor");
-  if (fHmpHistList /*&& !AliAnalysisManager::GetAnalysisManager()->IsProofMode()*/) delete fHmpHistList;
+  if (fHmpHistList && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) delete fHmpHistList;
 }
 
 //___________________________________________________________________________
index bed8e39..4a9927a 100644 (file)
@@ -99,7 +99,7 @@ AliAnalysisTaskSDDRP::AliAnalysisTaskSDDRP() : AliAnalysisTaskSE("SDD RecPoints"
 //___________________________________________________________________________
 AliAnalysisTaskSDDRP::~AliAnalysisTaskSDDRP(){
   //
-  if (fOutput) {
+  if (fOutput && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {
     delete fOutput;
     fOutput = 0;
   }
index aa5cafc..fd2d22a 100644 (file)
@@ -176,7 +176,8 @@ AliTRDcalibration::AliTRDcalibration(char* name)
 AliTRDcalibration::~AliTRDcalibration() 
 {
   // Default destructor
-
+  if (AliAnalysisManager::GetAnalysisManager()->IsProofMode()) return;
+  //
   if(fNbTRDTrack) delete fNbTRDTrack;
   if(fNbTRDTrackOffline) delete fNbTRDTrackOffline;
   if(fNbTRDTrackStandalone) delete fNbTRDTrackStandalone;
index 6d94f42..9f837d1 100644 (file)
@@ -138,7 +138,7 @@ AliTRDcheckESD::AliTRDcheckESD(char* name):
 AliTRDcheckESD::~AliTRDcheckESD()
 {
 // Destructor
-  if(fHistos){
+  if(fHistos && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){
     //fHistos->Delete();
     delete fHistos;
   }
index 3cbc966..4151d4a 100644 (file)
@@ -51,6 +51,7 @@
 #include "Cal/AliTRDCalPIDNN.h"
 #include "AliTRDcheckPID.h"
 #include "AliTRDinfoGen.h"
+#include "AliAnalysisManager.h"
 #include "info/AliTRDtrackInfo.h"
 #include "info/AliTRDpidInfo.h"
 #include "info/AliTRDv0Info.h"
@@ -119,6 +120,7 @@ void AliTRDcheckPID::LocalInit()
 //________________________________________________________________________
 AliTRDcheckPID::~AliTRDcheckPID() 
 {
+  if (AliAnalysisManager::GetAnalysisManager()->IsProofMode()) return;
   if(fPID){fPID->Delete(); delete fPID;}
   if(fGraph){fGraph->Delete(); delete fGraph;}
   if(fUtil) delete fUtil;
@@ -130,7 +132,7 @@ void AliTRDcheckPID::UserCreateOutputObjects()
 {
   // Create histograms
   // Called once
-
+  
   AliTRDrecoTask::UserCreateOutputObjects();
   fPID = new TObjArray();
   fPID->SetOwner(kTRUE);
index 9f1f628..5617f1b 100644 (file)
@@ -192,7 +192,7 @@ AliTRDinfoGen::~AliTRDinfoGen()
     delete fV0List;\r
     fV0List = NULL;\r
   }\r
-  if(fContainer){ \r
+  if(fContainer && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){ \r
     fContainer->Delete(); \r
     delete fContainer;\r
     fContainer = NULL;\r
index 21379b5..1db5224 100644 (file)
@@ -47,6 +47,7 @@
 #include "AliTRDcalibDB.h"
 #include "AliTRDgeometry.h"
 #include "info/AliTRDpidInfo.h"
+#include "AliAnalysisManager.h"
 
 ClassImp(AliTRDpidRefMakerLQ)
 
@@ -78,6 +79,7 @@ AliTRDpidRefMakerLQ::~AliTRDpidRefMakerLQ()
   //
   // AliTRDCalPIDQRef destructor
   //
+  if (AliAnalysisManager::GetAnalysisManager()->IsProofMode()) return;
   if(fPDF){
     //fPDF->Write("PDF_LQ", TObject::kSingleKey);
     fPDF->Delete();
index a1cc5a4..7967e88 100644 (file)
@@ -31,6 +31,7 @@
 #include "AliAnalysisTask.h"\r
 #include "AliExternalTrackParam.h"\r
 \r
+#include "AliAnalysisManager.h"\r
 #include "info/AliTRDeventInfo.h"\r
 #include "AliTRDrecoTask.h"\r
 #include "AliTRDtrackV1.h"\r
@@ -105,7 +106,7 @@ AliTRDrecoTask::~AliTRDrecoTask()
     fPlotFuncList = NULL;\r
   }\r
   \r
-  if(fContainer){\r
+  if(fContainer && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){\r
     if(fContainer->IsOwner()) fContainer->Delete();\r
     delete fContainer;\r
     fContainer = NULL;\r
index d4bd65b..de304c6 100644 (file)
@@ -88,7 +88,7 @@
 #include "AliTRDrecoParam.h"
 #include "AliTRDpidUtil.h"
 #include "AliTRDinfoGen.h"
-
+#include "AliAnalysisManager.h"
 #include "info/AliTRDclusterInfo.h"
 #include "info/AliTRDeventInfo.h"
 
@@ -203,7 +203,7 @@ AliTRDresolution::~AliTRDresolution()
   //
   // Destructor
   //
-
+  if (AliAnalysisManager::GetAnalysisManager()->IsProofMode()) return;
   if(fProj){fProj->Delete(); delete fProj;}
   if(fCl){fCl->Delete(); delete fCl;}
   if(fMCcl){fMCcl->Delete(); delete fMCcl;}
index 0919230..bbdb462 100644 (file)
@@ -113,8 +113,8 @@ AliAnalysisTaskMuonQA::~AliAnalysisTaskMuonQA()
     delete fListExpert;
     delete fTrackCounters;
     delete fEventCounters;
+    delete fListNorm;
   }
-  delete fListNorm;
   delete fTriggerClass;
   delete fSelectTriggerClass;
 }