Author: Rene Brun
This notebook tutorial was automatically generated with ROOTBOOK-izer (Beta) from the macro found in the ROOT repository on Tuesday, January 17, 2017 at 02:42 PM.
In [1]:
TString dir = gROOT->GetTutorialsDir();
dir.Append("/tree/");
dir.ReplaceAll("/./","/");
TFile *f = new TFile("basic2.root","RECREATE");
TH1F *h1 = new TH1F("h1","x distribution",100,-4,4);
TTree *T = new TTree("ntuple","data from ascii file");
Long64_t nlines = T->ReadFile(Form("%sbasic.dat",dir.Data()),"x:y:z");
printf(" found %lld points\n",nlines);
T->Draw("x","z>2");
T->Write();
Draw all canvases
In [2]:
%jsroot on
gROOT->GetListOfCanvases()->Draw()