////////////////////////////////////////////////////////// // This class has been automatically generated on // Wed Aug 17 13:00:57 2011 by ROOT version 5.29/02 // from TTree nEmcPhotons/EMC Photons // found on file: tree1.root ////////////////////////////////////////////////////////// #ifndef treeFairRunAna_h #define treeFairRunAna_h #include #include #include #include #include #include #include #include //#include "FairMCPoint.h" #include "FairRunAna.h" #include "PndGemDigi.h" class treeFairRunAna : public TSelector { public : TTree *fChain; //!pointer to the analyzed TTree or TChain FairRunAna* fRunAna; TProofOutputFile *fProofFile; TFile *fFile; TTree *fOutTree; treeFairRunAna(TTree * /*tree*/ =0) : fProofFile(0), fFile(0) { } virtual ~treeFairRunAna() { } virtual Int_t Version() const { return 2; } virtual void Begin(TTree *tree); virtual void SlaveBegin(TTree *tree); virtual void Init(TTree *tree); virtual Bool_t Notify(); virtual Bool_t Process(Long64_t entry); virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; } virtual void SetOption(const char *option) { fOption = option; } virtual void SetObject(TObject *obj) { fObject = obj; } virtual void SetInputList(TList *input) { fInput = input; } virtual TList *GetOutputList() const { return fOutput; } virtual void SlaveTerminate(); virtual void Terminate(); ClassDef(treeFairRunAna,0); }; #endif #ifdef treeFairRunAna_C void treeFairRunAna::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses and branch // pointers of the tree will be set. // It is normally not necessary to make changes to the generated // code, but the routine can be extended by the user if needed. // Init() will be called many times when running on PROOF // (once per file to be processed). // Set branch addresses and branch pointers if (!tree) { cout << "there's no tree in Init()" << endl; return; } else { cout << "got the tree " << tree << endl; tree->Print(); } fChain = tree; // fChain->SetMakeClass(1); fChain->SetBranchStatus("*",0); fChain->SetBranchStatus("GEMDigi",1); fChain->SetBranchStatus("GEMDigi.*",1); fChain->SetBranchStatus("GEMDigi.fDefaultType",0); fChain->SetBranchStatus("EventHeader.",1); fChain->SetBranchStatus("EventHeader.*",1); cout << "vvvvvvvvvvvvvvvvvvvvvvvvvvvvv fRunAna->Init() vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv" << endl; fRunAna->Init(); cout << "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fRunAna->Init() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" << endl; } Bool_t treeFairRunAna::Notify() { // The Notify() function is called when a new file is opened. This // can be either for a new TTree in a TChain or when when a new TTree // is started when using PROOF. It is normally not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. The return value is currently not used. return kTRUE; } #endif // #ifdef treeFairRunAna_cxx