I have two TH1S objects in two files, now I want to put them on one canvas to compare. But I couldn’t by openning files one by one. Once I open a new file, the old object will be NULL.
Anyone can give me some hints?
Thanks a lot!
Do something like:
TFile *f1 = new TFile("file1.root");
TH1 *h1 = (TH1*)f1->Get("myFirstHist");
TFile *f2 = new TFile("file2.root");
TH1 *h2 = (TH1*)f2->Get("mySecondHostogram");
h1->Draw();
h2->Draw("same");
Rene