Create can ntuple reading data from an ascii file.
This macro is a variant of basic.C
void basic2() {
TH1F *
h1 =
new TH1F(
"h1",
"x distribution",100,-4,4);
TTree *T =
new TTree(
"ntuple",
"data from ascii file");
printf(" found %lld points\n",nlines);
T->Draw("x","z>2");
T->Write();
}
char * Form(const char *fmt,...)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
1-D histogram with a float per channel (see TH1 documentation)}
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString & Append(const char *cs)
A TTree represents a columnar dataset.
- Author
- Rene Brun
Definition in file basic2.C.