Corrected destructor (T,Kuhr)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 Feb 2004 20:00:12 +0000 (20:00 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 Feb 2004 20:00:12 +0000 (20:00 +0000)
STEER/AliDigitizer.cxx
STEER/AliRunDigitizer.cxx
TRD/AliTRDdigitizer.cxx

index 1e531d7..7b60c40 100644 (file)
@@ -77,7 +77,6 @@ AliDigitizer::AliDigitizer(AliRunDigitizer *manager,
 //_______________________________________________________________________
 AliDigitizer::~AliDigitizer() 
 {
-  delete fManager;
 }
 
 //_______________________________________________________________________
index 04c5508..14e9fc0 100644 (file)
@@ -220,8 +220,6 @@ void AliRunDigitizer::Copy(TObject&) const
 
 AliRunDigitizer::~AliRunDigitizer() {
 // dtor
-  if (GetListOfTasks()) 
-    GetListOfTasks()->Clear("nodelete");
   delete fInputStreams;
   delete fCombi;
   delete fOutRunLoader;
index bc0f6c2..cebd2db 100644 (file)
@@ -213,12 +213,10 @@ AliTRDdigitizer::~AliTRDdigitizer()
     fDigitsManager = 0;
   }
 
-  if (fSDigitsManager) {
-    delete fSDigitsManager;
-    fSDigitsManager = 0;
-  }
+  fSDigitsManager = 0;
 
   if (fSDigitsManagerList) {
+    fSDigitsManagerList->Delete();
     delete fSDigitsManagerList;
     fSDigitsManagerList = 0;
   }
@@ -406,7 +404,7 @@ void AliTRDdigitizer::Exec(Option_t* option)
 
   //Write parameters
   orl->CdGAFile();
-  GetParameter()->Write();
+  if (!gFile->Get("TRDParameter")) GetParameter()->Write();
 
   if (fDebug > 0) {
     printf("<AliTRDdigitizer::Exec> ");
@@ -519,6 +517,7 @@ Bool_t AliTRDdigitizer::InitDetector()
   }
 
   // Create a digits manager
+  delete fDigitsManager;
   fDigitsManager = new AliTRDdigitsManager();
   fDigitsManager->SetSDigits(fSDigits);
   fDigitsManager->CreateArrays();
@@ -526,7 +525,11 @@ Bool_t AliTRDdigitizer::InitDetector()
   fDigitsManager->SetDebug(fDebug);
 
   // The list for the input s-digits manager to be merged
-  fSDigitsManagerList = new TList();
+  if (fSDigitsManagerList) {
+    fSDigitsManagerList->Delete();
+  } else {
+    fSDigitsManagerList = new TList();
+  }
 
   return kTRUE;