Remove the task from the task folder in the dtor
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTrackSegmentMaker.cxx
index 27523395a8373f6937ed11bf74f8b2581cd36e9e..c497799ecbfe3791a5b6be258257ca8d92d861e5 100644 (file)
@@ -28,6 +28,7 @@
 
 // --- AliRoot header files ---
 #include "AliEMCALTrackSegmentMaker.h"
+#include "AliEMCALGetter.h"
 
 ClassImp( AliEMCALTrackSegmentMaker) 
 
@@ -53,5 +54,7 @@ AliEMCALTrackSegmentMaker::AliEMCALTrackSegmentMaker(const TString alirunFileNam
 //____________________________________________________________________________
 AliEMCALTrackSegmentMaker::~AliEMCALTrackSegmentMaker()
 {
+ //Remove this from the parental task before destroying
+  AliEMCALGetter::Instance()->EmcalLoader()->CleanTracker();
 }