ATLAS Offline Software
Loading...
Searching...
No Matches
TrkValidationNtupleRIOs.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6// This class has been automatically generated on
7// Sat Mar 29 16:22:45 2008 by ROOT version 5.18/00
8// from TTree TRT_RIOs/TRT_DriftCircles
9// found on file: TrkValidation2.root
11
12#ifndef TrkValidationNtupleRIOs_h
13#define TrkValidationNtupleRIOs_h
14
15#include <TROOT.h>
16#include <TChain.h>
17#include <TFile.h>
18#include <vector>
19using namespace std;
20
21#ifdef __CINT__
22#pragma link C++ class vector< int >;
23#pragma link C++ class vector< float >;
24#endif
25
27public :
28 TTree *fChain;
29 Int_t fCurrent;
30
31 // Declaration of leaf types
33 Int_t TRT_nRIOs;
34 vector<float> *TRT_DriftRadius;
35 vector<float> *TRT_SurfaceX;
36 vector<float> *TRT_SurfaceY;
37 vector<float> *TRT_SurfaceZ;
38
39 // List of branches
43 TBranch *b_TRT_SurfaceX;
44 TBranch *b_TRT_SurfaceY;
45 TBranch *b_TRT_SurfaceZ;
46
49 virtual Int_t Cut(Long64_t entry);
50 virtual Int_t GetEntry(Long64_t entry);
51 virtual Long64_t LoadTree(Long64_t entry);
52 virtual void Init(TTree *tree);
53 virtual void Loop();
54 virtual Bool_t Notify();
55 virtual void Show(Long64_t entry = -1);
56
59};
60
61#endif
62
63#ifdef TrkValidationNtupleRIOs_cxx
65{
66// if parameter tree is not specified (or zero), connect the file
67// used to generate this class and read the Tree.
68 if (tree == 0) {
69 TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("TrkValidation2.root");
70 if (!f) {
71 f = new TFile("TrkValidation2.root");
72 f->cd("TrkValidation2.root:/Validation");
73 }
74 tree = (TTree*)gDirectory->Get("TRT_RIOs");
75
76 }
78}
79
81{
82 if (!fChain) return;
83 delete fChain->GetCurrentFile();
84}
85
86Int_t TrkValidationNtupleRIOs::GetEntry(Long64_t entry)
87{
88// Read contents of entry.
89 if (!fChain) return 0;
90 return fChain->GetEntry(entry);
91}
92Long64_t TrkValidationNtupleRIOs::LoadTree(Long64_t entry)
93{
94// Set the environment to read one entry
95 if (!fChain) return -5;
96 Long64_t centry = fChain->LoadTree(entry);
97 if (centry < 0) return centry;
98 if (!fChain->InheritsFrom(TChain::Class())) return centry;
99 TChain *chain = static_cast<TChain*>(fChain);
100 if (chain->GetTreeNumber() != fCurrent) {
101 fCurrent = chain->GetTreeNumber();
102 Notify();
103 }
104 return centry;
105}
106
108{
109 // The Init() function is called when the selector needs to initialize
110 // a new tree or chain. Typically here the branch addresses and branch
111 // pointers of the tree will be set.
112 // It is normally not necessary to make changes to the generated
113 // code, but the routine can be extended by the user if needed.
114 // Init() will be called many times when running on PROOF
115 // (once per file to be processed).
116
117 // Set object pointer
118 TRT_DriftRadius = 0;
119 TRT_SurfaceX = 0;
120 TRT_SurfaceY = 0;
121 TRT_SurfaceZ = 0;
122 // Set branch addresses and branch pointers
123 if (!tree) return;
124 fChain = tree;
125 fCurrent = -1;
126 fChain->SetMakeClass(1);
127
128 fChain->SetBranchAddress("EventNumber", &TRT_EventNumber, &b_TRT_event_number);
129 fChain->SetBranchAddress("TRT_nRIOs", &TRT_nRIOs, &b_Number_of_RIOs);
130 fChain->SetBranchAddress("TRT_DriftRadius", &TRT_DriftRadius, &b_TRT_DriftRadius);
131 fChain->SetBranchAddress("TRT_SurfaceX", &TRT_SurfaceX, &b_TRT_SurfaceX);
132 fChain->SetBranchAddress("TRT_SurfaceY", &TRT_SurfaceY, &b_TRT_SurfaceY);
133 fChain->SetBranchAddress("TRT_SurfaceZ", &TRT_SurfaceZ, &b_TRT_SurfaceZ);
134 Notify();
135}
136
138{
139 // The Notify() function is called when a new file is opened. This
140 // can be either for a new TTree in a TChain or when when a new TTree
141 // is started when using PROOF. It is normally not necessary to make changes
142 // to the generated code, but the routine can be extended by the
143 // user if needed. The return value is currently not used.
144
145 return kTRUE;
146}
147
148void TrkValidationNtupleRIOs::Show(Long64_t entry)
149{
150// Print contents of entry.
151// If entry is not specified, print current entry
152 if (!fChain) return;
153 fChain->Show(entry);
154}
155Int_t TrkValidationNtupleRIOs::Cut(Long64_t entry)
156{
157// This function may be called from Loop.
158// returns 1 if entry is accepted.
159// returns -1 otherwise.
160 return 1;
161}
162#endif // #ifdef TrkValidationNtupleRIOs_cxx
Int_t TRT_EventNumber
current Tree number in a TChain
virtual Long64_t LoadTree(Long64_t entry)
virtual void Show(Long64_t entry=-1)
virtual Int_t GetEntry(Long64_t entry)
TrkValidationNtupleRIOs(const TrkValidationNtupleRIOs &)=delete
virtual Int_t Cut(Long64_t entry)
Int_t fCurrent
pointer to the analyzed TTree or TChain
virtual Bool_t Notify()
TrkValidationNtupleRIOs & operator=(const TrkValidationNtupleRIOs &)=delete
virtual void Init(TTree *tree)
TrkValidationNtupleRIOs(TTree *tree=0)
virtual ~TrkValidationNtupleRIOs()
STL namespace.
TChain * tree