539b6cb4 |
1 | #ifndef ALISELECTOR_H |
2 | #define ALISELECTOR_H |
3 | |
4 | #include <TFile.h> |
5 | #include <TSelector.h> |
6 | #include <TChain.h> |
7 | |
8 | #include <AliESD.h> |
9 | #include <AliHeader.h> |
10 | #include <AliRun.h> |
11 | #include <AliRunLoader.h> |
12 | |
4dd2ad81 |
13 | class TParticle; |
14 | |
539b6cb4 |
15 | class AliSelector : public TSelector { |
16 | public: |
17 | AliSelector(TTree *tree=0); |
18 | virtual ~AliSelector(); |
19 | |
20 | virtual Int_t Version() const {return 1;} |
21 | virtual void Begin(TTree *tree); |
22 | virtual void SlaveBegin(TTree *tree); |
23 | virtual void Init(TTree *tree); |
24 | virtual Bool_t Notify(); |
25 | virtual Bool_t Process(Long64_t entry); |
26 | virtual void SlaveTerminate(); |
27 | virtual void Terminate(); |
28 | |
29 | protected: |
30 | TTree* GetKinematics(); |
31 | AliRun* GetAliRun(); |
32 | |
4dd2ad81 |
33 | Bool_t IsPrimaryCharged(TParticle* aParticle, Int_t aTotalPrimaries) const; |
34 | |
539b6cb4 |
35 | TChain *fChain; //! pointer to the analyzed TTree or TChain |
36 | |
79ab56b9 |
37 | AliESD* fESD; //! "ESD" branch in fChain |
38 | AliHeader* fHeader; //! "TE" branch in fChain, contains event header |
539b6cb4 |
39 | |
40 | private: |
41 | void DeleteKinematicsFile(); |
42 | void DeleteRunLoader(); |
43 | |
79ab56b9 |
44 | TFile* fKineFile; //! pointer to Kinematics.root if the file was opened |
45 | AliRunLoader* fRunLoader; //! pointer to the RunLoader if galice.root was opened |
539b6cb4 |
46 | |
47 | ClassDef(AliSelector,0); |
48 | }; |
49 | |
50 | #endif |