TTreeReader simplest example.
Read data from hsimple.root (written by hsimple.C)
void hsimpleReader() {
auto myHist =
new TH1F(
"h1",
"ntuple",100,-4,4);
if (!myFile || myFile->IsZombie()) {
return;
}
while (myReader.Next()) {
myHist->Fill(*myPx + *myPy);
}
myHist->Draw();
}
- Author
- Anders Eie, 2013
Definition in file hsimpleReader.C.