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 
13 public:
15 
31 
32  TH1F *hdmd;//!
33  TH2F *h2;//!
34 
39 
40  h1analysisTreeReader(TTree* /*tree*/=0) :
41  myTreeReader(),
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 
61  virtual ~h1analysisTreeReader() { }
62  void Reset();
63 
64  int Version() const {return 1;}
65  void Begin(TTree *);
66  void SlaveBegin(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;
88  fillList = kFALSE;
89  useList = kFALSE;
90  fProcessed = 0;
91 }
92 
93 #endif
h1analysisTreeReader::hdmd
TH1F * hdmd
Definition: h1analysisTreeReader.h:32
TTreeReader::SetTree
void SetTree(TTree *tree, TEntryList *entryList=nullptr)
Set (or update) the which tree to read from.
Definition: TTreeReader.cxx:628
h1analysisTreeReader::fRpd0_t
TTreeReaderValue< Float_t > fRpd0_t
Definition: h1analysisTreeReader.h:24
h1analysisTreeReader::Version
int Version() const
Definition: h1analysisTreeReader.h:64
TTreeReaderValue.h
TSelector
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition: TSelector.h:31
h1analysisTreeReader::fIpi
TTreeReaderValue< Int_t > fIpi
Definition: h1analysisTreeReader.h:20
h1analysisTreeReader::fIk
TTreeReaderValue< Int_t > fIk
Definition: h1analysisTreeReader.h:19
h1analysisTreeReader::fPtds_d
TTreeReaderValue< Float_t > fPtds_d
Definition: h1analysisTreeReader.h:16
h1analysisTreeReader::fEtads_d
TTreeReaderValue< Float_t > fEtads_d
Definition: h1analysisTreeReader.h:17
TH2F
2-D histogram with a float per channel (see TH1 documentation)}
Definition: TH2.h:251
TTreeReaderValue< Float_t >
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TTree
A TTree represents a columnar dataset.
Definition: TTree.h:79
h1analysisTreeReader::fRstart
TTreeReaderArray< Float_t > fRstart
Definition: h1analysisTreeReader.h:26
TTreeReaderArray
An interface for reading collections stored in ROOT columnar datasets.
Definition: TTreeReaderArray.h:75
h1analysisTreeReader::fNjets
TTreeReaderValue< Int_t > fNjets
Definition: h1analysisTreeReader.h:30
h1analysisTreeReader::Process
Bool_t Process(Long64_t entry)
h1analysisTreeReader::Init
void Init(TTree *myTree)
Definition: h1analysisTreeReader.h:67
h1analysisTreeReader::Notify
Bool_t Notify()
This method must be overridden to handle object notification.
h1analysisTreeReader::h1analysisTreeReader
h1analysisTreeReader(TTree *=0)
Definition: h1analysisTreeReader.h:40
bool
h1analysisTreeReader
Definition: h1analysisTreeReader.h:12
h1analysisTreeReader::fIpis
TTreeReaderValue< Int_t > fIpis
Definition: h1analysisTreeReader.h:21
h1analysisTreeReader::useList
Bool_t useList
Definition: h1analysisTreeReader.h:35
h1analysisTreeReader::myTreeReader
TTreeReader myTreeReader
Definition: h1analysisTreeReader.h:14
h1analysisTreeReader::GetOutputList
TList * GetOutputList() const
Definition: h1analysisTreeReader.h:73
h1analysisTreeReader::fDm_d
TTreeReaderValue< Float_t > fDm_d
Definition: h1analysisTreeReader.h:18
h1analysisTreeReader::SlaveBegin
void SlaveBegin(TTree *)
TTreeReader.h
h1analysisTreeReader::fRend
TTreeReaderArray< Float_t > fRend
Definition: h1analysisTreeReader.h:27
TTreeReaderArray.h
h1analysisTreeReader::Begin
void Begin(TTree *)
h1analysisTreeReader::fillList
Bool_t fillList
Definition: h1analysisTreeReader.h:36
TSelector::fOption
TString fOption
Option given to TTree::Process.
Definition: TSelector.h:39
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TTreeReader
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
Definition: TTreeReader.h:44
h1analysisTreeReader::h2
TH2F * h2
Definition: h1analysisTreeReader.h:33
h1analysisTreeReader::fMd0_d
TTreeReaderValue< Float_t > fMd0_d
Definition: h1analysisTreeReader.h:23
h1analysisTreeReader::Reset
void Reset()
Definition: h1analysisTreeReader.h:81
h1analysisTreeReader::SetInputList
void SetInputList(TList *input)
Definition: h1analysisTreeReader.h:72
h1analysisTreeReader::fPtd0_d
TTreeReaderValue< Float_t > fPtd0_d
Definition: h1analysisTreeReader.h:22
TH2.h
h1analysisTreeReader::elist
TEntryList * elist
Definition: h1analysisTreeReader.h:37
TEntryList
A List of entry numbers in a TTree or TChain.
Definition: TEntryList.h:26
TSelector::fOutput
TSelectorList * fOutput
! List of objects created during processing
Definition: TSelector.h:42
TF1.h
TH1F
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:573
h1analysisTreeReader::Terminate
void Terminate()
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
h1analysisTreeReader::fNhitrp
TTreeReaderArray< Int_t > fNhitrp
Definition: h1analysisTreeReader.h:25
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TEntryList.h
TSelector::fObject
TObject * fObject
! Current object if processing object (vs. TTree)
Definition: TSelector.h:40
h1analysisTreeReader::fNlhpi
TTreeReaderArray< Float_t > fNlhpi
Definition: h1analysisTreeReader.h:29
h1analysisTreeReader::fNlhk
TTreeReaderArray< Float_t > fNlhk
Definition: h1analysisTreeReader.h:28
h1analysisTreeReader::SetObject
void SetObject(TObject *obj)
Definition: h1analysisTreeReader.h:71
h1analysisTreeReader::fProcessed
Long64_t fProcessed
Definition: h1analysisTreeReader.h:38
h1analysisTreeReader::~h1analysisTreeReader
virtual ~h1analysisTreeReader()
Definition: h1analysisTreeReader.h:61
TSelector::fInput
TList * fInput
List of objects available during processing.
Definition: TSelector.h:41
TSelector.h
TList
A doubly linked list.
Definition: TList.h:44
h1analysisTreeReader::SlaveTerminate
void SlaveTerminate()
h1analysisTreeReader::SetOption
void SetOption(const char *option)
Definition: h1analysisTreeReader.h:70