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