]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliLoader.h
Bug fix
[u/mrichter/AliRoot.git] / STEER / AliLoader.h
index d24a316cd5aaca48bf251a45a63c6304d41bcd43..7ed4200eae23e610764b8013c423094bab05d9e0 100644 (file)
@@ -1,19 +1,20 @@
 #ifndef ALILOADER_H
 #define ALILOADER_H
 
+class TDirectory;
+class TFile;
+class TString;
+class TTask;
+class TTree;
+
 #include <TFolder.h>
 #include <TObjArray.h>
 
-//#include <AliConfig.h>
-#include "AliDataLoader.h"
-
-class TString;
-class TFile;
-class TTree;
-class TTask;
-class AliRunLoader;
 class AliDigitizer;
-class TDirectory;
+class AliRunLoader;
+
+#include "AliDataLoader.h"
+#include "AliTaskLoader.h"
 
 
 //___________________________________________________________________
@@ -60,6 +61,7 @@ class AliLoader: public TNamed
     AliDataLoader* GetRecParticlesDataLoader()const {return (AliDataLoader*)fDataLoaders->At(kRecParticles);}
  
     AliDataLoader* GetDataLoader(const char* name);
+    void           AddDataLoader(AliDataLoader* dl);
         
     
     Int_t          SetEventFolder(TFolder* eventfolder);//sets the event folder
@@ -142,14 +144,22 @@ class AliLoader: public TNamed
       SetTAddrInDet();
       return status;
     }
-    Int_t          LoadRecPoints(Option_t* opt="") const {
-      return GetRecPointsDataLoader()->Load(opt);
+    
+
+    Int_t          LoadRecPoints(Option_t* opt="") {
+      Int_t status = GetRecPointsDataLoader()->Load(opt);
+      SetTAddrInDet();
+      return status;
     }
-    Int_t          LoadTracks(Option_t* opt="") const {
-      return GetTracksDataLoader()->Load(opt);
+    Int_t          LoadTracks(Option_t* opt="") {
+      Int_t status = GetTracksDataLoader()->Load(opt);
+      SetTAddrInDet();
+      return status;
     }
-    Int_t          LoadRecParticles(Option_t* opt="") const {
-      return GetRecParticlesDataLoader()->Load(opt);
+    Int_t          LoadRecParticles(Option_t* opt="") {
+      Int_t status = GetRecParticlesDataLoader()->Load(opt);
+      SetTAddrInDet();
+      return status;
     }
     
     Int_t          LoadSDigitizer(Option_t* opt="") const {
@@ -286,8 +296,7 @@ class AliLoader: public TNamed
     static Bool_t      TestFileOption(Option_t* opt);//checks is file is created from scratch
     static Bool_t      IsOptionWritable(const TString& opt);
     
-    static Int_t GetDebug() {return fgDebug;}
-    static void        SetDebug(Int_t deb = 1){fgDebug = deb;}//Sets debugging information
+    static void        SetDebug(Int_t deb = 1);//Sets debugging information
     
    protected:
 
@@ -324,7 +333,7 @@ class AliLoader: public TNamed
     TObject*      GetDetectorData(const char* name){return GetDetectorDataFolder()->FindObject(name);}
     TObject**     GetDetectorDataRef(TObject* obj);
     
-    void InitDefaults();
+    virtual void InitDefaults();
     void ResetDataInfo();
     
     void SetTAddrInDet();//Call SetTreeAddress for corresponding detector
@@ -363,8 +372,6 @@ class AliLoader: public TNamed
     //descendant classes should
     //use protected interface methods to access these folders
 
-    static Int_t       fgDebug; //debug flag for loaders
-
     ClassDef(AliLoader,2)
  };
 /******************************************************************/