Logo ROOT   6.10/09
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); }
68  Bool_t Notify();
69  Bool_t Process(Long64_t entry);
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; }
74  void SlaveTerminate();
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
TSelectorList * fOutput
! List of objects created during processing
Definition: TSelector.h:44
long long Long64_t
Definition: RtypesCore.h:69
TTreeReaderValue< Int_t > fNjets
TTreeReader is a simple, robust and fast interface to read values from a TTree, TChain or TNtuple...
Definition: TTreeReader.h:43
TTreeReaderArray< Float_t > fNlhpi
tomato 1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:551
bool Bool_t
Definition: RtypesCore.h:59
TTreeReaderValue< Int_t > fIpis
TTreeReaderArray< Float_t > fRend
void SetOption(const char *option)
TTreeReaderValue< Float_t > fPtd0_d
#define ClassDef(name, id)
Definition: Rtypes.h:297
void SetInputList(TList *input)
TTreeReaderValue< Float_t > fPtds_d
TString fOption
Option given to TTree::Process.
Definition: TSelector.h:41
A doubly linked list.
Definition: TList.h:43
TList * GetOutputList() const
TObject * fObject
! Current object if processing object (vs. TTree)
Definition: TSelector.h:42
TTreeReaderValue< Float_t > fRpd0_t
Bool_t Process(Long64_t entry)
TTreeReaderValue< Float_t > fDm_d
tomato 2-D histogram with a float per channel (see TH1 documentation)}
Definition: TH2.h:249
TTreeReaderArray< Int_t > fNhitrp
const Bool_t kFALSE
Definition: RtypesCore.h:92
TTreeReaderArray< Float_t > fNlhk
Bool_t Notify()
This method must be overridden to handle object notification.
TTreeReaderValue< Float_t > fMd0_d
TTreeReaderValue< Float_t > fEtads_d
TTreeReaderArray< Float_t > fRstart
TTreeReaderValue< Int_t > fIk
Mother of all ROOT objects.
Definition: TObject.h:37
void Init(TTree *myTree)
TList * fInput
List of objects available during processing.
Definition: TSelector.h:43
A TTree object has a header with a name and a title.
Definition: TTree.h:78
void SetTree(TTree *tree, TEntryList *entryList=nullptr)
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition: TSelector.h:33
A List of entry numbers in a TTree or TChain.
Definition: TEntryList.h:25
void SetObject(TObject *obj)
TTreeReaderValue< Int_t > fIpi