Hi,
I am trying to make a compiled program draw histograms. It contains the following code:
TFile *output = new TFile("out.root", "RECREATE"); TH1F *h_nele = new TH1F ("ele_n", "Number of electrons", 10, 0.0, 10.0);
h_nele->Fill(2);
h_nele->Draw();
>From CINT, this works as expected (it shows the histogram). However,
from a compiled program, it doesn't show the histogram window
(sleeping after the last line also doesn't help, it just delays the
program). I tried to manually create a TCanvas, but that didn't make
any difference either. The out.root file gets filled correctly, and I
can browse the histogram using a TBrowser, but I would like to make
the histogram pop up automatically.
What am I missing? (sorry if this is a FAQ).
Thanks,
Kasper
Received on Mon Mar 20 2006 - 22:08:30 MET
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET