]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCFileHandler.h
New version of SPD raw-data reconstruction. The format now correponds to the actual...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCFileHandler.h
CommitLineData
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
9class 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>
600e6a1b 20#include "AliHLTLogging.h"
a6c02c85 21
22class AliHLTTPCSpacePointData;
23class AliHLTTPCDigitRowData;
24class AliHLTTPCTrackSegmentData;
25class AliHLTTPCTrackArray;
26
600e6a1b 27class AliHLTTPCFileHandler:public AliHLTTPCMemHandler, public AliHLTLogging {
a6c02c85 28
29 protected:
30#ifdef use_newio
31 AliRunLoader *fInAli;//!
32 Bool_t fUseRunLoader; //use runloader
33#else
34 TFile *fInAli;//!
35#endif
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:
600e6a1b 55 /** standard constructor */
a6c02c85 56 AliHLTTPCFileHandler(Bool_t b=kFALSE);
600e6a1b 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 */
a6c02c85 62 ~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(TFile *file);
71#ifdef use_newio
72 Bool_t SetAliInput(AliRunLoader *runLoader);
73#else
74#endif
75 void CloseAliInput();
76 Bool_t IsDigit(Int_t event);
77
78 Bool_t SetMCOutput(Char_t *name);
79 Bool_t SetMCOutput(FILE *file);
80 void CloseMCOutput();
81
82 //Digit IO
83 Bool_t AliDigits2Binary(Int_t event=0,Bool_t altro=kFALSE);
84 AliHLTTPCDigitRowData *AliDigits2Memory(UInt_t & nrow,Int_t event=0); //Allocates Memory
85 AliHLTTPCDigitRowData *AliAltroDigits2Memory(UInt_t & nrow,Int_t event=0,Bool_t eventmerge=kFALSE);
86 //Allocates Memory
87 Bool_t AliDigits2CompBinary(Int_t event=0,Bool_t altro=kFALSE);
88 void AliDigits2RootFile(AliHLTTPCDigitRowData *rowPt,Char_t *new_digitsfile);
89
90 //Point IO
91 Bool_t AliPoints2Binary(Int_t eventn=0);
92 AliHLTTPCSpacePointData *AliPoints2Memory(UInt_t & npoint,Int_t eventn=0);//Allocates Memory
93
94 ClassDef(AliHLTTPCFileHandler,1) //Filehandler class
95};
96
97#endif