GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
ExampleEventSelector.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 ExampleEventSelector_h
9#define ExampleEventSelector_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 "TGRSISelector.h"
20#include "TGriffin.h"
21#include "TSceptar.h"
22#include "TGriffinBgo.h"
23
24// Fixed size dimensions of array or collections stored in the TTree if any.
25
26class ExampleEventSelector : public TGRSISelector { // Must be same name as .C and .h
27
28public:
29 TGriffin* fGrif; // Pointers to spot that events will be
32
33 explicit ExampleEventSelector(TTree* /*tree*/ = nullptr) : TGRSISelector(), fGrif(nullptr), fScep(nullptr), fGriffinBgo(nullptr)
34 {
35 SetOutputPrefix("ExampleEvent"); // Changes prefix of output file
36 }
37 // These functions are expected to exist
38 virtual ~ExampleEventSelector() = default;
39 virtual Int_t Version() const { return 2; }
40 void CreateHistograms();
41 void FillHistograms();
42 void InitializeBranches(TTree* tree);
43
44 ClassDef(ExampleEventSelector, 2); // Makes ROOT happier
45};
46
47#endif
48
49#ifdef ExampleEventSelector_cxx
51{
52 if(!tree) return;
53 if(tree->SetBranchAddress("TGriffin", &fGrif) == TTree::kMissingBranch) {
54 fGrif = new TGriffin;
55 }
56 if(tree->SetBranchAddress("TSceptar", &fScep) == TTree::kMissingBranch) {
57 fScep = new TSceptar;
58 }
59 if(tree->SetBranchAddress("TGriffinBgo", &fGriffinBgo) == TTree::kMissingBranch) {
61 }
62}
63
64#endif // #ifdef ExampleEventSelector_cxx
virtual Int_t Version() const
void InitializeBranches(TTree *tree)
ClassDef(ExampleEventSelector, 2)
virtual ~ExampleEventSelector()=default
ExampleEventSelector(TTree *=nullptr)
void SetOutputPrefix(const char *prefix)