//////////////////////////////////////////////////////////
// This class has been automatically generated on
// Sun Oct 14 05:37:15 2018 by ROOT version 5.34/36
// from TTree tree/sipm data tree
// found on file: sipm.root
//////////////////////////////////////////////////////////
#ifndef tree_h
#define tree_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
// Header file for the classes stored in the TTree if any.
#include <TString.h>
#include <TH2F.h>
#include <TH1F.h>
#include <TGraph.h>
// Fixed size dimensions of array or collections stored in the TTree if any.
class tree {
public :
TTree *fChain; //!pointer to the analyzed TTree or TChain
Int_t fCurrent; //!current Tree number in a TChain
// Declaration of leaf types
Int_t voltage;
Int_t temp;
TString *id;
TString *sn;
TH2F *dpo2;
TH2F *dpo3;
TH1F *qdc2;
TH1F *qdc3;
TH1F *tdc2;
TH1F *tdc3;
TGraph *thscan;
// List of branches
TBranch *b_voltage; //!
TBranch *b_temperature; //!
TBranch *b_id; //!
TBranch *b_sn; //!
TBranch *b_dpo2; //!
TBranch *b_dpo3; //!
TBranch *b_qdc2; //!
TBranch *b_qdc3; //!
TBranch *b_tdc2; //!
TBranch *b_tdc3; //!
TBranch *b_thscan; //!
tree(TTree *tree=0);
virtual ~tree();
virtual Int_t Cut(Long64_t entry);
virtual Int_t GetEntry(Long64_t entry);
virtual Long64_t LoadTree(Long64_t entry);
virtual void Init(TTree *tree);
virtual void Loop(int mode =0,TString ext="png");
virtual Bool_t Notify();
virtual void Show(Long64_t entry = -1);
};
#endif
#ifdef tree_cxx
tree::tree(TTree *tree) : fChain(0)
{
// if parameter tree is not specified (or zero), connect the file
// used to generate this class and read the Tree.
if (tree == 0) {
TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("sipm.root");
if (!f || !f->IsOpen()) {
f = new TFile("sipm.root");
}
f->GetObject("tree",tree);
}
Init(tree);
}
tree::~tree()
{
if (!fChain) return;
delete fChain->GetCurrentFile();
}
Int_t tree::GetEntry(Long64_t entry)
{
// Read contents of entry.
if (!fChain) return 0;
return fChain->GetEntry(entry);
}
Long64_t tree::LoadTree(Long64_t entry)
{
// Set the environment to read one entry
if (!fChain) return -5;
Long64_t centry = fChain->LoadTree(entry);
if (centry < 0) return centry;
if (fChain->GetTreeNumber() != fCurrent) {
fCurrent = fChain->GetTreeNumber();
Notify();
}
return centry;
}
void tree::Init(TTree *tree)
{
// The Init() function is called when the selector needs to initialize
// a new tree or chain. Typically here the branch addresses and branch
// pointers of the tree will be set.
// It is normally not necessary to make changes to the generated
// code, but the routine can be extended by the user if needed.
// Init() will be called many times when running on PROOF
// (once per file to be processed).
// Set object pointer
id = 0;
sn = 0;
dpo2 = 0;
dpo3 = 0;
qdc2 = 0;
qdc3 = 0;
tdc2 = 0;
tdc3 = 0;
thscan=0;
// Set branch addresses and branch pointers
if (!tree) return;
fChain = tree;
fCurrent = -1;
fChain->SetMakeClass(1);
fChain->SetBranchAddress("voltage", &voltage, &b_voltage);
fChain->SetBranchAddress("temp", &temp, &b_temperature);
fChain->SetBranchAddress("id", &id, &b_id);
fChain->SetBranchAddress("sn", &sn, &b_sn);
fChain->SetBranchAddress("dpo2", &dpo2, &b_dpo2);
fChain->SetBranchAddress("dpo3", &dpo3, &b_dpo3);
fChain->SetBranchAddress("qdc2", &qdc2, &b_qdc2);
fChain->SetBranchAddress("qdc3", &qdc3, &b_qdc3);
fChain->SetBranchAddress("tdc2", &tdc2, &b_tdc2);
fChain->SetBranchAddress("tdc3", &tdc3, &b_tdc3);
fChain->SetBranchAddress("thscan", &thscan, &b_thscan);
Notify();
}
Bool_t tree::Notify()
{
// The Notify() function is called when a new file is opened. This
// can be either for a new TTree in a TChain or when when a new TTree
// is started when using PROOF. It is normally not necessary to make changes
// to the generated code, but the routine can be extended by the
// user if needed. The return value is currently not used.
return kTRUE;
}
void tree::Show(Long64_t entry)
{
// Print contents of entry.
// If entry is not specified, print current entry
if (!fChain) return;
fChain->Show(entry);
}
Int_t tree::Cut(Long64_t entry)
{
// This function may be called from Loop.
// returns 1 if entry is accepted.
// returns -1 otherwise.
return 1;
}
#endif // #ifdef tree_cxx