15 void hsimpleReader() {
17 auto myHist =
new TH1F(
"h1",
"ntuple",100,-4,4);
21 if (!myFile || myFile->IsZombie()) {
34 while (myReader.Next()) {
37 myHist->Fill(*myPx + *myPy);
TTreeReader is a simple, robust and fast interface to read values from a TTree, TChain or TNtuple...
1-D histogram with a float per channel (see TH1 documentation)}
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.