]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCFileHandler.h
Method GetTrackPoint now works with mis-aligned geometry (L. Gaudichet)
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCFileHandler.h
1 // @(#) $Id$
2 // Original: AliHLTFileHandler.h,v 1.19 2004/06/11 16:06:33 loizides 
3
4 #ifndef ALIHLTTPCFILEHANDLER_H
5 #define ALIHLTTPCFILEHANDLER_H
6
7 #include "AliHLTTPCMemHandler.h"
8
9 class TClonesArray;
10
11 class AliSimDigits;
12 class AliTPCParam;
13 #include <AliRunLoader.h>
14
15 class TObject;
16 class TFile;
17 class TTree;
18 #include "AliHLTLogging.h"
19
20 class AliHLTTPCSpacePointData;
21 class AliHLTTPCDigitRowData;
22 class AliHLTTPCTrackSegmentData;
23 class AliHLTTPCTrackArray;
24
25 /**
26  * class AliHLTTPCFileHandler
27  * This is the input interface class for the TPC tracking code before conversion to
28  * the HLT component framework.
29  * 
30  */
31 class AliHLTTPCFileHandler:public AliHLTTPCMemHandler, public AliHLTLogging {
32
33  protected:
34   AliRunLoader *fInAli;//!
35   Bool_t fUseRunLoader; //use runloader
36
37   AliTPCParam *fParam;//!
38   AliSimDigits *fDigits;//!
39
40   TTree *fDigitsTree;//!
41   FILE *fMC;//!
42   
43   Bool_t fIndexCreated;   //is index created
44   Int_t  fIndex[36][159]; //stores index over digitstree 
45                           //for faster access w/o ASVVERSION
46   Bool_t fUseStaticIndex; //take static index
47   static Bool_t fgStaticIndexCreated;   //global index created
48   static Int_t  fgStaticIndex[36][159]; //global index
49
50   virtual Bool_t SetAliInput();
51   Bool_t GetDigitsTree(Int_t event);
52   Bool_t CreateIndex();  //create the index
53
54  public:
55   /** standard constructor */
56   AliHLTTPCFileHandler(Bool_t b=kFALSE);
57   /** not a valid copy constructor, defined according to effective C++ style */
58   AliHLTTPCFileHandler(const AliHLTTPCFileHandler&);
59   /** not a valid assignment op, but defined according to effective C++ style */
60   AliHLTTPCFileHandler& operator=(const AliHLTTPCFileHandler&);
61   /** destructor */
62   virtual ~AliHLTTPCFileHandler();
63
64   void FreeDigitsTree();
65   static void CleanStaticIndex();
66   static Int_t SaveStaticIndex(Char_t *prefix=0,Int_t event=0);
67   static Int_t LoadStaticIndex(Char_t *prefix=0,Int_t event=0);
68
69   Bool_t SetAliInput(Char_t *name);
70   Bool_t SetAliInput(AliRunLoader *runLoader);
71   void CloseAliInput(); 
72   Bool_t IsDigit(Int_t event);
73   
74   Bool_t SetMCOutput(Char_t *name);
75   Bool_t SetMCOutput(FILE *file);
76   void CloseMCOutput();
77
78   //Digit IO
79   Bool_t AliDigits2Binary(Int_t event=0,Bool_t altro=kFALSE);
80   AliHLTTPCDigitRowData *AliDigits2Memory(UInt_t & nrow,Int_t event=0); //Allocates Memory
81   AliHLTTPCDigitRowData *AliAltroDigits2Memory(UInt_t & nrow,Int_t event=0,Bool_t eventmerge=kFALSE); 
82   //Allocates Memory
83   Bool_t AliDigits2CompBinary(Int_t event=0,Bool_t altro=kFALSE);  
84   void AliDigits2RootFile(AliHLTTPCDigitRowData *rowPt,Char_t *newDigitsfile);
85
86   //Point IO
87   Bool_t AliPoints2Binary(Int_t eventn=0);
88   AliHLTTPCSpacePointData *AliPoints2Memory(UInt_t & npoint,Int_t eventn=0);//Allocates Memory
89
90   ClassDef(AliHLTTPCFileHandler,1)   //Filehandler class
91 };
92
93 #endif