Hello,
I have recorded a TH1F in a .root file.
When I open a TBrowser, I can see my histogram, everything is ok, I can see its content.
But when I try to open and draw it from a macro, only a blank canvas opens (code below).
Does anybody have an idea why ?
Thanks,
Marie-Helene
[code]
TFile file1(“PSF.root”);
TH1F* PSF_histo=(TH1F*)file1.Get(“ym_histo”);
gStyle -> SetStatW(0.28);
gStyle -> SetStatH(0.13);
gStyle -> SetStatColor(41);
gStyle -> SetStatX(0.87);
gStyle -> SetStatY(0.85);
gStyle -> SetStatFont(132);
gStyle -> SetOptStat(111);
gStyle -> SetOptFit(0000);
gStyle->SetLabelFont(132,“xyz”);
gStyle->SetLabelSize(0.06,“xyz”);
gStyle->SetTitleFont(132,“xyzpad”);
gStyle->SetTitleSize(0.06,“xyz”);
gStyle->SetPalette(1);
c1 = new TCanvas(“Canvas1”,“1”,1);
c1->SetFillColor(0);
c1->SetBorderMode(0);
PSF_histo->Draw();[/code]