macros.h

Bahytbek Mauyey, 06/14/2018 04:03 AM

Download (10.6 KB)

 
1
//////////////////////////////////////////////////////////
2
// This class has been automatically generated on
3
// Mon Jun 04 15:14:03 2018 by ROOT version 5.34/14
4
// from TTree AnalysisxTree/Go4FileStore
5
// found on file: D:/ACCULINA/ACCULINA  2018/analyze/si-1_si-20_35cm_0deg_new1_0003.root
6
//////////////////////////////////////////////////////////
7

    
8
#ifndef macros_h
9
#define macros_h
10

    
11
#include <TROOT.h>
12
#include <TChain.h>
13
#include <TFile.h>
14

    
15
// Header file for the classes stored in the TTree if any.
16

    
17
// Fixed size dimensions of array or collections stored in the TTree if any.
18
const Int_t kMaxNeEvent = 1;
19

    
20
class macros {
21
public :
22
   TTree          *fChain;   //!pointer to the analyzed TTree or TChain
23
   Int_t           fCurrent; //!current Tree number in a TChain
24

    
25
   // Declaration of leaf types
26
 //TNeEvent        *NeEvent_;
27
 //TNeEvent        *NeEvent_TGo4EventElement;
28
   UShort_t        NeEvent_CsI_L[16];
29
   UShort_t        NeEvent_tCsI_L[16];
30
   UShort_t        NeEvent_CsI_R[16];
31
   UShort_t        NeEvent_tCsI_R[16];
32
   UShort_t        NeEvent_SQX_L[32];
33
   UShort_t        NeEvent_tSQX_L[32];
34
   UShort_t        NeEvent_SQY_L[16];
35
   UShort_t        NeEvent_tSQY_L[16];
36
   UShort_t        NeEvent_SQX_R[32];
37
   UShort_t        NeEvent_tSQX_R[32];
38
   UShort_t        NeEvent_SQY_R[16];
39
   UShort_t        NeEvent_SQ20[16];
40
   UShort_t        NeEvent_tSQ20[16];
41
   UShort_t        NeEvent_tSQY_R[16];
42
   UShort_t        NeEvent_ANR[16];
43
   UShort_t        NeEvent_ANS[16];
44
   UShort_t        NeEvent_neutAmp[32];
45
   UShort_t        NeEvent_neutTAC[32];
46
   UShort_t        NeEvent_neutTDC[32];
47
   UShort_t        NeEvent_F3[4];
48
   UShort_t        NeEvent_tF3[4];
49
   UShort_t        NeEvent_F5[4];
50
   UShort_t        NeEvent_tF5[4];
51
   UShort_t        NeEvent_F6[4];
52
   UShort_t        NeEvent_tF6[4];
53
   UShort_t        NeEvent_tMWPC[4];
54
   UInt_t          NeEvent_scaler[16];
55
   UInt_t          NeEvent_mtime;
56
   UShort_t        NeEvent_nx1;
57
   UShort_t        NeEvent_ny1;
58
   UShort_t        NeEvent_nx2;
59
   UShort_t        NeEvent_ny2;
60
   UShort_t        NeEvent_x1[32];
61
   UShort_t        NeEvent_y1[32];
62
   UShort_t        NeEvent_x2[32];
63
   UShort_t        NeEvent_y2[32];
64
   UInt_t          NeEvent_rx1;
65
   UInt_t          NeEvent_rx2;
66
   UInt_t          NeEvent_ry1;
67
   UInt_t          NeEvent_ry2;
68
   Int_t           NeEvent_nevent;
69
   Int_t           NeEvent_trigger;
70
   Int_t           NeEvent_subevents;
71
   Int_t           NeEvent_evsize;
72

    
73
   // List of branches
74
   TBranch        *b_NeEvent_CsI_L;   //!
75
   TBranch        *b_NeEvent_tCsI_L;   //!
76
   TBranch        *b_NeEvent_CsI_R;   //!
77
   TBranch        *b_NeEvent_tCsI_R;   //!
78
   TBranch        *b_NeEvent_SQX_L;   //!
79
   TBranch        *b_NeEvent_tSQX_L;   //!
80
   TBranch        *b_NeEvent_SQY_L;   //!
81
   TBranch        *b_NeEvent_tSQY_L;   //!
82
   TBranch        *b_NeEvent_SQX_R;   //!
83
   TBranch        *b_NeEvent_tSQX_R;   //!
84
   TBranch        *b_NeEvent_SQY_R;   //!
85
   TBranch        *b_NeEvent_SQ20;   //!
86
   TBranch        *b_NeEvent_tSQ20;   //!
87
   TBranch        *b_NeEvent_tSQY_R;   //!
88
   TBranch        *b_NeEvent_ANR;   //!
89
   TBranch        *b_NeEvent_ANS;   //!
90
   TBranch        *b_NeEvent_neutAmp;   //!
91
   TBranch        *b_NeEvent_neutTAC;   //!
92
   TBranch        *b_NeEvent_neutTDC;   //!
93
   TBranch        *b_NeEvent_F3;   //!
94
   TBranch        *b_NeEvent_tF3;   //!
95
   TBranch        *b_NeEvent_F5;   //!
96
   TBranch        *b_NeEvent_tF5;   //!
97
   TBranch        *b_NeEvent_F6;   //!
98
   TBranch        *b_NeEvent_tF6;   //!
99
   TBranch        *b_NeEvent_tMWPC;   //!
100
   TBranch        *b_NeEvent_scaler;   //!
101
   TBranch        *b_NeEvent_mtime;   //!
102
   TBranch        *b_NeEvent_nx1;   //!
103
   TBranch        *b_NeEvent_ny1;   //!
104
   TBranch        *b_NeEvent_nx2;   //!
105
   TBranch        *b_NeEvent_ny2;   //!
106
   TBranch        *b_NeEvent_x1;   //!
107
   TBranch        *b_NeEvent_y1;   //!
108
   TBranch        *b_NeEvent_x2;   //!
109
   TBranch        *b_NeEvent_y2;   //!
110
   TBranch        *b_NeEvent_rx1;   //!
111
   TBranch        *b_NeEvent_rx2;   //!
112
   TBranch        *b_NeEvent_ry1;   //!
113
   TBranch        *b_NeEvent_ry2;   //!
114
   TBranch        *b_NeEvent_nevent;   //!
115
   TBranch        *b_NeEvent_trigger;   //!
116
   TBranch        *b_NeEvent_subevents;   //!
117
   TBranch        *b_NeEvent_evsize;   //!
118

    
119
   macros(TTree *tree=0);
120
   virtual ~macros();
121
   virtual Int_t    Cut(Long64_t entry);
122
   virtual Int_t    GetEntry(Long64_t entry);
123
   virtual Long64_t LoadTree(Long64_t entry);
124
   virtual void     Init(TTree *tree);
125
   virtual void     Loop();
126
   virtual Bool_t   Notify();
127
   virtual void     Show(Long64_t entry = -1);
128
};
129

    
130
#endif
131

    
132
#ifdef macros_cxx
133
macros::macros(TTree *tree) : fChain(0) 
134
{
135
// if parameter tree is not specified (or zero), connect the file
136
// used to generate this class and read the Tree.
137
   if (tree == 0) {
138
      TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("D:/ACCULINA/ACCULINA  2018/analyze/si-1_si-20_35cm_0deg_new1_0003.root");
139
      if (!f || !f->IsOpen()) {
140
         f = new TFile("D:/ACCULINA/ACCULINA  2018/analyze/si-1_si-20_35cm_0deg_new1_0003.root");
141
      }
142
      f->GetObject("AnalysisxTree",tree);
143

    
144
   }
145
   Init(tree);
146
}
147

    
148
macros::~macros()
149
{
150
   if (!fChain) return;
151
   delete fChain->GetCurrentFile();
152
}
153

    
154
Int_t macros::GetEntry(Long64_t entry)
155
{
156
// Read contents of entry.
157
   if (!fChain) return 0;
158
   return fChain->GetEntry(entry);
159
}
160
Long64_t macros::LoadTree(Long64_t entry)
161
{
162
// Set the environment to read one entry
163
   if (!fChain) return -5;
164
   Long64_t centry = fChain->LoadTree(entry);
165
   if (centry < 0) return centry;
166
   if (fChain->GetTreeNumber() != fCurrent) {
167
      fCurrent = fChain->GetTreeNumber();
168
      Notify();
169
   }
170
   return centry;
171
}
172

    
173
void macros::Init(TTree *tree)
174
{
175
   // The Init() function is called when the selector needs to initialize
176
   // a new tree or chain. Typically here the branch addresses and branch
177
   // pointers of the tree will be set.
178
   // It is normally not necessary to make changes to the generated
179
   // code, but the routine can be extended by the user if needed.
180
   // Init() will be called many times when running on PROOF
181
   // (once per file to be processed).
182

    
183
   // Set branch addresses and branch pointers
184
   if (!tree) return;
185
   fChain = tree;
186
   fCurrent = -1;
187
   fChain->SetMakeClass(1);
188

    
189
   fChain->SetBranchAddress("NeEvent.CsI_L[16]", NeEvent_CsI_L, &b_NeEvent_CsI_L);
190
   fChain->SetBranchAddress("NeEvent.tCsI_L[16]", NeEvent_tCsI_L, &b_NeEvent_tCsI_L);
191
   fChain->SetBranchAddress("NeEvent.CsI_R[16]", NeEvent_CsI_R, &b_NeEvent_CsI_R);
192
   fChain->SetBranchAddress("NeEvent.tCsI_R[16]", NeEvent_tCsI_R, &b_NeEvent_tCsI_R);
193
   fChain->SetBranchAddress("NeEvent.SQX_L[32]", NeEvent_SQX_L, &b_NeEvent_SQX_L);
194
   fChain->SetBranchAddress("NeEvent.tSQX_L[32]", NeEvent_tSQX_L, &b_NeEvent_tSQX_L);
195
   fChain->SetBranchAddress("NeEvent.SQY_L[16]", NeEvent_SQY_L, &b_NeEvent_SQY_L);
196
   fChain->SetBranchAddress("NeEvent.tSQY_L[16]", NeEvent_tSQY_L, &b_NeEvent_tSQY_L);
197
   fChain->SetBranchAddress("NeEvent.SQX_R[32]", NeEvent_SQX_R, &b_NeEvent_SQX_R);
198
   fChain->SetBranchAddress("NeEvent.tSQX_R[32]", NeEvent_tSQX_R, &b_NeEvent_tSQX_R);
199
   fChain->SetBranchAddress("NeEvent.SQY_R[16]", NeEvent_SQY_R, &b_NeEvent_SQY_R);
200
   fChain->SetBranchAddress("NeEvent.SQ20[16]", NeEvent_SQ20, &b_NeEvent_SQ20);
201
   fChain->SetBranchAddress("NeEvent.tSQ20[16]", NeEvent_tSQ20, &b_NeEvent_tSQ20);
202
   fChain->SetBranchAddress("NeEvent.tSQY_R[16]", NeEvent_tSQY_R, &b_NeEvent_tSQY_R);
203
   fChain->SetBranchAddress("NeEvent.ANR[16]", NeEvent_ANR, &b_NeEvent_ANR);
204
   fChain->SetBranchAddress("NeEvent.ANS[16]", NeEvent_ANS, &b_NeEvent_ANS);
205
   fChain->SetBranchAddress("NeEvent.neutAmp[32]", NeEvent_neutAmp, &b_NeEvent_neutAmp);
206
   fChain->SetBranchAddress("NeEvent.neutTAC[32]", NeEvent_neutTAC, &b_NeEvent_neutTAC);
207
   fChain->SetBranchAddress("NeEvent.neutTDC[32]", NeEvent_neutTDC, &b_NeEvent_neutTDC);
208
   fChain->SetBranchAddress("NeEvent.F3[4]", NeEvent_F3, &b_NeEvent_F3);
209
   fChain->SetBranchAddress("NeEvent.tF3[4]", NeEvent_tF3, &b_NeEvent_tF3);
210
   fChain->SetBranchAddress("NeEvent.F5[4]", NeEvent_F5, &b_NeEvent_F5);
211
   fChain->SetBranchAddress("NeEvent.tF5[4]", NeEvent_tF5, &b_NeEvent_tF5);
212
   fChain->SetBranchAddress("NeEvent.F6[4]", NeEvent_F6, &b_NeEvent_F6);
213
   fChain->SetBranchAddress("NeEvent.tF6[4]", NeEvent_tF6, &b_NeEvent_tF6);
214
   fChain->SetBranchAddress("NeEvent.tMWPC[4]", NeEvent_tMWPC, &b_NeEvent_tMWPC);
215
   fChain->SetBranchAddress("NeEvent.scaler[16]", NeEvent_scaler, &b_NeEvent_scaler);
216
   fChain->SetBranchAddress("NeEvent.mtime", &NeEvent_mtime, &b_NeEvent_mtime);
217
   fChain->SetBranchAddress("NeEvent.nx1", &NeEvent_nx1, &b_NeEvent_nx1);
218
   fChain->SetBranchAddress("NeEvent.ny1", &NeEvent_ny1, &b_NeEvent_ny1);
219
   fChain->SetBranchAddress("NeEvent.nx2", &NeEvent_nx2, &b_NeEvent_nx2);
220
   fChain->SetBranchAddress("NeEvent.ny2", &NeEvent_ny2, &b_NeEvent_ny2);
221
   fChain->SetBranchAddress("NeEvent.x1[32]", NeEvent_x1, &b_NeEvent_x1);
222
   fChain->SetBranchAddress("NeEvent.y1[32]", NeEvent_y1, &b_NeEvent_y1);
223
   fChain->SetBranchAddress("NeEvent.x2[32]", NeEvent_x2, &b_NeEvent_x2);
224
   fChain->SetBranchAddress("NeEvent.y2[32]", NeEvent_y2, &b_NeEvent_y2);
225
   fChain->SetBranchAddress("NeEvent.rx1", &NeEvent_rx1, &b_NeEvent_rx1);
226
   fChain->SetBranchAddress("NeEvent.rx2", &NeEvent_rx2, &b_NeEvent_rx2);
227
   fChain->SetBranchAddress("NeEvent.ry1", &NeEvent_ry1, &b_NeEvent_ry1);
228
   fChain->SetBranchAddress("NeEvent.ry2", &NeEvent_ry2, &b_NeEvent_ry2);
229
   fChain->SetBranchAddress("NeEvent.nevent", &NeEvent_nevent, &b_NeEvent_nevent);
230
   fChain->SetBranchAddress("NeEvent.trigger", &NeEvent_trigger, &b_NeEvent_trigger);
231
   fChain->SetBranchAddress("NeEvent.subevents", &NeEvent_subevents, &b_NeEvent_subevents);
232
   fChain->SetBranchAddress("NeEvent.evsize", &NeEvent_evsize, &b_NeEvent_evsize);
233
   Notify();
234
}
235

    
236
Bool_t macros::Notify()
237
{
238
   // The Notify() function is called when a new file is opened. This
239
   // can be either for a new TTree in a TChain or when when a new TTree
240
   // is started when using PROOF. It is normally not necessary to make changes
241
   // to the generated code, but the routine can be extended by the
242
   // user if needed. The return value is currently not used.
243

    
244
   return kTRUE;
245
}
246

    
247
void macros::Show(Long64_t entry)
248
{
249
// Print contents of entry.
250
// If entry is not specified, print current entry
251
   if (!fChain) return;
252
   fChain->Show(entry);
253
}
254
Int_t macros::Cut(Long64_t entry)
255
{
256
// This function may be called from Loop.
257
// returns  1 if entry is accepted.
258
// returns -1 otherwise.
259
   return 1;
260
}
261
#endif // #ifdef macros_cxx