CLARION2_GEANT4/AnalyzerCloveronly.h
2022-12-16 23:42:15 -05:00

101 lines
3.3 KiB
C++

//////////////////////////////////////////////////////////
// This class has been automatically generated on
// Mon Oct 17 14:56:21 2022 by ROOT version 6.26/06
// from TTree Clover/Edep and TrackL
// found on file: AllCrystal_Co60.root
//////////////////////////////////////////////////////////
#ifndef Analyzer_h
#define Analyzer_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include <TSelector.h>
// Header file for the classes stored in the TTree if any.
#include "vector"
class Analyzer : public TSelector {
public :
TTree *fChain; //!pointer to the analyzed TTree or TChain
// Fixed size dimensions of array or collections stored in the TTree if any.
// Declaration of leaf types
Int_t nTraj;
vector<double> *energy;
vector<double> *stepLength;
Double_t bEnergy;
Double_t theta;
Double_t phi;
// List of branches
TBranch *b_nTraj; //!
TBranch *b_energy; //!
TBranch *b_stepLength; //!
TBranch *b_bEnergy; //!
TBranch *b_theta; //!
TBranch *b_phi; //!
Analyzer(TTree * /*tree*/ =0) : fChain(0) { }
virtual ~Analyzer() { }
virtual Int_t Version() const { return 2; }
virtual void Begin(TTree *tree);
virtual void SlaveBegin(TTree *tree);
virtual void Init(TTree *tree);
virtual Bool_t Notify();
virtual Bool_t Process(Long64_t entry);
virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
virtual void SetOption(const char *option) { fOption = option; }
virtual void SetObject(TObject *obj) { fObject = obj; }
virtual void SetInputList(TList *input) { fInput = input; }
virtual TList *GetOutputList() const { return fOutput; }
virtual void SlaveTerminate();
virtual void Terminate();
ClassDef(Analyzer,0);
};
#endif
#ifdef Analyzer_cxx
void Analyzer::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
energy = 0;
stepLength = 0;
// Set branch addresses and branch pointers
if (!tree) return;
fChain = tree;
fChain->SetMakeClass(1);
fChain->SetBranchAddress("nTraj", &nTraj, &b_nTraj);
fChain->SetBranchAddress("energy", &energy, &b_energy);
fChain->SetBranchAddress("stepLength", &stepLength, &b_stepLength);
fChain->SetBranchAddress("bEnergy", &bEnergy, &b_bEnergy);
fChain->SetBranchAddress("theta", &theta, &b_theta);
fChain->SetBranchAddress("phi", &phi, &b_phi);
}
Bool_t Analyzer::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;
}
#endif // #ifdef Analyzer_cxx