////////////////////////////////////////////////////////// // This class has been automatically generated on // Tue Apr 13 17:41:24 2004 by ROOT version 4.00/03 // from TTree T/An example of a ROOT tree // found on file: Event45000.root ////////////////////////////////////////////////////////// #ifndef EventSelector_h #define EventSelector_h #include #include #include #include class EventSelector : public TSelector { public : TTree *fChain; //!pointer to the analyzed TTree or TChain // Declaration of leave types Event *event; Event *firstevent; TInfo *infoobj; TStopwatch timer; Int_t nselected,nb,nevent; Float_t mbytes,time,cputime; // List of branches TBranch *b_event; //! TBranch *b_event_fNtrack; //! EventSelector(TTree *tree=0){ event = new Event; firstevent = new Event; nselected = 0; nb = 0; nevent = 0; mbytes = 0; time = 0; cputime = 0; } ~EventSelector() { } Int_t Version() const {return 1;} void Begin(TTree *tree); void SlaveBegin(TTree *tree); void Init(TTree *tree); Bool_t Notify(); Bool_t Process(Int_t entry); void SetOption(const char *option) { fOption = option; } void SetObject(TObject *obj) { fObject = obj; } void SetInputList(TList *input) {fInput = input;} TList *GetOutputList() const { return fOutput; } void SlaveTerminate(); void Terminate(); ClassDef(EventSelector,0); }; #endif #ifdef EventSelector_cxx void EventSelector::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses of the tree // will be set. It is normaly 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 with PROOF. // Set object pointer event = 0; firstevent = 0; infoobj = 0; // Set branch addresses if (tree == 0) return; fChain = tree; // fChain->SetMakeClass(1); fChain->SetBranchAddress("event",&event); } Bool_t EventSelector::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. Typically here the branch pointers // will be retrieved. It is normaly not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. // Get branch pointers b_event = fChain->GetBranch("event"); b_event_fNtrack = fChain->GetBranch("fNtrack"); return kTRUE; } #endif // #ifdef EventSelector_cxx