Remove the task from the task folder in the dtor
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTrackSegmentMaker.cxx
index ef7526407884e6be10f8f0f834dd463b6922b40e..c497799ecbfe3791a5b6be258257ca8d92d861e5 100644 (file)
 
 
 // --- ROOT system ---
-#include "TGeometry.h"
-#include "TFile.h"
-#include "TTree.h"
 
 // --- Standard library ---
-#include <stdlib.h>   
 
 // --- AliRoot header files ---
-#include "AliRun.h" 
 #include "AliEMCALTrackSegmentMaker.h"
-#include "AliHeader.h" 
+#include "AliEMCALGetter.h"
 
 ClassImp( AliEMCALTrackSegmentMaker) 
 
@@ -42,22 +37,24 @@ ClassImp( AliEMCALTrackSegmentMaker)
   AliEMCALTrackSegmentMaker:: AliEMCALTrackSegmentMaker() : TTask("","")
 {
   // ctor
-  fSplitFile= 0 ; 
+  fEventFolderName = "" ; 
 
 }
 
 //____________________________________________________________________________
-AliEMCALTrackSegmentMaker::AliEMCALTrackSegmentMaker(const char * headerFile, const char * name, const Bool_t toSplit): TTask(name, headerFile)
+AliEMCALTrackSegmentMaker::AliEMCALTrackSegmentMaker(const TString alirunFileName,
+                                                    const TString eventFolderName):
+  TTask("EMCAL"+AliConfig::Instance()->GetTrackerTaskName(), alirunFileName),
+  fEventFolderName(eventFolderName)
 {
   // ctor
-  fSplitFile= 0 ; 
-  fToSplit  = toSplit ;
+
 }
 
 //____________________________________________________________________________
 AliEMCALTrackSegmentMaker::~AliEMCALTrackSegmentMaker()
 {
-   
-      fSplitFile = 0 ;
+ //Remove this from the parental task before destroying
+  AliEMCALGetter::Instance()->EmcalLoader()->CleanTracker();
 }