ATLAS Offline Software
Loading...
Searching...
No Matches
SCTTimeHists.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// 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 SCTTimeHists(const SCTTimeHists&) = delete;
92};
93
94#endif
95
96#ifdef SCTTimeHists_cxx
98{
99// if parameter tree is not specified (or zero), connect the file
100// used to generate this class and read the Tree.
101 if (tree == 0) {
102 TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("SCT_CBNT.root");
103 if (!f) {
104 f = new TFile("SCT_CBNT.root");
105 }
106 tree = (TTree*)gDirectory->Get("CollectionTree");
107
108 }
110}
111
113{
114 if (!fChain) return;
115 delete fChain->GetCurrentFile();
116}
117
118Int_t SCTTimeHists::GetEntry(Long64_t entry)
119{
120// Read contents of entry.
121 if (!fChain) return 0;
122 return fChain->GetEntry(entry);
123}
124Long64_t SCTTimeHists::LoadTree(Long64_t entry)
125{
126// Set the environment to read one entry
127 if (!fChain) return -5;
128 Long64_t centry = fChain->LoadTree(entry);
129 if (centry < 0) return centry;
130 if (!fChain->InheritsFrom(TChain::Class())) return centry;
131 TChain *chain = static_cast<TChain*>(fChain);
132 if (chain->GetTreeNumber() != fCurrent) {
133 fCurrent = chain->GetTreeNumber();
134 Notify();
135 }
136 return centry;
137}
138
139void SCTTimeHists::Init(TTree *tree)
140{
141 // The Init() function is called when the selector needs to initialize
142 // a new tree or chain. Typically here the branch addresses and branch
143 // pointers of the tree will be set.
144 // It is normally not necessary to make changes to the generated
145 // code, but the routine can be extended by the user if needed.
146 // Init() will be called many times when running on PROOF
147 // (once per file to be processed).
148
149 // Set object pointer
150 LVL1TriggerInfo = 0;
151 LVL2TriggerInfo = 0;
152 EventFilterInfo = 0;
153 StreamTagName = 0;
154 StreamTagType = 0;
155 sct_barrelec = 0;
156 sct_layer = 0;
157 sct_eta = 0;
158 sct_phi = 0;
159 sct_side = 0;
161 sct_waferHash = 0;
162 // Set branch addresses and branch pointers
163 if (!tree) return;
164 fChain = tree;
165 fCurrent = -1;
166 fChain->SetMakeClass(1);
167
168 fChain->SetBranchAddress("RunNumber", &RunNumber, &b_RunNumber);
169 fChain->SetBranchAddress("EventNumber", &EventNumber, &b_EventNumber);
170 fChain->SetBranchAddress("Token", Token, &b_Token);
171 fChain->SetBranchAddress("Run", &Run, &b_Run);
172 fChain->SetBranchAddress("Event", &Event, &b_Event);
173 fChain->SetBranchAddress("Time", &Time, &b_Time);
174 fChain->SetBranchAddress("LumiBlock", &LumiBlock, &b_LumiBlock);
175 fChain->SetBranchAddress("BCID", &BCID, &b_BCID);
176 fChain->SetBranchAddress("LVL1ID", &LVL1ID, &b_LVL1ID);
177 fChain->SetBranchAddress("Weight", &Weight, &b_Weight);
178 fChain->SetBranchAddress("IEvent", &IEvent, &b_IEvent);
179 fChain->SetBranchAddress("StatusElement", &StatusElement, &b_StatusElement);
180 fChain->SetBranchAddress("LVL1TriggerType", &LVL1TriggerType, &b_LVL1TriggerType);
181 fChain->SetBranchAddress("LVL1TriggerInfo", &LVL1TriggerInfo, &b_LVL1TriggerInfo);
182 fChain->SetBranchAddress("LVL2TriggerInfo", &LVL2TriggerInfo, &b_LVL2TriggerInfo);
183 fChain->SetBranchAddress("EventFilterInfo", &EventFilterInfo, &b_EventFilterInfo);
184 fChain->SetBranchAddress("StreamTagName", &StreamTagName, &b_StreamTagName);
185 fChain->SetBranchAddress("StreamTagType", &StreamTagType, &b_StreamTagType);
186 fChain->SetBranchAddress("event_number", &event_number, &b_event_number);
187 fChain->SetBranchAddress("sct_barrelec", &sct_barrelec, &b_sct_barrelec);
188 fChain->SetBranchAddress("sct_layer", &sct_layer, &b_sct_layer);
189 fChain->SetBranchAddress("sct_eta", &sct_eta, &b_sct_eta);
190 fChain->SetBranchAddress("sct_phi", &sct_phi, &b_sct_phi);
191 fChain->SetBranchAddress("sct_side", &sct_side, &b_sct_side);
192 fChain->SetBranchAddress("sct_numHitsInWafer", &sct_numHitsInWafer, &b_sct_numHitsInWafer);
193 fChain->SetBranchAddress("sct_waferHash", &sct_waferHash, &b_sct_waferHash);
194 Notify();
195}
196
198{
199 // The Notify() function is called when a new file is opened. This
200 // can be either for a new TTree in a TChain or when when a new TTree
201 // is started when using PROOF. It is normally not necessary to make changes
202 // to the generated code, but the routine can be extended by the
203 // user if needed. The return value is currently not used.
204
205 return kTRUE;
206}
207
208void SCTTimeHists::Show(Long64_t entry)
209{
210// Print contents of entry.
211// If entry is not specified, print current entry
212 if (!fChain) return;
213 fChain->Show(entry);
214}
215Int_t SCTTimeHists::Cut(Long64_t entry)
216{
217// This function may be called from Loop.
218// returns 1 if entry is accepted.
219// returns -1 otherwise.
220 return 1;
221}
222#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
SCTTimeHists & operator=(const SCTTimeHists &)=delete
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
SCTTimeHists(const SCTTimeHists &)=delete
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