Using default task names. Cleaning the task in the destructor if it was posted
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Jan 2004 18:33:59 +0000 (18:33 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Jan 2004 18:33:59 +0000 (18:33 +0000)
EMCAL/AliEMCALDigitizer.cxx
EMCAL/AliEMCALSDigitizer.cxx
EMCAL/AliEMCALSDigitizer.h
PHOS/AliPHOSDigitizer.cxx
PHOS/AliPHOSSDigitizer.cxx
PHOS/AliPHOSSDigitizer.h
TOF/AliTOFSDigitizer.cxx

index 653ee3b..66a1bd0 100644 (file)
@@ -139,7 +139,7 @@ AliEMCALDigitizer::AliEMCALDigitizer(AliRunDigitizer * rd):
 {
   // ctor
   fManager = rd ; 
-  SetName(fManager->GetInputFolderName(0)) ;
+  //  SetName(fManager->GetInputFolderName(0)) ;
   // take title as name of stream 0
   SetTitle(dynamic_cast<AliStream*>(fManager->GetInputStream(0))->GetFileName(0));
   InitParameters() ; 
@@ -151,6 +151,8 @@ AliEMCALDigitizer::AliEMCALDigitizer(AliRunDigitizer * rd):
   AliEMCALDigitizer::~AliEMCALDigitizer()
 {
   // dtor
+  AliEMCALGetter * gime =AliEMCALGetter::Instance(GetTitle(),fEventFolderName);
+  gime->EmcalLoader()->CleanDigitizer();
   delete [] fInputFileNames ; 
   delete [] fEventNames ; 
 
index ea2decf..2eada31 100644 (file)
@@ -98,6 +98,14 @@ AliEMCALSDigitizer::AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) : TTask(sd
 
 
 //____________________________________________________________________________ 
+AliEMCALSDigitizer::~AliEMCALSDigitizer() {
+  // dtor
+  AliEMCALGetter * gime = 
+    AliEMCALGetter::Instance(GetTitle(), fEventFolderName.Data());  
+  gime->EmcalLoader()->CleanSDigitizer();
+}
+
+//____________________________________________________________________________ 
 void AliEMCALSDigitizer::Init(){
   // Initialization: open root-file, allocate arrays for hits and sdigits,
   // attach task SDigitizer to the list of EMCAL tasks
index 8c08390..c45b71e 100644 (file)
@@ -29,7 +29,7 @@ public:
   AliEMCALSDigitizer() ;          // ctor
   AliEMCALSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::fgkDefaultEventFolderName) ; 
   AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ;
-  virtual ~AliEMCALSDigitizer() {;} // dtor
+  virtual ~AliEMCALSDigitizer(); // dtor
 
   Float_t       Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
   Int_t         Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
index 8b8acf5..67f9af1 100644 (file)
@@ -133,7 +133,7 @@ AliPHOSDigitizer::AliPHOSDigitizer(AliRunDigitizer * rd):
 {
   // ctor
   fManager = rd ; 
-  SetName(fManager->GetInputFolderName(0)) ;
+  //  SetName(fManager->GetInputFolderName(0)) ;
   // take title as name of stream 0
   SetTitle(dynamic_cast<AliStream*>(fManager->GetInputStream(0))->GetFileName(0));
   InitParameters() ; 
@@ -145,6 +145,8 @@ AliPHOSDigitizer::AliPHOSDigitizer(AliRunDigitizer * rd):
   AliPHOSDigitizer::~AliPHOSDigitizer()
 {
   // dtor
+  AliPHOSGetter * gime = AliPHOSGetter::Instance(GetTitle(),fEventFolderName);
+  gime->PhosLoader()->CleanDigitizer();
   delete [] fInputFileNames ; 
   delete [] fEventNames ; 
  
index 0f9641b..c762b20 100644 (file)
@@ -103,6 +103,13 @@ AliPHOSSDigitizer::AliPHOSSDigitizer(const AliPHOSSDigitizer & sd)
 
 
 //____________________________________________________________________________ 
+AliPHOSSDigitizer::~AliPHOSSDigitizer() {
+  //dtor
+  AliPHOSGetter * gime =
+    AliPHOSGetter::Instance(GetTitle(),fEventFolderName.Data());  
+  gime->PhosLoader()->CleanSDigitizer();
+}
+//____________________________________________________________________________ 
 void AliPHOSSDigitizer::Init()
 {
   // Uses the getter to access the required files
index 48bfcd3..d74aaa9 100644 (file)
@@ -28,7 +28,7 @@ public:
   AliPHOSSDigitizer() ;          // ctor
   AliPHOSSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::fgkDefaultEventFolderName) ; 
   AliPHOSSDigitizer(const AliPHOSSDigitizer & sd) ; // cpy ctor
-  virtual ~AliPHOSSDigitizer() {;} // dtor
+  virtual ~AliPHOSSDigitizer(); // dtor
 
   Float_t        Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
   Int_t          Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
index e1e8f23..54f076e 100644 (file)
@@ -59,7 +59,7 @@
 ClassImp(AliTOFSDigitizer)
 
 //____________________________________________________________________________ 
-  AliTOFSDigitizer::AliTOFSDigitizer():TTask("AliTOFSDigitizer","") 
+  AliTOFSDigitizer::AliTOFSDigitizer():TTask("TOFSDigitizer","") 
 {
   // ctor
 
@@ -74,7 +74,7 @@ ClassImp(AliTOFSDigitizer)
 }
 
 //____________________________________________________________________________ 
-AliTOFSDigitizer::AliTOFSDigitizer(const char* HeaderFile, Int_t evNumber1, Int_t nEvents):TTask("AliTOFSDigitizer","")
+AliTOFSDigitizer::AliTOFSDigitizer(const char* HeaderFile, Int_t evNumber1, Int_t nEvents):TTask("TOFSDigitizer","")
 {
   ftail    = 0;
   fSelectedSector=-1; // by default we sdigitize all sectors
@@ -129,6 +129,7 @@ AliTOFSDigitizer::AliTOFSDigitizer(const char* HeaderFile, Int_t evNumber1, Int_
 AliTOFSDigitizer::~AliTOFSDigitizer()
 {
   // dtor
+  fTOFLoader->CleanSDigitizer();
 }
 
 //____________________________________________________________________________