swh:1:snp:af87cd67498ef4fe47c76ed3e7caffe5b61facaf
Raw File
Tip revision: de2c598a74ea814a2d113efd5e24b7e08debe95b authored by Unknown Author on 05 July 2005, 22:28:11 UTC
This commit was manufactured by cvs2svn to create tag 'v5-02-00'.
Tip revision: de2c598
basic2.C
{
//   example of macro to create can ntuple reading data from an ascii file.
//   This macro is a variant of basic.C
   
   gROOT->Reset();
   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("basic.dat","x:y:z");
   printf(" found %lld points\n",nlines);
   T->Draw("x","z>2");
   T->Write();
}
back to top