Hi
I get the following error when trying to read histogram that I previously saved in a root file:
root -l plot.C -q
root [0]
Processing plot.C…
Error: illegal pointer to class object h 0x0 138 plot.C:4:
*** Interpreter error recovered ***
My macro is this:
void plot() {
TFile *f=new TFile(“output_MC10.126046.SherpaWWaTGC1_lnulnu.root”);
TH1F h=(TH1F)f->Get(“m_WplusPt”);
h->Draw();
}
If I open the file in a TBrowser, I can see the histograms perfectly.
Any ideas why my macro doesn’t work?
Thanks,
Kristian