Re: Drawing in compiled programs

Rene Brun (Rene.Brun@cern.ch)
Tue, 30 Mar 1999 00:51:31 +0200 (METDST)


Hi Marcus,
I suggest you look into the standard Root example hworld in
$ROOTSYS/test/hworld.cxx

You will see an example using simple graphics and what you have to do.

Rene Brun

On Mon, 29 Mar 1999, Marcus H. Mendenhall wrote:

> I have searched the roottalk lists extensively, and poked through a lot of
> source code, and still haven't figured out the answer to a question:
>
> I have recently started generating some compiled applications using the
> root libraries, for the few cases where I need more speed than CINT
> provides (especially reading in large text files to convert the to ROOT
> format). I cannot, however, get any of the graphs to appear on the screen
> which appear when running interactively. No sign of any windowing activity
> is present. I would have expected c1=new TCanvas("name","title", 20, 20,
> 200, 200) would have made a window appear, eventually.
>
> I also notice that when running compiled stress, it doesn't actually draw
> anything visibly on the screen or create any windows. My program template
> is based closely on the stress code. The inner loop calls
> (with hist=a TH1 and c=a TCanvas)
> hist->Draw(); c->Modified(); c->Update(); gSystem->ProcessEvent();
>
> (where everything after the hist->Draw() consists of various attempts at
> witchcraft I have invoked to try to get drawing turned on).
>
>
> Is there something really silly I am missing? How does one get windows to
> actually draw when running compiled code? I am running under LinuxPPC on a
> Macintosh.
>
> If the answer to this is not something obvious that I have missed, maybe it
> should be put in a howto.
>
>
> Thanks.
>
> Marcus
>
>
>