////////////////////////////////////////////////////////// // This class has been automatically generated on // Wed May 28 15:46:00 2008 by ROOT version 5.17/04 // from TTree CollectionTree/ntuple.root // found on file: ../data/AtlasClustersJ5.root ////////////////////////////////////////////////////////// #ifndef CollectionTree_h #define CollectionTree_h #include #include #include class CollectionTree { public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Declaration of leave types Int_t cl_nctotal_rawtopo; Int_t cl_nc_rawtopo; vector *cl_et_rawtopo; vector *cl_e_rawtopo; vector *cl_eta_rawtopo; vector *cl_phi_rawtopo; Int_t cl_nctotal_caltopo; Int_t cl_nc_caltopo; vector *cl_et_caltopo; vector *cl_e_caltopo; vector *cl_eta_caltopo; vector *cl_phi_caltopo; // List of branches TBranch *b_cl_nctotal_rawtopo; //! TBranch *b_cl_nc_rawtopo; //! TBranch *b_cl_et_rawtopo; //! TBranch *b_cl_e_rawtopo; //! TBranch *b_cl_eta_rawtopo; //! TBranch *b_cl_phi_rawtopo; //! TBranch *b_cl_nctotal_caltopo; //! TBranch *b_cl_nc_caltopo; //! TBranch *b_cl_et_caltopo; //! TBranch *b_cl_e_caltopo; //! TBranch *b_cl_eta_caltopo; //! TBranch *b_cl_phi_caltopo; //! CollectionTree(TTree *tree=0); virtual ~CollectionTree(); 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 CollectionTree_cxx CollectionTree::CollectionTree(TTree *tree) { // 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("../data/AtlasClustersJ5.root"); if (!f) { f = new TFile("../data/AtlasClustersJ5.root"); } tree = (TTree*)gDirectory->Get("CollectionTree"); } Init(tree); } CollectionTree::~CollectionTree() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t CollectionTree::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t CollectionTree::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->InheritsFrom(TChain::Class())) return centry; TChain *chain = (TChain*)fChain; if (chain->GetTreeNumber() != fCurrent) { fCurrent = chain->GetTreeNumber(); Notify(); } return centry; } void CollectionTree::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 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 on PROOF // (once per file to be processed). // Set object pointer cl_et_rawtopo = 0; cl_e_rawtopo = 0; cl_eta_rawtopo = 0; cl_phi_rawtopo = 0; cl_et_caltopo = 0; cl_e_caltopo = 0; cl_eta_caltopo = 0; cl_phi_caltopo = 0; // Set branch addresses and branch pointers if (!tree) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("cl_nctotal_rawtopo", &cl_nctotal_rawtopo, &b_cl_nctotal_rawtopo); fChain->SetBranchAddress("cl_nc_rawtopo", &cl_nc_rawtopo, &b_cl_nc_rawtopo); fChain->SetBranchAddress("cl_et_rawtopo", &cl_et_rawtopo, &b_cl_et_rawtopo); fChain->SetBranchAddress("cl_e_rawtopo", &cl_e_rawtopo, &b_cl_e_rawtopo); fChain->SetBranchAddress("cl_eta_rawtopo", &cl_eta_rawtopo, &b_cl_eta_rawtopo); fChain->SetBranchAddress("cl_phi_rawtopo", &cl_phi_rawtopo, &b_cl_phi_rawtopo); fChain->SetBranchAddress("cl_nctotal_caltopo", &cl_nctotal_caltopo, &b_cl_nctotal_caltopo); fChain->SetBranchAddress("cl_nc_caltopo", &cl_nc_caltopo, &b_cl_nc_caltopo); fChain->SetBranchAddress("cl_et_caltopo", &cl_et_caltopo, &b_cl_et_caltopo); fChain->SetBranchAddress("cl_e_caltopo", &cl_e_caltopo, &b_cl_e_caltopo); fChain->SetBranchAddress("cl_eta_caltopo", &cl_eta_caltopo, &b_cl_eta_caltopo); fChain->SetBranchAddress("cl_phi_caltopo", &cl_phi_caltopo, &b_cl_phi_caltopo); Notify(); } Bool_t CollectionTree::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 normaly 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 CollectionTree::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t CollectionTree::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef CollectionTree_cxx