ATLAS Offline Software
readOutput.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 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 
19 class readOutput {
20 public :
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;
38  Int_t nParticles;
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;
48  TBranch *b_vectorOfPitchesY;
49  TBranch *b_phi;
50  TBranch *b_theta;
51  TBranch *b_phiBS;
52  TBranch *b_thetaBS;
53  TBranch *b_etaModule;
54  TBranch *b_ClusterPixLayer;
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 
95 Int_t readOutput::GetEntry(Long64_t entry)
96 {
97 // Read contents of entry.
98  if (!fChain) return 0;
99  return fChain->GetEntry(entry);
100 }
101 Long64_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 = (TChain*)fChain;
109  if (chain->GetTreeNumber() != fCurrent) {
110  fCurrent = chain->GetTreeNumber();
111  Notify();
112  }
113  return centry;
114 }
115 
116 void 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;
128  vectorOfPitchesY = 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 
156 Bool_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 
167 void 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 }
174 Int_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
readOutput::b_etaModule
TBranch * b_etaModule
Definition: readOutput.h:53
readOutput::Notify
Bool_t Notify()
readOutput::Loop
virtual void Loop()
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
readOutput::phi
Float_t phi
Definition: readOutput.h:31
readOutput::ClusterPixBarrelEC
Int_t ClusterPixBarrelEC
Definition: readOutput.h:37
readOutput::sizeX
Int_t sizeX
current Tree number in a TChain
Definition: readOutput.h:25
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
readOutput::readOutput
readOutput(TTree *tree=0)
readOutput::b_positionsX
TBranch * b_positionsX
Definition: readOutput.h:57
readOutput::Cut
virtual Int_t Cut(Long64_t entry)
tree
TChain * tree
Definition: tile_monitor.h:30
readOutput::meanPointY
Float_t meanPointY
Definition: readOutput.h:28
readOutput::fChain
TTree * fChain
Definition: readOutput.h:21
readOutput::b_sizeY
TBranch * b_sizeY
Definition: readOutput.h:44
readOutput::b_ClusterPixBarrelEC
TBranch * b_ClusterPixBarrelEC
Definition: readOutput.h:55
readOutput::phiBS
Float_t phiBS
Definition: readOutput.h:33
readOutput::Show
virtual void Show(Long64_t entry=-1)
readOutput::b_thetaBS
TBranch * b_thetaBS
Definition: readOutput.h:52
readOutput::b_theta
TBranch * b_theta
Definition: readOutput.h:50
readOutput::b_nParticles
TBranch * b_nParticles
Definition: readOutput.h:56
ParseInputs.gDirectory
gDirectory
Definition: Final2012/ParseInputs.py:133
readOutput::b_sizeX
TBranch * b_sizeX
Definition: readOutput.h:43
readOutput
Definition: readOutput.h:19
readOutput::fCurrent
Int_t fCurrent
pointer to the analyzed TTree or TChain
Definition: readOutput.h:22
vector
Definition: MultiHisto.h:13
readOutput::b_vectorOfPitchesY
TBranch * b_vectorOfPitchesY
Definition: readOutput.h:48
readOutput::etaModule
Float_t etaModule
Definition: readOutput.h:35
readOutput::GetEntry
virtual Int_t GetEntry(Long64_t entry)
readOutput::LoadTree
virtual Long64_t LoadTree(Long64_t entry)
readOutput::b_meanPointY
TBranch * b_meanPointY
Definition: readOutput.h:46
readOutput::Init
void Init(TTree *tree)
readOutput::b_phiBS
TBranch * b_phiBS
Definition: readOutput.h:51
readOutput::~readOutput
virtual ~readOutput()
readOutput::vectorOfPitchesY
vector< float > * vectorOfPitchesY
Definition: readOutput.h:30
readOutput::nParticles
Int_t nParticles
Definition: readOutput.h:38
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
readOutput::ClusterPixLayer
Int_t ClusterPixLayer
Definition: readOutput.h:36
readOutput::matrixOfToT
vector< vector< float > > * matrixOfToT
Definition: readOutput.h:29
readOutput::b_positionsY
TBranch * b_positionsY
Definition: readOutput.h:58
readOutput::b_ClusterPixLayer
TBranch * b_ClusterPixLayer
Definition: readOutput.h:54
readOutput::b_meanPointX
TBranch * b_meanPointX
Definition: readOutput.h:45
readOutput::meanPointX
Float_t meanPointX
Definition: readOutput.h:27
readOutput::b_matrixOfToT
TBranch * b_matrixOfToT
Definition: readOutput.h:47
readOutput::b_phi
TBranch * b_phi
Definition: readOutput.h:49
readOutput::positionsX
vector< double > * positionsX
Definition: readOutput.h:39
readOutput::theta
Float_t theta
Definition: readOutput.h:32
readOutput::thetaBS
Float_t thetaBS
Definition: readOutput.h:34
readOutput::positionsY
vector< double > * positionsY
Definition: readOutput.h:40
readOutput::sizeY
Int_t sizeY
Definition: readOutput.h:26