17 void hsimpleReader() {
19 auto myHist =
new TH1F(
"h1",
"ntuple",100,-4,4);
23 if (!myFile || myFile->IsZombie()) {
36 while (myReader.Next()) {
39 myHist->Fill(*myPx + *myPy);
TTreeReader is a simple, robust and fast interface to read values from a TTree, TChain or TNtuple...
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.