]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALPID.cxx
Remove the task from the task folder in the dtor
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALPID.cxx
index 64e4c0f50bda3b04c381474c63f65c4bab9f9a19..fce79999efdb6fe6aced42306b8a9cf69fab20c9 100644 (file)
 
 
 // --- ROOT system ---
 
 
 // --- ROOT system ---
-#include "TGeometry.h"
-#include "TDirectory.h"
-#include "TFile.h"
-#include "TTree.h"
-// --- Standard library ---
-#include <stdlib.h>
 
 
+// --- Standard library ---
 
 // --- AliRoot header files ---
 
 // --- AliRoot header files ---
-#include "AliRun.h" 
 #include "AliEMCALPID.h"
 #include "AliEMCALPID.h"
-#include "AliHeader.h" 
+#include "AliEMCALGetter.h"
 
 ClassImp(AliEMCALPID)
 
 
 ClassImp(AliEMCALPID)
 
@@ -47,24 +40,27 @@ ClassImp(AliEMCALPID)
   AliEMCALPID::AliEMCALPID():TTask("","")
 {
   // ctor
   AliEMCALPID::AliEMCALPID():TTask("","")
 {
   // ctor
-  fSplitFile= 0 ; 
-
+  fEventFolderName = "" ; 
+  fFirstEvent = 0 ; 
+  fLastEvent  = -1 ;
 }
 
 
 //____________________________________________________________________________
 }
 
 
 //____________________________________________________________________________
-AliEMCALPID::AliEMCALPID(const char* headerFile, const char * name, const Bool_t toSplit):TTask(name, headerFile)
+AliEMCALPID::AliEMCALPID(const TString alirunFileName, const TString eventFolderName):
+  TTask("EMCAL"+AliConfig::Instance()->GetPIDTaskName(), alirunFileName),
+  fEventFolderName(eventFolderName)
 {
   // ctor
 {
   // ctor
-
-  fToSplit = toSplit ;
-  fSplitFile= 0 ; 
+  fFirstEvent = 0 ; 
+  fLastEvent  = -1 ; 
 }
 
 //____________________________________________________________________________
 AliEMCALPID::~AliEMCALPID()
 {
   // dtor
 }
 
 //____________________________________________________________________________
 AliEMCALPID::~AliEMCALPID()
 {
   // dtor
+  //Remove this from the parental task before destroying
+  AliEMCALGetter::Instance()->EmcalLoader()->CleanPIDTask();
         
         
-  fSplitFile = 0 ;
 }
 }