]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HBTAN/AliHBTReaderInternal.h
Working version (P.Skowronski)
[u/mrichter/AliRoot.git] / HBTAN / AliHBTReaderInternal.h
1 #ifndef ALIHBTREADERINTERNAL_H
2 #define ALIHBTREADERINTERNAL_H
3
4 #include "AliHBTReader.h"
5
6 //Multi file reader for Internal Data Format
7 //
8 //This reader reads data created by
9 //                  
10 //Piotr.Skowronski@cern.ch
11 //more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
12
13
14 #include <TString.h>
15 class TFile;
16 class TTree;
17 class TBranch;
18 class TClonesArray;
19
20 class AliHBTReaderInternal: public AliHBTReader
21 {
22   public:
23     AliHBTReaderInternal();
24     AliHBTReaderInternal(const char *filename);
25     AliHBTReaderInternal(TObjArray* dirs, const char *filename);
26     virtual ~AliHBTReaderInternal();
27     
28     void          Rewind();
29     
30     Bool_t        ReadsTracks() const {return kTRUE;}
31     Bool_t        ReadsParticles() const {return kTRUE;}
32     
33     static Int_t Write(AliHBTReader* reader,const char* outfile = "data.root", Bool_t multcheck = kFALSE);//reads tracks from runs and writes them to file
34     
35   protected:
36     
37     TString       fFileName;//name of the file with tracks
38     TBranch*      fPartBranch;//!branch with particles
39     TBranch*      fTrackBranch;//!branch with tracks
40     TTree*        fTree;//!tree
41     TFile*        fFile;//!file
42     TClonesArray* fPartBuffer;//!buffer array that tree is read to
43     TClonesArray* fTrackBuffer;//!
44         
45     Int_t         ReadNext();//reads next event
46     Int_t         OpenNextFile();//opens file to be read for given event 
47     static Bool_t FindIndex(TClonesArray* arr,Int_t idx);
48     
49     ClassDef(AliHBTReaderInternal,2)
50 };
51 #endif