////////////////////////////////////////////////////////// // This class has been automatically generated on // Wed Jun 15 13:41:50 2016 by ROOT version 5.34/36 // from TTree Event/ // found on file: Cosmic_rate_tuple.root ////////////////////////////////////////////////////////// #ifndef example_test_h #define example_test_h #include #include #include // Header file for the classes stored in the TTree if any. #include // Fixed size dimensions of array or collections stored in the TTree if any. class example_test { public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Declaration of leaf types vector *pt; vector *charge; vector *chi2; vector *chi2_ndof; vector *eta; vector *theta; vector *phi; vector *p; vector *d0; vector *dz; vector *nvh; Int_t ntrk; vector *DTtime; // List of branches TBranch *b_pt; //! TBranch *b_charge; //! TBranch *b_chi2; //! TBranch *b_chi2_ndof; //! TBranch *b_eta; //! TBranch *b_theta; //! TBranch *b_phi; //! TBranch *b_p; //! TBranch *b_d0; //! TBranch *b_dz; //! TBranch *b_nvh; //! TBranch *b_ntrk; //! TBranch *b_DTtime; //! example_test(TTree *tree=0); virtual ~example_test(); virtual Int_t Cut(Long64_t entry); virtual Int_t GetEntry(Long64_t entry); virtual Long64_t LoadTree(Long64_t entry); virtual void Init(TTree *tree); virtual void Loop(); virtual Bool_t Notify(); virtual void Show(Long64_t entry = -1); }; #endif #ifdef example_test_cxx example_test::example_test(TTree *tree) : fChain(0) { // if parameter tree is not specified (or zero), connect the file // used to generate this class and read the Tree. if (tree == 0) { TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("Cosmic_rate_tuple.root"); if (!f || !f->IsOpen()) { f = new TFile("Cosmic_rate_tuple.root"); } f->GetObject("Event",tree); } Init(tree); } example_test::~example_test() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t example_test::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t example_test::LoadTree(Long64_t entry) { // Set the environment to read one entry if (!fChain) return -5; Long64_t centry = fChain->LoadTree(entry); if (centry < 0) return centry; if (fChain->GetTreeNumber() != fCurrent) { fCurrent = fChain->GetTreeNumber(); Notify(); } return centry; } void example_test::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 object pointer pt = 0; charge = 0; chi2 = 0; chi2_ndof = 0; eta = 0; theta = 0; phi = 0; p = 0; d0 = 0; dz = 0; nvh = 0; DTtime = 0; // Set branch addresses and branch pointers if (!tree) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("pt", &pt, &b_pt); fChain->SetBranchAddress("charge", &charge, &b_charge); fChain->SetBranchAddress("chi2", &chi2, &b_chi2); fChain->SetBranchAddress("chi2_ndof", &chi2_ndof, &b_chi2_ndof); fChain->SetBranchAddress("eta", &eta, &b_eta); fChain->SetBranchAddress("theta", &theta, &b_theta); fChain->SetBranchAddress("phi", &phi, &b_phi); fChain->SetBranchAddress("p", &p, &b_p); fChain->SetBranchAddress("d0", &d0, &b_d0); fChain->SetBranchAddress("dz", &dz, &b_dz); fChain->SetBranchAddress("nvh", &nvh, &b_nvh); fChain->SetBranchAddress("ntrk", &ntrk, &b_ntrk); fChain->SetBranchAddress("DTtime", &DTtime, &b_DTtime); Notify(); } Bool_t example_test::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; } void example_test::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t example_test::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef example_test_cxx