ATLAS Offline Software
Loading...
Searching...
No Matches
readOutput.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
71#endif
72
73#ifdef readOutput_cxx
75{
76// if parameter tree is not specified (or zero), connect the file
77// used to generate this class and read the Tree.
78 if (tree == 0) {
79 TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("outputNN.root");
80 if (!f) {
81 f = new TFile("outputNN.root");
82 }
83 tree = (TTree*)gDirectory->Get("clusterTree");
84
85 }
86 Init(tree);
87}
88
90{
91 if (!fChain) return;
92 delete fChain->GetCurrentFile();
93}
94
95Int_t readOutput::GetEntry(Long64_t entry)
96{
97// Read contents of entry.
98 if (!fChain) return 0;
99 return fChain->GetEntry(entry);
100}
101Long64_t readOutput::LoadTree(Long64_t entry)
102{
103// Set the environment to read one entry
104 if (!fChain) return -5;
105 Long64_t centry = fChain->LoadTree(entry);
106 if (centry < 0) return centry;
107 if (!fChain->InheritsFrom(TChain::Class())) return centry;
108 TChain *chain = static_cast<TChain*>(fChain);
109 if (chain->GetTreeNumber() != fCurrent) {
110 fCurrent = chain->GetTreeNumber();
111 Notify();
112 }
113 return centry;
114}
115
116void readOutput::Init(TTree *tree)
117{
118 // The Init() function is called when the selector needs to initialize
119 // a new tree or chain. Typically here the branch addresses and branch
120 // pointers of the tree will be set.
121 // It is normally not necessary to make changes to the generated
122 // code, but the routine can be extended by the user if needed.
123 // Init() will be called many times when running on PROOF
124 // (once per file to be processed).
125
126 // Set object pointer
127 matrixOfToT = 0;
129 positionsX = 0;
130 positionsY = 0;
131 // Set branch addresses and branch pointers
132 if (!tree) return;
133 fChain = tree;
134 fCurrent = -1;
135 fChain->SetMakeClass(1);
136
137 fChain->SetBranchAddress("sizeX", &sizeX, &b_sizeX);
138 fChain->SetBranchAddress("sizeY", &sizeY, &b_sizeY);
139 fChain->SetBranchAddress("meanPointX", &meanPointX, &b_meanPointX);
140 fChain->SetBranchAddress("meanPointY", &meanPointY, &b_meanPointY);
141 fChain->SetBranchAddress("matrixOfToT", &matrixOfToT, &b_matrixOfToT);
142 fChain->SetBranchAddress("vectorOfPitchesY", &vectorOfPitchesY, &b_vectorOfPitchesY);
143 fChain->SetBranchAddress("phi", &phi, &b_phi);
144 fChain->SetBranchAddress("theta", &theta, &b_theta);
145 fChain->SetBranchAddress("phiBS", &phiBS, &b_phiBS);
146 fChain->SetBranchAddress("thetaBS", &thetaBS, &b_thetaBS);
147 fChain->SetBranchAddress("etaModule", &etaModule, &b_etaModule);
148 fChain->SetBranchAddress("ClusterPixLayer", &ClusterPixLayer, &b_ClusterPixLayer);
149 fChain->SetBranchAddress("ClusterPixBarrelEC", &ClusterPixBarrelEC, &b_ClusterPixBarrelEC);
150 fChain->SetBranchAddress("nParticles", &nParticles, &b_nParticles);
151 fChain->SetBranchAddress("positionsX", &positionsX, &b_positionsX);
152 fChain->SetBranchAddress("positionsY", &positionsY, &b_positionsY);
153 Notify();
154}
155
156Bool_t readOutput::Notify()
157{
158 // The Notify() function is called when a new file is opened. This
159 // can be either for a new TTree in a TChain or when when a new TTree
160 // is started when using PROOF. It is normally not necessary to make changes
161 // to the generated code, but the routine can be extended by the
162 // user if needed. The return value is currently not used.
163
164 return kTRUE;
165}
166
167void readOutput::Show(Long64_t entry)
168{
169// Print contents of entry.
170// If entry is not specified, print current entry
171 if (!fChain) return;
172 fChain->Show(entry);
173}
174Int_t readOutput::Cut(Long64_t entry)
175{
176// This function may be called from Loop.
177// returns 1 if entry is accepted.
178// returns -1 otherwise.
179 return 1;
180}
181#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
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
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