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 653ee3ba8b630b3f5357a04976e484a4190bcea4..66a1bd04cb07390d71485f038e1db44036cefce0 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 ea2decf5d8e9a45f7e47a96dbd0bb94d03544bdc..2eada3126188e26d3fe3d29fde15448058cf890f 100644 (file)
@@ -97,6 +97,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,
index 8c08390e0a3dfecf56581f48b6ab451ed4448a32..c45b71e30920773e9bed9040e1147a1449698ea4 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 8b8acf535a5495b89e569ed9cda97cb197ba0d0f..67f9af187138b4e5e36dd3bbd63ae2ac4e50c11c 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 0f9641ba9d6429e0a096a1f27d8108416fdd0b90..c762b2057dcf0953d03c99aa21a1b4885b8b4236 100644 (file)
@@ -102,6 +102,13 @@ AliPHOSSDigitizer::AliPHOSSDigitizer(const AliPHOSSDigitizer & sd)
 }
 
 
+//____________________________________________________________________________ 
+AliPHOSSDigitizer::~AliPHOSSDigitizer() {
+  //dtor
+  AliPHOSGetter * gime =
+    AliPHOSGetter::Instance(GetTitle(),fEventFolderName.Data());  
+  gime->PhosLoader()->CleanSDigitizer();
+}
 //____________________________________________________________________________ 
 void AliPHOSSDigitizer::Init()
 {
index 48bfcd3f377bc9314631c17ec05d2cd6e4c2aac1..d74aaa9c9a92198760b31067adf14b077afec0d7 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 e1e8f23709593db0a4ec26ce409fd15eadaed786..54f076e5ff81d043ceec7463c8fdb12882a60bf5 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();
 }
 
 //____________________________________________________________________________