////////////////////////////////////////////////////////// // This class has been automatically generated on // Fri Aug 17 14:23:30 2018 by ROOT version 6.12/06 // from TTree lemma/silicon ntuple // found on file: si.root ////////////////////////////////////////////////////////// #ifndef TBAlign_h #define TBAlign_h #include #include #include // Header file for the classes stored in the TTree if any. class TBAlign { 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 Int_t iev; Int_t nhits; Int_t subdet[500]; //[nhits] Float_t xh[500]; //[nhits] Float_t yh[500]; //[nhits] Float_t zh[500]; //[nhits] Int_t itrack[500]; //[nhits] // List of branches TBranch *b_iev; //! TBranch *b_nhits; //! TBranch *b_subdet; //! TBranch *b_xh; //! TBranch *b_yh; //! TBranch *b_zh; //! TBranch *b_itrack; //! TBAlign(TTree *tree=0); virtual ~TBAlign(); 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 TBAlign_cxx TBAlign::TBAlign(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("C:/si-calo-sep18/si-500596.root"); if (!f || !f->IsOpen()) { f = new TFile("C:/si-calo-sep18/si-500596.root"); } f->GetObject("lemma",tree); } Init(tree); } TBAlign::~TBAlign() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t TBAlign::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t TBAlign::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 TBAlign::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; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("iev", &iev, &b_iev); fChain->SetBranchAddress("nhits", &nhits, &b_nhits); fChain->SetBranchAddress("subdet", subdet, &b_subdet); fChain->SetBranchAddress("xh", xh, &b_xh); fChain->SetBranchAddress("yh", yh, &b_yh); fChain->SetBranchAddress("zh", zh, &b_zh); fChain->SetBranchAddress("itrack", itrack, &b_itrack); Notify(); } Bool_t TBAlign::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 TBAlign::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t TBAlign::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef TBAlign_cxx