]>
Commit | Line | Data |
---|---|---|
3e87ef69 | 1 | // @(#) $Id$ |
2 | ||
108615fc | 3 | #ifndef ALIL3FILEHANDLER_H |
4 | #define ALIL3FILEHANDLER_H | |
5 | ||
108615fc | 6 | #include "AliL3MemHandler.h" |
3e87ef69 | 7 | |
8 | class TClonesArray; | |
9 | ||
10 | #include <AliSimDigits.h> | |
11 | #include <AliTPCParam.h> | |
b2a02bce | 12 | #ifdef use_newio |
a27af97b | 13 | #include <AliRunLoader.h> |
b2a02bce | 14 | #endif |
3e87ef69 | 15 | |
108615fc | 16 | #include <TObject.h> |
b2a02bce | 17 | #include <TFile.h> |
95a00d93 | 18 | #include <TTree.h> |
95a00d93 | 19 | |
108615fc | 20 | class AliL3SpacePointData; |
21 | class AliL3DigitRowData; | |
22 | class AliL3TrackSegmentData; | |
23 | class AliL3TrackArray; | |
24 | ||
25 | class AliL3FileHandler:public AliL3MemHandler{ | |
b2a02bce | 26 | |
27 | protected: | |
28 | #ifdef use_newio | |
b1ed0288 | 29 | AliRunLoader *fInAli;//! |
30 | Bool_t fUseRunLoader; //use runloader | |
b2a02bce | 31 | #else |
b1ed0288 | 32 | TFile *fInAli;//! |
b2a02bce | 33 | #endif |
de3c3890 | 34 | |
b1ed0288 | 35 | AliTPCParam *fParam;//! |
36 | AliSimDigits *fDigits;//! | |
1f1942b8 | 37 | |
b1ed0288 | 38 | TTree *fDigitsTree;//! |
108615fc | 39 | FILE *fMC;//! |
a6e4f9d6 | 40 | |
02f030e3 | 41 | Bool_t fIndexCreated; //is index created |
42 | Int_t fIndex[36][159]; //stores index over digitstree | |
43 | //for faster access w/o ASVVERSION | |
1f1942b8 | 44 | Bool_t fUseStaticIndex; //take static index |
b1ed0288 | 45 | static Bool_t fgStaticIndexCreated; //global index created |
46 | static Int_t fgStaticIndex[36][159]; //global index | |
02f030e3 | 47 | |
b1ed0288 | 48 | virtual Bool_t SetAliInput(); |
a6e4f9d6 | 49 | Bool_t GetDigitsTree(Int_t event); |
02f030e3 | 50 | Bool_t CreateIndex(); //create the index |
51 | ||
108615fc | 52 | public: |
1f1942b8 | 53 | AliL3FileHandler(Bool_t b=kFALSE); |
b2a02bce | 54 | ~AliL3FileHandler(); |
108615fc | 55 | |
a815f9dd | 56 | void FreeDigitsTree(); |
1f1942b8 | 57 | static void CleanStaticIndex(); |
58 | static Int_t SaveStaticIndex(Char_t *prefix=0,Int_t event=0); | |
59 | static Int_t LoadStaticIndex(Char_t *prefix=0,Int_t event=0); | |
60 | ||
3e87ef69 | 61 | Bool_t SetAliInput(Char_t *name); |
b2a02bce | 62 | Bool_t SetAliInput(TFile *file); |
63 | #ifdef use_newio | |
a27af97b | 64 | Bool_t SetAliInput(AliRunLoader *runLoader); |
b2a02bce | 65 | #else |
66 | #endif | |
108615fc | 67 | void CloseAliInput(); |
68a27388 | 68 | Bool_t IsDigit(Int_t event); |
a815f9dd | 69 | |
3e87ef69 | 70 | Bool_t SetMCOutput(Char_t *name); |
108615fc | 71 | Bool_t SetMCOutput(FILE *file); |
72 | void CloseMCOutput(); | |
73 | ||
74 | //Digit IO | |
3e87ef69 | 75 | Bool_t AliDigits2Binary(Int_t event=0,Bool_t altro=kFALSE); |
31d9405a | 76 | AliL3DigitRowData *AliDigits2Memory(UInt_t & nrow,Int_t event=0); //Allocates Memory |
b2a02bce | 77 | AliL3DigitRowData *AliAltroDigits2Memory(UInt_t & nrow,Int_t event=0,Bool_t eventmerge=kFALSE); |
78 | //Allocates Memory | |
954beff0 | 79 | Bool_t AliDigits2CompBinary(Int_t event=0,Bool_t altro=kFALSE); |
0d319e67 | 80 | void AliDigits2RootFile(AliL3DigitRowData *rowPt,Char_t *new_digitsfile); |
108615fc | 81 | |
82 | //Point IO | |
3e87ef69 | 83 | Bool_t AliPoints2Binary(Int_t eventn=0); |
84 | AliL3SpacePointData *AliPoints2Memory(UInt_t & npoint,Int_t eventn=0);//Allocates Memory | |
108615fc | 85 | |
b661165c | 86 | ClassDef(AliL3FileHandler,1) //Filehandler class |
108615fc | 87 | }; |
88 | ||
89 | #endif |