Using default task names. Cleaning the task in the destructor if it was posted
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALSDigitizer.cxx
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,