RE: [ROOT] How to turn off the graph display in root ?

From: Faine, Valeri (fine@bnl.gov)
Date: Wed Nov 06 2002 - 18:56:07 MET


Hello folks,

I think one would have solved this problem if one might create a TPad
object with no TCanvas. TPad object is painted onto some "pixmap" rather
to some window and this pixmap is never popped up on its own.

Alas the current ROOT implementation doesn't allow this:

See:  http://root.cern.ch/root/htmldoc/src/TPad.cxx.html#TPad:TPad
Watch there the statements:

if (!gPad) {
      Error("TPad", "You must create a TCanvas before creating a TPad");
      MakeZombie();
      return;
   }

Best regards, 
                         Valeri

> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]
> On Behalf Of Fons Rademakers
> Sent: Wednesday, November 06, 2002 6:01 AM
> To: Stilianos Kesisoglou
> Cc: stevenkj; roottalk@pcroot.cern.ch
> Subject: Re: [ROOT] How to turn off the graph display in root ?
> 
> But you need the X11 interface to get gifs. The other solution is to
use
> a framebuffer X server. See:
> http://root.cern.ch/root/roottalk/roottalk01/0374.html
> 
> Cheers, Fons
> 
> 
> On Wed, 2002-11-06 at 11:36, Stilianos Kesisoglou wrote:
> > Hi Kyle,
> >
> >     Just use:
> >
> >     gROOT->SetBatch(kTRUE);
> >
> > and everything works the same way but the canvas is suppressed
> > and doesn't open any X-Window
> >
> > Stelios.
> >
> > ----- Original Message -----
> > From: "stevenkj" <stevenkj@fnal.gov>
> > To: <roottalk@pcroot.cern.ch>
> > Sent: Wednesday, November 06, 2002 4:14 AM
> > Subject: [ROOT] How to turn off the graph display in root ?
> >
> >
> > > Hello ,
> > >
> > > Bit of an unusual question this one. I have a macro which is being
> > > run as part of an online monitoring program at D0 & displays a
graph &
> > > converts it to a gif file. I basically want to run
> > > this in the background without the graph appearing in an x-window
(as
> > > usually happens). Is there anyway to turn off the graph display ?
> (since
> > > I just save the histogram to a gif file , which is displayed by a
> python
> > > interface I don't really need it anyway),
> > >
> > > Regards,
> > >   Kyle Stevenson.
> > >
> > >
> > >
> --
> Org:    CERN, European Laboratory for Particle Physics.
> Mail:   1211 Geneve 23, Switzerland
> E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
> WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:16 MET