# to see the code can use to put in a script to obtain the same result:
Save / canvas.C entry of the File menu.
# SHELL commands within ROOT
.! ls
# make a copy of an histogram
TH1F *hnew = (TH1F*) h->Clone();
hnew->SetName("hnew"); // rename the new histogram
# normalize histogram
Double_t scale = norm/h->Integral();
h->Scale(scale);
# create a ROOT file and store a histogram on it.
TFile f("histos.root", "new");
h1->Write();
# read a histogram
TFile f("histos.root");
TH1F *h = (TH1F*) f.Get("hname");
# I/O redirection
l.Print() ; > test.log
# convert a single text file to HTML.
THtml h
h.Convert ("MyCode.C", "Look at my code", "htmlout/");
Save / canvas.C entry of the File menu.
# SHELL commands within ROOT
.! ls
# make a copy of an histogram
TH1F *hnew = (TH1F*) h->Clone();
hnew->SetName("hnew"); // rename the new histogram
# normalize histogram
Double_t scale = norm/h->Integral();
h->Scale(scale);
# create a ROOT file and store a histogram on it.
TFile f("histos.root", "new");
h1->Write();
# read a histogram
TFile f("histos.root");
TH1F *h = (TH1F*) f.Get("hname");
# I/O redirection
l.Print() ; > test.log
# convert a single text file to HTML.
THtml h
h.Convert ("MyCode.C", "Look at my code", "htmlout/");
Comments
Post a Comment
https://gengwg.blogspot.com/