ATLAS Offline Software
Loading...
Searching...
No Matches
SCTTimeHists.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// Wed Jul 9 18:58:34 2008 by ROOT version 5.18/00d
8// from TTree SCTTimeHists/SCTTimeHists
9// found on file: SCT_CBNT.root
11
12#ifndef SCTTimeHists_h
13#define SCTTimeHists_h
14
15#include <TROOT.h>
16#include <TChain.h>
17#include <TFile.h>
18#include <vector>
20public :
21 TTree *fChain;
22 Int_t fCurrent;
23
24 // Declaration of leaf types
25 Int_t RunNumber;
27 Char_t Token[93];
28 Int_t Run;
29 Int_t Event;
30 Int_t Time;
31 Int_t LumiBlock;
32 Int_t BCID;
33 Int_t LVL1ID;
34 Double_t Weight;
35 Int_t IEvent;
51
52 // List of branches
53 TBranch *b_RunNumber;
54 TBranch *b_EventNumber;
55 TBranch *b_Token;
56 TBranch *b_Run;
57 TBranch *b_Event;
58 TBranch *b_Time;
59 TBranch *b_LumiBlock;
60 TBranch *b_BCID;
61 TBranch *b_LVL1ID;
62 TBranch *b_Weight;
63 TBranch *b_IEvent;
64 TBranch *b_StatusElement;
69 TBranch *b_StreamTagName;
70 TBranch *b_StreamTagType;
71 TBranch *b_event_number;
72 TBranch *b_sct_barrelec;
73 TBranch *b_sct_layer;
74 TBranch *b_sct_eta;
75 TBranch *b_sct_phi;
76 TBranch *b_sct_side;
78 TBranch *b_sct_waferHash;
79
80 SCTTimeHists(TTree *tree=0);
81 virtual ~SCTTimeHists();
82 virtual Int_t Cut(Long64_t entry);
83 virtual Int_t GetEntry(Long64_t entry);
84 virtual Long64_t LoadTree(Long64_t entry);
85 virtual void Init(TTree *tree);
86 virtual void Loop();
87 virtual Bool_t Notify();
88 virtual void Show(Long64_t entry = -1);
89};
90
91#endif
92
93#ifdef SCTTimeHists_cxx
95{
96// if parameter tree is not specified (or zero), connect the file
97// used to generate this class and read the Tree.
98 if (tree == 0) {
99 TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("SCT_CBNT.root");
100 if (!f) {
101 f = new TFile("SCT_CBNT.root");
102 }
103 tree = (TTree*)gDirectory->Get("CollectionTree");
104
105 }
107}
108
110{
111 if (!fChain) return;
112 delete fChain->GetCurrentFile();
113}
114
115Int_t SCTTimeHists::GetEntry(Long64_t entry)
116{
117// Read contents of entry.
118 if (!fChain) return 0;
119 return fChain->GetEntry(entry);
120}
121Long64_t SCTTimeHists::LoadTree(Long64_t entry)
122{
123// Set the environment to read one entry
124 if (!fChain) return -5;
125 Long64_t centry = fChain->LoadTree(entry);
126 if (centry < 0) return centry;
127 if (!fChain->InheritsFrom(TChain::Class())) return centry;
128 TChain *chain = static_cast<TChain*>(fChain);
129 if (chain->GetTreeNumber() != fCurrent) {
130 fCurrent = chain->GetTreeNumber();
131 Notify();
132 }
133 return centry;
134}
135
136void SCTTimeHists::Init(TTree *tree)
137{
138 // The Init() function is called when the selector needs to initialize
139 // a new tree or chain. Typically here the branch addresses and branch
140 // pointers of the tree will be set.
141 // It is normally not necessary to make changes to the generated
142 // code, but the routine can be extended by the user if needed.
143 // Init() will be called many times when running on PROOF
144 // (once per file to be processed).
145
146 // Set object pointer
147 LVL1TriggerInfo = 0;
148 LVL2TriggerInfo = 0;
149 EventFilterInfo = 0;
150 StreamTagName = 0;
151 StreamTagType = 0;
152 sct_barrelec = 0;
153 sct_layer = 0;
154 sct_eta = 0;
155 sct_phi = 0;
156 sct_side = 0;
158 sct_waferHash = 0;
159 // Set branch addresses and branch pointers
160 if (!tree) return;
161 fChain = tree;
162 fCurrent = -1;
163 fChain->SetMakeClass(1);
164
165 fChain->SetBranchAddress("RunNumber", &RunNumber, &b_RunNumber);
166 fChain->SetBranchAddress("EventNumber", &EventNumber, &b_EventNumber);
167 fChain->SetBranchAddress("Token", Token, &b_Token);
168 fChain->SetBranchAddress("Run", &Run, &b_Run);
169 fChain->SetBranchAddress("Event", &Event, &b_Event);
170 fChain->SetBranchAddress("Time", &Time, &b_Time);
171 fChain->SetBranchAddress("LumiBlock", &LumiBlock, &b_LumiBlock);
172 fChain->SetBranchAddress("BCID", &BCID, &b_BCID);
173 fChain->SetBranchAddress("LVL1ID", &LVL1ID, &b_LVL1ID);
174 fChain->SetBranchAddress("Weight", &Weight, &b_Weight);
175 fChain->SetBranchAddress("IEvent", &IEvent, &b_IEvent);
176 fChain->SetBranchAddress("StatusElement", &StatusElement, &b_StatusElement);
177 fChain->SetBranchAddress("LVL1TriggerType", &LVL1TriggerType, &b_LVL1TriggerType);
178 fChain->SetBranchAddress("LVL1TriggerInfo", &LVL1TriggerInfo, &b_LVL1TriggerInfo);
179 fChain->SetBranchAddress("LVL2TriggerInfo", &LVL2TriggerInfo, &b_LVL2TriggerInfo);
180 fChain->SetBranchAddress("EventFilterInfo", &EventFilterInfo, &b_EventFilterInfo);
181 fChain->SetBranchAddress("StreamTagName", &StreamTagName, &b_StreamTagName);
182 fChain->SetBranchAddress("StreamTagType", &StreamTagType, &b_StreamTagType);
183 fChain->SetBranchAddress("event_number", &event_number, &b_event_number);
184 fChain->SetBranchAddress("sct_barrelec", &sct_barrelec, &b_sct_barrelec);
185 fChain->SetBranchAddress("sct_layer", &sct_layer, &b_sct_layer);
186 fChain->SetBranchAddress("sct_eta", &sct_eta, &b_sct_eta);
187 fChain->SetBranchAddress("sct_phi", &sct_phi, &b_sct_phi);
188 fChain->SetBranchAddress("sct_side", &sct_side, &b_sct_side);
189 fChain->SetBranchAddress("sct_numHitsInWafer", &sct_numHitsInWafer, &b_sct_numHitsInWafer);
190 fChain->SetBranchAddress("sct_waferHash", &sct_waferHash, &b_sct_waferHash);
191 Notify();
192}
193
195{
196 // The Notify() function is called when a new file is opened. This
197 // can be either for a new TTree in a TChain or when when a new TTree
198 // is started when using PROOF. It is normally not necessary to make changes
199 // to the generated code, but the routine can be extended by the
200 // user if needed. The return value is currently not used.
201
202 return kTRUE;
203}
204
205void SCTTimeHists::Show(Long64_t entry)
206{
207// Print contents of entry.
208// If entry is not specified, print current entry
209 if (!fChain) return;
210 fChain->Show(entry);
211}
212Int_t SCTTimeHists::Cut(Long64_t entry)
213{
214// This function may be called from Loop.
215// returns 1 if entry is accepted.
216// returns -1 otherwise.
217 return 1;
218}
219#endif // #ifdef SCTTimeHists_cxx
vector< int > * sct_waferHash
vector< int > * sct_numHitsInWafer
vector< int > * sct_phi
vector< int > * sct_eta
TBranch * b_Run
Int_t fCurrent
pointer to the analyzed TTree or TChain
vector< int > * sct_side
vector< long > * LVL2TriggerInfo
TBranch * b_Weight
TBranch * b_RunNumber
virtual void Loop()
TBranch * b_LumiBlock
Int_t LVL1TriggerType
TBranch * b_sct_barrelec
virtual Long64_t LoadTree(Long64_t entry)
TBranch * b_event_number
Double_t Weight
Int_t RunNumber
current Tree number in a TChain
TBranch * b_sct_layer
Int_t StatusElement
virtual void Init(TTree *tree)
virtual Int_t GetEntry(Long64_t entry)
TBranch * b_StreamTagType
TBranch * b_BCID
vector< int > * sct_barrelec
TBranch * b_Token
TBranch * b_LVL1TriggerType
TBranch * b_sct_numHitsInWafer
TBranch * b_EventNumber
virtual Int_t Cut(Long64_t entry)
TTree * fChain
TBranch * b_sct_eta
virtual Bool_t Notify()
TBranch * b_StreamTagName
TBranch * b_LVL1ID
Char_t Token[93]
TBranch * b_IEvent
TBranch * b_sct_side
TBranch * b_sct_waferHash
TBranch * b_Time
vector< long > * LVL1TriggerInfo
vector< int > * sct_layer
Int_t event_number
TBranch * b_EventFilterInfo
vector< string > * StreamTagType
TBranch * b_LVL1TriggerInfo
vector< string > * StreamTagName
SCTTimeHists(TTree *tree=0)
TBranch * b_StatusElement
virtual ~SCTTimeHists()
TBranch * b_LVL2TriggerInfo
virtual void Show(Long64_t entry=-1)
Int_t EventNumber
TBranch * b_sct_phi
vector< long > * EventFilterInfo
TBranch * b_Event
TChain * tree