I have a very simple macro to read a ttree and then create histograms, but when I try to plot the histograms the canvas are empties. In addition when I do t_per_run->Draw(“time_of_run”); I have an histogram, but I do t_per_run->Draw(“time_of_run>>h_test”); the canvas is empty again.
The histograms are filled correctly because I get good values when I use GetBinContent … I don’t know what is the problem?
Really it is a weird problem. I mange to reduce it to the following simple macro:
void testPlots() {
TFile f("Data_Runs_May_4MeVPerFiber_ALL.root");
TH1D* h = new TH1D("h","h",10,0.,1.);
h->Draw();
}
if you run this macro the canvas is empty. If you comment the TFile line then an empty histogram plot (axis etc … ) appears as it should. I have no idea why just attaching the file messes up the graphics.