////////////////////////////////////////////////////////// // This class has been automatically generated on // Tue May 8 18:00:01 2007 by ROOT version 5.14/00e // from TTree ntp1/Isr Gammas // found on file: small.root ////////////////////////////////////////////////////////// #ifndef TreeClass2_h #define TreeClass2_h #include #include #include class TreeClass2 { 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 runNumber; Int_t gamma_ndigis; Int_t gamma_digiList_phi[61]; //[gamma_ndigis] Int_t gamma_digiList_theta[61]; //[gamma_ndigis] // List of branches TBranch *b_runNumber; //! TBranch *b_gamma_ndigis; //! TBranch *b_gamma_digiList_phi; //! TBranch *b_gamma_digiList_theta; //! TreeClass2(TTree *tree=0); virtual ~TreeClass2(); 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 TreeClass2_cxx TreeClass2::TreeClass2(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("small.root"); if (!f) { f = new TFile("small.root"); } tree = (TTree*)gDirectory->Get("ntp1"); } Init(tree); } TreeClass2::~TreeClass2() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t TreeClass2::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t TreeClass2::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 TreeClass2::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 branch addresses and branch pointers if (!tree) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber); fChain->SetBranchAddress("gamma_ndigis", &gamma_ndigis, &b_gamma_ndigis); fChain->SetBranchAddress("gamma_digiList_phi", gamma_digiList_phi, &b_gamma_digiList_phi); fChain->SetBranchAddress("gamma_digiList_theta", gamma_digiList_theta, &b_gamma_digiList_theta); Notify(); } Bool_t TreeClass2::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 TreeClass2::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t TreeClass2::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef TreeClass2_cxx