ATLAS Offline Software
Loading...
Searching...
No Matches
readOutput.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 Feb 12 00:30:53 2011 by ROOT version 5.27/01
8// from TTree clusterTree/clusterTree
9// found on file: outputNN.root
11
12#ifndef readOutput_h
13#define readOutput_h
14
15#include <TROOT.h>
16#include <TChain.h>
17#include <TFile.h>
18
20public :
21 TTree *fChain;
22 Int_t fCurrent;
23
24 // Declaration of leaf types
25 Int_t sizeX;
26 Int_t sizeY;
27 Float_t meanPointX;
28 Float_t meanPointY;
31 Float_t phi;
32 Float_t theta;
33 Float_t phiBS;
34 Float_t thetaBS;
35 Float_t etaModule;
41
42 // List of branches
43 TBranch *b_sizeX;
44 TBranch *b_sizeY;
45 TBranch *b_meanPointX;
46 TBranch *b_meanPointY;
47 TBranch *b_matrixOfToT;
49 TBranch *b_phi;
50 TBranch *b_theta;
51 TBranch *b_phiBS;
52 TBranch *b_thetaBS;
53 TBranch *b_etaModule;
56 TBranch *b_nParticles;
57 TBranch *b_positionsX;
58 TBranch *b_positionsY;
59
60 readOutput(TTree *tree=0);
61 virtual ~readOutput();
62 virtual Int_t Cut(Long64_t entry);
63 virtual Int_t GetEntry(Long64_t entry);
64 virtual Long64_t LoadTree(Long64_t entry);
65 void Init(TTree *tree);
66 virtual void Loop();
67 Bool_t Notify();
68 virtual void Show(Long64_t entry = -1);
69
70 readOutput(const readOutput&) = delete;
71 readOutput& operator=(const readOutput&) = delete;
72};
73
74#endif
75
76#ifdef readOutput_cxx
78{
79// if parameter tree is not specified (or zero), connect the file
80// used to generate this class and read the Tree.
81 if (tree == 0) {
82 TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("outputNN.root");
83 if (!f) {
84 f = new TFile("outputNN.root");
85 }
86 tree = (TTree*)gDirectory->Get("clusterTree");
87
88 }
89 Init(tree);
90}
91
93{
94 if (!fChain) return;
95 delete fChain->GetCurrentFile();
96}
97
98Int_t readOutput::GetEntry(Long64_t entry)
99{
100// Read contents of entry.
101 if (!fChain) return 0;
102 return fChain->GetEntry(entry);
103}
104Long64_t readOutput::LoadTree(Long64_t entry)
105{
106// Set the environment to read one entry
107 if (!fChain) return -5;
108 Long64_t centry = fChain->LoadTree(entry);
109 if (centry < 0) return centry;
110 if (!fChain->InheritsFrom(TChain::Class())) return centry;
111 TChain *chain = static_cast<TChain*>(fChain);
112 if (chain->GetTreeNumber() != fCurrent) {
113 fCurrent = chain->GetTreeNumber();
114 Notify();
115 }
116 return centry;
117}
118
119void readOutput::Init(TTree *tree)
120{
121 // The Init() function is called when the selector needs to initialize
122 // a new tree or chain. Typically here the branch addresses and branch
123 // pointers of the tree will be set.
124 // It is normally not necessary to make changes to the generated
125 // code, but the routine can be extended by the user if needed.
126 // Init() will be called many times when running on PROOF
127 // (once per file to be processed).
128
129 // Set object pointer
130 matrixOfToT = 0;
132 positionsX = 0;
133 positionsY = 0;
134 // Set branch addresses and branch pointers
135 if (!tree) return;
136 fChain = tree;
137 fCurrent = -1;
138 fChain->SetMakeClass(1);
139
140 fChain->SetBranchAddress("sizeX", &sizeX, &b_sizeX);
141 fChain->SetBranchAddress("sizeY", &sizeY, &b_sizeY);
142 fChain->SetBranchAddress("meanPointX", &meanPointX, &b_meanPointX);
143 fChain->SetBranchAddress("meanPointY", &meanPointY, &b_meanPointY);
144 fChain->SetBranchAddress("matrixOfToT", &matrixOfToT, &b_matrixOfToT);
145 fChain->SetBranchAddress("vectorOfPitchesY", &vectorOfPitchesY, &b_vectorOfPitchesY);
146 fChain->SetBranchAddress("phi", &phi, &b_phi);
147 fChain->SetBranchAddress("theta", &theta, &b_theta);
148 fChain->SetBranchAddress("phiBS", &phiBS, &b_phiBS);
149 fChain->SetBranchAddress("thetaBS", &thetaBS, &b_thetaBS);
150 fChain->SetBranchAddress("etaModule", &etaModule, &b_etaModule);
151 fChain->SetBranchAddress("ClusterPixLayer", &ClusterPixLayer, &b_ClusterPixLayer);
152 fChain->SetBranchAddress("ClusterPixBarrelEC", &ClusterPixBarrelEC, &b_ClusterPixBarrelEC);
153 fChain->SetBranchAddress("nParticles", &nParticles, &b_nParticles);
154 fChain->SetBranchAddress("positionsX", &positionsX, &b_positionsX);
155 fChain->SetBranchAddress("positionsY", &positionsY, &b_positionsY);
156 Notify();
157}
158
159Bool_t readOutput::Notify()
160{
161 // The Notify() function is called when a new file is opened. This
162 // can be either for a new TTree in a TChain or when when a new TTree
163 // is started when using PROOF. It is normally not necessary to make changes
164 // to the generated code, but the routine can be extended by the
165 // user if needed. The return value is currently not used.
166
167 return kTRUE;
168}
169
170void readOutput::Show(Long64_t entry)
171{
172// Print contents of entry.
173// If entry is not specified, print current entry
174 if (!fChain) return;
175 fChain->Show(entry);
176}
177Int_t readOutput::Cut(Long64_t entry)
178{
179// This function may be called from Loop.
180// returns 1 if entry is accepted.
181// returns -1 otherwise.
182 return 1;
183}
184#endif // #ifdef readOutput_cxx
virtual Long64_t LoadTree(Long64_t entry)
virtual void Loop()
virtual ~readOutput()
Float_t theta
Definition readOutput.h:32
TBranch * b_vectorOfPitchesY
Definition readOutput.h:48
Int_t ClusterPixLayer
Definition readOutput.h:36
vector< double > * positionsX
Definition readOutput.h:39
TBranch * b_sizeY
Definition readOutput.h:44
Float_t phiBS
Definition readOutput.h:33
TBranch * b_matrixOfToT
Definition readOutput.h:47
Int_t fCurrent
pointer to the analyzed TTree or TChain
Definition readOutput.h:22
TBranch * b_meanPointX
Definition readOutput.h:45
TBranch * b_meanPointY
Definition readOutput.h:46
Float_t meanPointY
Definition readOutput.h:28
TBranch * b_ClusterPixBarrelEC
Definition readOutput.h:55
virtual Int_t GetEntry(Long64_t entry)
TBranch * b_nParticles
Definition readOutput.h:56
Float_t meanPointX
Definition readOutput.h:27
TBranch * b_sizeX
Definition readOutput.h:43
TBranch * b_etaModule
Definition readOutput.h:53
void Init(TTree *tree)
Float_t phi
Definition readOutput.h:31
vector< vector< float > > * matrixOfToT
Definition readOutput.h:29
virtual Int_t Cut(Long64_t entry)
Float_t etaModule
Definition readOutput.h:35
TBranch * b_theta
Definition readOutput.h:50
readOutput & operator=(const readOutput &)=delete
TBranch * b_ClusterPixLayer
Definition readOutput.h:54
Int_t nParticles
Definition readOutput.h:38
TBranch * b_positionsX
Definition readOutput.h:57
TBranch * b_phi
Definition readOutput.h:49
TBranch * b_thetaBS
Definition readOutput.h:52
Bool_t Notify()
vector< double > * positionsY
Definition readOutput.h:40
TBranch * b_positionsY
Definition readOutput.h:58
readOutput(const readOutput &)=delete
Int_t sizeY
Definition readOutput.h:26
TTree * fChain
Definition readOutput.h:21
Int_t ClusterPixBarrelEC
Definition readOutput.h:37
virtual void Show(Long64_t entry=-1)
TBranch * b_phiBS
Definition readOutput.h:51
Float_t thetaBS
Definition readOutput.h:34
Int_t sizeX
current Tree number in a TChain
Definition readOutput.h:25
vector< float > * vectorOfPitchesY
Definition readOutput.h:30
readOutput(TTree *tree=0)
TChain * tree