]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/src/AliL3FileHandler.h
Introduction of the online monitoring code into the alimdc package. Fixed some memory...
[u/mrichter/AliRoot.git] / HLT / src / AliL3FileHandler.h
index 13f721c0b63cbdc4dd0485186f97dda2eed4af4a..2f076b56d3d474404910911809a687c4bd36f08a 100644 (file)
@@ -9,6 +9,9 @@ class TClonesArray;
 
 #include <AliSimDigits.h>
 #include <AliTPCParam.h>
+#ifdef use_newio
+#include <AliRunLoader.h>
+#endif
 
 #include <TObject.h>
 #include <TFile.h>
@@ -20,29 +23,47 @@ class AliL3TrackSegmentData;
 class AliL3TrackArray;
 
 class AliL3FileHandler:public AliL3MemHandler{
- private:
-  TFile *fInAli;
-  AliTPCParam *fParam;
-  Bool_t SetAliInput();
-  Int_t fLastIndex;
-  AliSimDigits *fDigits;
-  TTree *fDigitsTree;
+
+ protected:
+#ifdef use_newio
+  AliRunLoader *fInAli;//!
+  Bool_t fUseRunLoader; //use runloader
+#else
+  TFile *fInAli;//!
+#endif
+
+  AliTPCParam *fParam;//!
+  AliSimDigits *fDigits;//!
+
+  TTree *fDigitsTree;//!
   FILE *fMC;//!
   
   Bool_t fIndexCreated;   //is index created
   Int_t  fIndex[36][159]; //stores index over digitstree 
                           //for faster access w/o ASVVERSION
+  Bool_t fUseStaticIndex; //take static index
+  static Bool_t fgStaticIndexCreated;   //global index created
+  static Int_t  fgStaticIndex[36][159]; //global index
 
+  virtual Bool_t SetAliInput();
   Bool_t GetDigitsTree(Int_t event);
   Bool_t CreateIndex();  //create the index
 
  public:
-  AliL3FileHandler();
-  virtual ~AliL3FileHandler();
+  AliL3FileHandler(Bool_t b=kFALSE);
+  ~AliL3FileHandler();
 
   void FreeDigitsTree();
+  static void CleanStaticIndex();
+  static Int_t SaveStaticIndex(Char_t *prefix=0,Int_t event=0);
+  static Int_t LoadStaticIndex(Char_t *prefix=0,Int_t event=0);
+
   Bool_t SetAliInput(Char_t *name);
   Bool_t SetAliInput(TFile *file);
+#ifdef use_newio
+  Bool_t SetAliInput(AliRunLoader *runLoader);
+#else
+#endif
   void CloseAliInput(); 
   Bool_t IsDigit(Int_t event);
   
@@ -53,7 +74,8 @@ class AliL3FileHandler:public AliL3MemHandler{
   //Digit IO
   Bool_t AliDigits2Binary(Int_t event=0,Bool_t altro=kFALSE);
   AliL3DigitRowData *AliDigits2Memory(UInt_t & nrow,Int_t event=0); //Allocates Memory
-  AliL3DigitRowData *AliAltroDigits2Memory(UInt_t & nrow,Int_t event=0,Bool_t eventmerge=kFALSE); //Allocates Memory
+  AliL3DigitRowData *AliAltroDigits2Memory(UInt_t & nrow,Int_t event=0,Bool_t eventmerge=kFALSE); 
+  //Allocates Memory
   Bool_t AliDigits2CompBinary(Int_t event=0,Bool_t altro=kFALSE);  
   void AliDigits2RootFile(AliL3DigitRowData *rowPt,Char_t *new_digitsfile);