Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
40 h1analysisTreeReader(TTree* /*tree*/=nullptr) :
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 ~h1analysisTreeReader() override { }
62 void Reset();
63
64 int Version() const override {return 1;}
65 void Begin(TTree *) override;
66 void SlaveBegin(TTree *) override;
67 void Init(TTree *myTree) override { myTreeReader.SetTree(myTree); }
68 Bool_t Notify() override;
69 Bool_t Process(Long64_t entry) override;
70 void SetOption(const char *option) override { fOption = option; }
71 void SetObject(TObject *obj) override { fObject = obj; }
72 void SetInputList(TList *input) override {fInput = input;}
73 TList *GetOutputList() const override { return fOutput; }
74 void SlaveTerminate() override;
75 void Terminate() override;
76
78};
79
80//_____________________________________________________________________
82{
83 // Reset the data members to theit initial value
84
85 hdmd = nullptr;
86 h2 = nullptr;
87 elist = nullptr;
90 fProcessed = 0;
91}
92
93#endif
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
long long Long64_t
Definition RtypesCore.h:80
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
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:621
2-D histogram with a float per channel (see TH1 documentation)
Definition TH2.h:307
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition TSelector.h:31
TList * fInput
List of objects available during processing.
Definition TSelector.h:41
TString fOption
Option given to TTree::Process.
Definition TSelector.h:39
TSelectorList * fOutput
! List of objects created during processing
Definition TSelector.h:42
TObject * fObject
! Current object if processing object (vs. TTree)
Definition TSelector.h:40
An interface for reading collections stored in ROOT columnar datasets.
An interface for reading values stored in ROOT columnar datasets.
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
Definition TTreeReader.h:44
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:79
Bool_t Process(Long64_t entry) override
The Process() function is called for each entry in the tree (or possibly keyed object in the case of ...
TTreeReaderValue< Int_t > fIpi
TTreeReaderArray< Int_t > fNhitrp
TTreeReaderValue< Float_t > fRpd0_t
TTreeReaderArray< Float_t > fNlhpi
TTreeReaderValue< Float_t > fMd0_d
TTreeReaderValue< Float_t > fPtd0_d
void SetInputList(TList *input) override
TList * GetOutputList() const override
void SlaveBegin(TTree *) override
TTreeReaderValue< Int_t > fIk
Bool_t Notify() override
This method must be overridden to handle object notification (the base implementation is no-op).
void Terminate() override
h1analysisTreeReader(TTree *=nullptr)
TTreeReaderValue< Int_t > fIpis
TTreeReaderValue< Int_t > fNjets
TTreeReaderArray< Float_t > fRend
TTreeReaderValue< Float_t > fEtads_d
void SetOption(const char *option) override
void SlaveTerminate() override
TTreeReaderArray< Float_t > fRstart
void SetObject(TObject *obj) override
TTreeReaderValue< Float_t > fDm_d
int Version() const override
TTreeReaderArray< Float_t > fNlhk
TTreeReaderValue< Float_t > fPtds_d
void Begin(TTree *) override
void Init(TTree *myTree) override