////////////////////////////////////////////////////////// // This class has been automatically generated on // Fri May 15 11:22:23 2015 by ROOT version 6.02/08 // from TTree EventTree/Tutorial tree // found on file: http://lcg-heppkg.web.cern.ch/lcg-heppkg/ROOT/eventdata.root ////////////////////////////////////////////////////////// #ifndef myselector_h #define myselector_h #include #include #include #include // Header file for the classes stored in the TTree if any. class myselector : public TSelector { public : TTree *fChain; //!pointer to the analyzed TTree or TChain // Fixed size dimensions of array or collections stored in the TTree if any. // const Int_t kMaxfParticles = 1200; // Declaration of leaf types //EventData *event; Int_t fParticles_; Double_t fParticles_fPosX[1200]; //[fParticles_] Double_t fParticles_fPosY[1200]; //[fParticles_] Double_t fParticles_fPosZ[1200]; //[fParticles_] Double_t fParticles_fMomentum[1200]; //[fParticles_] Double_t fParticles_fMomentumPhi[1200]; //[fParticles_] Double_t fParticles_fMomentumEta[1200]; //[fParticles_] Long64_t fParticles_fTags[1200][128]; //[fParticles_] Int_t fEventSize; // List of branches TBranch *b_event_fParticles_; //! TBranch *b_fParticles_fPosX; //! TBranch *b_fParticles_fPosY; //! TBranch *b_fParticles_fPosZ; //! TBranch *b_fParticles_fMomentum; //! TBranch *b_fParticles_fMomentumPhi; //! TBranch *b_fParticles_fMomentumEta; //! TBranch *b_fParticles_fTags; //! TBranch *b_event_fEventSize; //! myselector(TTree * /*tree*/ =0) : fChain(0) { } virtual ~myselector() { } 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(myselector,0); }; #endif #ifdef myselector_cxx void myselector::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) return; fChain = tree; fChain->SetMakeClass(1); fChain->SetBranchAddress("fParticles", &fParticles_, &b_event_fParticles_); fChain->SetBranchAddress("fParticles.fPosX", fParticles_fPosX, &b_fParticles_fPosX); fChain->SetBranchAddress("fParticles.fPosY", fParticles_fPosY, &b_fParticles_fPosY); fChain->SetBranchAddress("fParticles.fPosZ", fParticles_fPosZ, &b_fParticles_fPosZ); fChain->SetBranchAddress("fParticles.fMomentum", fParticles_fMomentum, &b_fParticles_fMomentum); fChain->SetBranchAddress("fParticles.fMomentumPhi", fParticles_fMomentumPhi, &b_fParticles_fMomentumPhi); fChain->SetBranchAddress("fParticles.fMomentumEta", fParticles_fMomentumEta, &b_fParticles_fMomentumEta); fChain->SetBranchAddress("fParticles.fTags[128]", fParticles_fTags, &b_fParticles_fTags); fChain->SetBranchAddress("fEventSize", &fEventSize, &b_event_fEventSize); } Bool_t myselector::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 myselector_cxx