]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/AliReaderAOD.h
Bug corrections
[u/mrichter/AliRoot.git] / ANALYSIS / AliReaderAOD.h
1 #ifndef ALIREADERAOD_H
2 #define ALIREADERAOD_H
3
4 #include "AliReader.h"
5
6 class TTree;
7 class TFile;
8
9 class AliReaderAOD: public AliReader
10 {
11   public:
12     AliReaderAOD(const Char_t* aodfilename = "AOD.root");
13     virtual ~AliReaderAOD();
14
15     void          ReadSimulatedData(Bool_t flag){fReadSim = flag;}//switches reading MC data
16     Bool_t        ReadsRec() const {return kTRUE;}
17     Bool_t        ReadsSim() const {return fReadSim;}
18
19     void          Rewind();
20
21
22     static Int_t WriteAOD(AliReader* reader, const char* outfilename = "AliAOD.root", //reads tracks from runs and writes them to file
23                           const char* pclassname = "AliAODParticle", Bool_t multcheck = kFALSE);
24     
25   protected:
26     virtual Int_t         ReadNext();
27     virtual Int_t        OpenFile(Int_t evno);//opens files to be read for given event
28
29     static const TString  fgkTreeName;//name of branch holding simulated data
30     static const TString  fgkRecosntructedDataBranchName;//name of branch holding reconstructed data
31     static const TString  fgkSimulatedDataBranchName;//name of branch holding simulated data
32     
33   
34   private:
35     TString fFileName;//File name
36     
37     Bool_t  fReadSim;//indicates if to read simulated data
38
39     TTree*        fTree;//!tree
40     TFile*        fFile;//!file
41     AliAOD*       fSimBuffer;//!buffer array that tree is read to
42     AliAOD*       fRecBuffer;//!
43     
44     
45     ClassDef(AliReaderAOD,1)
46 };
47
48 #endif