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