]>
Commit | Line | Data |
---|---|---|
1b446896 | 1 | #ifndef ALIHBTREADER_H |
2 | #define ALIHBTREADER_H | |
3 | ||
2de2e2c6 | 4 | #include <TNamed.h> |
bed069a4 | 5 | #include <TObjArray.h> |
1b446896 | 6 | |
7 | //Reader Base class (reads particles and tracks and | |
0fdcc83d | 8 | //puts it to the AliHBTRun objects |
1b446896 | 9 | //Piotr.Skowronski@cern.ch |
10 | ||
11 | class AliHBTRun; | |
12 | class AliHBTEvent; | |
13 | class AliHBTParticleCut; | |
1b446896 | 14 | class AliHBTParticle; |
0fdcc83d | 15 | class TString; |
88cb7938 | 16 | |
2de2e2c6 | 17 | class AliHBTReader: public TNamed |
1b446896 | 18 | { |
19 | public: | |
20 | AliHBTReader(); | |
0fdcc83d | 21 | AliHBTReader(TObjArray*); |
1b446896 | 22 | virtual ~AliHBTReader(); |
1b446896 | 23 | |
bed069a4 | 24 | virtual Int_t Next(); |
25 | virtual void Rewind() = 0; | |
1b446896 | 26 | |
bed069a4 | 27 | virtual Bool_t ReadsTracks() const = 0; |
28 | virtual Bool_t ReadsParticles() const = 0; | |
4e7d5d5f | 29 | |
bed069a4 | 30 | void AddParticleCut(AliHBTParticleCut* cut); |
31 | ||
32 | virtual Int_t Read(AliHBTRun* particles, AliHBTRun *tracks); | |
33 | ||
efaf00f8 | 34 | virtual AliHBTEvent* GetParticleEvent() {return fParticlesEvent;}//can not be const because position randomizer overloads it |
35 | virtual AliHBTEvent* GetTrackEvent() {return fTracksEvent;}// | |
bed069a4 | 36 | |
37 | virtual AliHBTEvent* GetParticleEvent(Int_t); | |
38 | virtual AliHBTEvent* GetTrackEvent(Int_t); | |
39 | ||
40 | virtual Int_t GetNumberOfPartEvents(); | |
41 | virtual Int_t GetNumberOfTrackEvents(); | |
42 | ||
43 | void SetDirs(TObjArray* dirs){fDirs = dirs;} //sets array directories names | |
44 | void SetEventBuffering(Bool_t flag){fBufferEvents = flag;} | |
45 | ||
46 | virtual Int_t GetNumberOfDirs() const {return (fDirs)?fDirs->GetEntries():0;} | |
1b446896 | 47 | protected: |
48 | ||
bed069a4 | 49 | TObjArray* fCuts;//array with particle cuts |
50 | TObjArray* fDirs;//arry with directories to read data from | |
51 | ||
52 | Int_t fCurrentEvent;//! number of current event in current directory | |
53 | Int_t fCurrentDir;//! number of current directory | |
54 | ||
55 | Int_t fNEventsRead;//!total | |
56 | ||
57 | AliHBTEvent* fTracksEvent; //! tracks read from current event | |
58 | AliHBTEvent* fParticlesEvent; //! particles read from current event | |
59 | ||
60 | AliHBTRun* fParticles; //!simulated particles | |
61 | AliHBTRun* fTracks; //!reconstructed tracks (particles) | |
62 | ||
63 | Bool_t fIsRead;//!flag indicating if the data are already read | |
64 | Bool_t fBufferEvents;//flag indicating if the data should be bufferred | |
65 | ||
66 | virtual Int_t ReadNext() = 0; //this methods reads next event and put result in fTracksEvent and/or fParticlesEvent | |
1b446896 | 67 | Bool_t Pass(AliHBTParticle*); |
68 | Bool_t Pass(Int_t pid); | |
0fdcc83d | 69 | |
70 | TString& GetDirName(Int_t); | |
1b446896 | 71 | |
72 | private: | |
73 | ||
74 | public: | |
2de2e2c6 | 75 | ClassDef(AliHBTReader,2)//version 2 - TNamed as parental class |
76 | ||
1b446896 | 77 | }; |
78 | ||
79 | #endif |