GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
FastTimingHistSelector.h
Go to the documentation of this file.
1//////////////////////////////////////////////////////////
2// This class has been automatically generated on
3// Tue Oct 25 13:18:27 2016 by ROOT version 5.34/24
4// from TTree FragmentTree/FragmentTree
5// found on file: fragment07844_000.root
6//////////////////////////////////////////////////////////
7
8#ifndef FastTimingHistSelector_h
9#define FastTimingHistSelector_h
10
11#include "TChain.h"
12#include "TFile.h"
13
14#include "TH1.h"
15#include "TH2.h"
16#include "THnSparse.h"
17
18// Header file for the classes stored in the TTree if any.
19#include "GValue.h"
20#include "TGRSISelector.h"
21#include "TGriffin.h"
22#include "TSceptar.h"
23#include "TGriffinBgo.h"
24
25// Fixed size dimensions of array or collections stored in the TTree if any.
26
27class FastTimingHistSelector : public TGRSISelector { // Must be same name as .C and .h
28
29public:
30 // branches
31 double fLaBrEnergy[2];
32 uint8_t fLaBrId[2];
33 double fTac;
34 uint8_t fTacId;
35 std::vector<double>* fGeEnergies;
36 Long64_t fEntry;
37
38 // settings
45 double fGeEnergy;
46 double fGeLow;
47 double fGeHigh;
48
49 explicit FastTimingHistSelector(TTree* /*tree*/ = nullptr) : TGRSISelector(), fGeEnergies(nullptr)
50 {
51 SetOutputPrefix("FastTimingHist");
52 }
53 // These functions are expected to exist
54 virtual ~FastTimingHistSelector() = default;
55 virtual Int_t Version() const { return 2; }
56 void CreateHistograms();
57 void FillHistograms();
58 void InitializeBranches(TTree* tree);
59
60 ClassDef(FastTimingHistSelector, 1); // Makes ROOT happier
61};
62
63#endif
64
65#ifdef FastTimingHistSelector_cxx
67{
68 if(!tree) return;
69 if(tree->SetBranchAddress("germanium", &fGeEnergies) == TTree::kMissingBranch ||
70 tree->SetBranchAddress("firstEnergy", &fLaBrEnergy[0]) == TTree::kMissingBranch ||
71 tree->SetBranchAddress("firstLaBr", &fLaBrId[0]) == TTree::kMissingBranch ||
72 tree->SetBranchAddress("secondEnergy", &fLaBrEnergy[1]) == TTree::kMissingBranch ||
73 tree->SetBranchAddress("secondLaBr", &fLaBrId[1]) == TTree::kMissingBranch ||
74 tree->SetBranchAddress("tac", &fTac) == TTree::kMissingBranch ||
75 tree->SetBranchAddress("tacId", &fTacId) == TTree::kMissingBranch ||
76 tree->SetBranchAddress("entry", &fEntry) == TTree::kMissingBranch) {
77 throw std::runtime_error("Failed to find all branches necessary for fast timing histograms!");
78 }
79}
80
81#endif // #ifdef FastTimingHistSelector_cxx
virtual Int_t Version() const
virtual ~FastTimingHistSelector()=default
void InitializeBranches(TTree *tree)
ClassDef(FastTimingHistSelector, 1)
std::vector< double > * fGeEnergies
FastTimingHistSelector(TTree *=nullptr)
void SetOutputPrefix(const char *prefix)