////////////////////////////////////////////////////////// // This class has been automatically generated on // Fri Dec 23 06:59:04 2022 by ROOT version 6.24/06 // from TTree Tree1/RawData // found on file: Sim.root ////////////////////////////////////////////////////////// #ifndef Tree1_h #define Tree1_h #include #include #include // Header file for the classes stored in the TTree if any. #include "vector" class Tree1 { public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Fixed size dimensions of array or collections stored in the TTree if any. // Declaration of leaf types vector *Edep; vector *Zint; vector *Ep; vector *Egammacascade; vector *Egamma; vector *Pgx; vector *Pgy; vector *Pgz; // List of branches TBranch *b_Edep; //! TBranch *b_Zint; //! TBranch *b_Ep; //! TBranch *b_Egammacascade; //! TBranch *b_Egamma; //! TBranch *b_Pgx; //! TBranch *b_Pgy; //! TBranch *b_Pgz; //! Tree1(TTree *tree=0); virtual ~Tree1(); 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 Tree1_cxx Tree1::Tree1(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("Sim.root"); if (!f || !f->IsOpen()) { f = new TFile("Sim.root"); } f->GetObject("Tree1",tree); } Init(tree); } Tree1::~Tree1() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t Tree1::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t Tree1::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 Tree1::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 Edep = 0; Zint = 0; Ep = 0; Egammacascade = 0; Egamma = 0; Pgx = 0; Pgy = 0; Pgz = 0; // Set branch addresses and branch pointers if (!tree) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("Edep", &Edep, &b_Edep); fChain->SetBranchAddress("Zint", &Zint, &b_Zint); fChain->SetBranchAddress("Ep", &Ep, &b_Ep); fChain->SetBranchAddress("Egammacascade", &Egammacascade, &b_Egammacascade); fChain->SetBranchAddress("Egamma", &Egamma, &b_Egamma); fChain->SetBranchAddress("Pgx", &Pgx, &b_Pgx); fChain->SetBranchAddress("Pgy", &Pgy, &b_Pgy); fChain->SetBranchAddress("Pgz", &Pgz, &b_Pgz); Notify(); } Bool_t Tree1::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 Tree1::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t Tree1::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef Tree1_cxx