Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
316 f9daq 1
//////////////////////////////////////////////////////////
2
// This class has been automatically generated on
3
// Sun Oct 14 05:37:15 2018 by ROOT version 5.34/36
4
// from TTree tree/sipm data tree
5
// found on file: sipm.root
6
//////////////////////////////////////////////////////////
7
 
8
#ifndef tree_h
9
#define tree_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
#include <TString.h>
17
#include <TH2F.h>
18
#include <TH1F.h>
19
#include <TGraph.h>
20
// Fixed size dimensions of array or collections stored in the TTree if any.
21
 
22
class tree {
23
public :
24
   TTree          *fChain;   //!pointer to the analyzed TTree or TChain
25
   Int_t           fCurrent; //!current Tree number in a TChain
26
 
27
   // Declaration of leaf types
28
   Int_t           voltage;
29
   Int_t           temp;
30
   TString         *id;
31
   TString         *sn;
32
   TH2F            *dpo2;
33
   TH2F            *dpo3;
34
   TH1F            *qdc2;
35
   TH1F            *qdc3;
36
   TH1F            *tdc2;
37
   TH1F            *tdc3;
38
   TGraph *thscan;
39
 
40
   // List of branches
41
   TBranch        *b_voltage;   //!
42
   TBranch        *b_temperature;   //!
43
   TBranch        *b_id;   //!
44
   TBranch        *b_sn;   //!
45
   TBranch        *b_dpo2;   //!
46
   TBranch        *b_dpo3;   //!
47
   TBranch        *b_qdc2;   //!
48
   TBranch        *b_qdc3;   //!
49
   TBranch        *b_tdc2;   //!
50
   TBranch        *b_tdc3;   //!
51
   TBranch        *b_thscan;   //!
52
 
53
   tree(TTree *tree=0);
54
   virtual ~tree();
55
   virtual Int_t    Cut(Long64_t entry);
56
   virtual Int_t    GetEntry(Long64_t entry);
57
   virtual Long64_t LoadTree(Long64_t entry);
58
   virtual void     Init(TTree *tree);
59
   virtual void     Loop(int mode =0,TString ext="png");
60
   virtual Bool_t   Notify();
61
   virtual void     Show(Long64_t entry = -1);
62
};
63
 
64
#endif
65
 
66
#ifdef tree_cxx
67
tree::tree(TTree *tree) : fChain(0)
68
{
69
// if parameter tree is not specified (or zero), connect the file
70
// used to generate this class and read the Tree.
71
   if (tree == 0) {
72
      TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("sipm.root");
73
      if (!f || !f->IsOpen()) {
74
         f = new TFile("sipm.root");
75
      }
76
      f->GetObject("tree",tree);
77
 
78
   }
79
   Init(tree);
80
}
81
 
82
tree::~tree()
83
{
84
   if (!fChain) return;
85
   delete fChain->GetCurrentFile();
86
}
87
 
88
Int_t tree::GetEntry(Long64_t entry)
89
{
90
// Read contents of entry.
91
   if (!fChain) return 0;
92
   return fChain->GetEntry(entry);
93
}
94
Long64_t tree::LoadTree(Long64_t entry)
95
{
96
// Set the environment to read one entry
97
   if (!fChain) return -5;
98
   Long64_t centry = fChain->LoadTree(entry);
99
   if (centry < 0) return centry;
100
   if (fChain->GetTreeNumber() != fCurrent) {
101
      fCurrent = fChain->GetTreeNumber();
102
      Notify();
103
   }
104
   return centry;
105
}
106
 
107
void tree::Init(TTree *tree)
108
{
109
   // The Init() function is called when the selector needs to initialize
110
   // a new tree or chain. Typically here the branch addresses and branch
111
   // pointers of the tree will be set.
112
   // It is normally not necessary to make changes to the generated
113
   // code, but the routine can be extended by the user if needed.
114
   // Init() will be called many times when running on PROOF
115
   // (once per file to be processed).
116
 
117
   // Set object pointer
118
   id = 0;
119
   sn = 0;
120
   dpo2 = 0;
121
   dpo3 = 0;
122
   qdc2 = 0;
123
   qdc3 = 0;
124
   tdc2 = 0;
125
   tdc3 = 0;
126
   thscan=0;
127
   // Set branch addresses and branch pointers
128
   if (!tree) return;
129
   fChain = tree;
130
   fCurrent = -1;
131
   fChain->SetMakeClass(1);
132
 
133
   fChain->SetBranchAddress("voltage", &voltage, &b_voltage);
134
   fChain->SetBranchAddress("temp", &temp, &b_temperature);
135
   fChain->SetBranchAddress("id", &id, &b_id);
136
   fChain->SetBranchAddress("sn", &sn, &b_sn);
137
   fChain->SetBranchAddress("dpo2", &dpo2, &b_dpo2);
138
   fChain->SetBranchAddress("dpo3", &dpo3, &b_dpo3);
139
   fChain->SetBranchAddress("qdc2", &qdc2, &b_qdc2);
140
   fChain->SetBranchAddress("qdc3", &qdc3, &b_qdc3);
141
   fChain->SetBranchAddress("tdc2", &tdc2, &b_tdc2);
142
   fChain->SetBranchAddress("tdc3", &tdc3, &b_tdc3);
143
   fChain->SetBranchAddress("thscan", &thscan, &b_thscan);
144
   Notify();
145
}
146
 
147
Bool_t tree::Notify()
148
{
149
   // The Notify() function is called when a new file is opened. This
150
   // can be either for a new TTree in a TChain or when when a new TTree
151
   // is started when using PROOF. It is normally not necessary to make changes
152
   // to the generated code, but the routine can be extended by the
153
   // user if needed. The return value is currently not used.
154
 
155
   return kTRUE;
156
}
157
 
158
void tree::Show(Long64_t entry)
159
{
160
// Print contents of entry.
161
// If entry is not specified, print current entry
162
   if (!fChain) return;
163
   fChain->Show(entry);
164
}
165
Int_t tree::Cut(Long64_t entry)
166
{
167
// This function may be called from Loop.
168
// returns  1 if entry is accepted.
169
// returns -1 otherwise.
170
   return 1;
171
}
172
#endif // #ifdef tree_cxx