Logo ROOT  
Reference Guide
h1analysisTreeReader.h
Go to the documentation of this file.
1#ifndef h1analysisTreeReader_h
2#define h1analysisTreeReader_h
3
4#include "TTreeReader.h"
5#include "TTreeReaderValue.h"
6#include "TTreeReaderArray.h"
7#include "TSelector.h"
8#include "TEntryList.h"
9#include "TH2.h"
10#include "TF1.h"
11
13public:
15
31
33 TH2F *h2;//!
34
39
42 fPtds_d (myTreeReader, "ptds_d" ),
43 fEtads_d (myTreeReader, "etads_d" ),
44 fDm_d (myTreeReader, "dm_d" ),
45 fIk (myTreeReader, "ik" ),
46 fIpi (myTreeReader, "ipi" ),
47 fIpis (myTreeReader, "ipis" ),
48 fPtd0_d (myTreeReader, "ptd0_d" ),
49 fMd0_d (myTreeReader, "md0_d" ),
50 fRpd0_t (myTreeReader, "rpd0_t" ),
51 fNhitrp (myTreeReader, "nhitrp" ),
52 fRstart (myTreeReader, "rstart" ),
53 fRend (myTreeReader, "rend" ),
54 fNlhk (myTreeReader, "nlhk" ),
55 fNlhpi (myTreeReader, "nlhpi" ),
56 fNjets (myTreeReader, "njets" )
57 {
58 Reset();
59 };
60
62 void Reset();
63
64 int Version() const {return 1;}
65 void Begin(TTree *);
67 void Init(TTree *myTree) { myTreeReader.SetTree(myTree); }
70 void SetOption(const char *option) { fOption = option; }
71 void SetObject(TObject *obj) { fObject = obj; }
72 void SetInputList(TList *input) {fInput = input;}
73 TList *GetOutputList() const { return fOutput; }
75 void Terminate();
76
78};
79
80//_____________________________________________________________________
82{
83 // Reset the data members to theit initial value
84
85 hdmd = 0;
86 h2 = 0;
87 elist = 0;
90 fProcessed = 0;
91}
92
93#endif
const Bool_t kFALSE
Definition: RtypesCore.h:90
long long Long64_t
Definition: RtypesCore.h:71
#define ClassDef(name, id)
Definition: Rtypes.h:322
A List of entry numbers in a TTree or TChain.
Definition: TEntryList.h:26
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:571
2-D histogram with a float per channel (see TH1 documentation)}
Definition: TH2.h:251
A doubly linked list.
Definition: TList.h:44
Mother of all ROOT objects.
Definition: TObject.h:37
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition: TSelector.h:33
TList * fInput
List of objects available during processing.
Definition: TSelector.h:43
TString fOption
Option given to TTree::Process.
Definition: TSelector.h:41
TSelectorList * fOutput
! List of objects created during processing
Definition: TSelector.h:44
TObject * fObject
! Current object if processing object (vs. TTree)
Definition: TSelector.h:42
An interface for reading collections stored in ROOT columnar datasets.
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
Definition: TTreeReader.h:43
void SetTree(TTree *tree, TEntryList *entryList=nullptr)
Set (or update) the which tree to read from.
A TTree represents a columnar dataset.
Definition: TTree.h:78
void SetObject(TObject *obj)
TTreeReaderValue< Int_t > fIpi
void Init(TTree *myTree)
TTreeReaderArray< Int_t > fNhitrp
Bool_t Process(Long64_t entry)
TTreeReaderValue< Float_t > fRpd0_t
TTreeReaderArray< Float_t > fNlhpi
TTreeReaderValue< Float_t > fMd0_d
void SetOption(const char *option)
void SlaveBegin(TTree *)
TTreeReaderValue< Float_t > fPtd0_d
void SetInputList(TList *input)
TTreeReaderValue< Int_t > fIk
Bool_t Notify()
This method must be overridden to handle object notification.
TTreeReaderValue< Int_t > fIpis
TList * GetOutputList() const
TTreeReaderValue< Int_t > fNjets
TTreeReaderArray< Float_t > fRend
TTreeReaderValue< Float_t > fEtads_d
void Begin(TTree *)
TTreeReaderArray< Float_t > fRstart
TTreeReaderValue< Float_t > fDm_d
TTreeReaderArray< Float_t > fNlhk
TTreeReaderValue< Float_t > fPtds_d