histogram drawing from compiled program

From: Kasper Peeters <kasper.peeters_at_aei.mpg.de>
Date: Mon, 20 Mar 2006 22:08:20 +0100


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);   


>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).

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