Re: ControlBar

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Apr 16 1998 - 09:09:33 MEST


Jayoung Wu wrote:
> 
> Is there something wrong with my code?
> My code("aticdemos.C") is
> {
>   gROOT->Reset("a");
>   bar = new TControlBar("vertical");
> 
>   bar->AddButton("Start!",".x start.C", "Read 1st event from aticdata.root");
>   bar->AddButton("Event++",".x nextevent.C", "Next Event read");
>   bar->AddButton("Track",".x ytrack.C", "Tracking Incident X(Y) Position");
>   bar->AddButton("HITS-DISPLAY",".x evdisp.C", "DISPLAY HITS");
> 
>   bar->Show();
>   gROOT->SaveContext();
> 
> }
> 
> ---------------------------------------------------------
> root> .x aticdemos.C
>   --> It gives me a controlbar which has four buttons(Start!, Event++, Track,
>       HITS-DISPLAY) vertically.
>       First two buttons(Start!, Event++) work well.
>       In some reason the other two buttons(Track, "HITS-DISPLAY) does not
>       work. Whein I click it, it gives Sigmentation Violation Error message.
> 
>       However, when I execute them manually instead of using controlbar
>         (root> .x ytrack.C
>          root> .x .x evdisp.C)
>       Those are working well without any problem.
> 
>       Note: ytrack.C & evdisp.C include several plots while start.C &
>              nextevent.C do not have them.
> 

In your aticdemos.C file, replace the statement:
   gROOT->Reset("a");
by
   gROOT->Reset();

We have removed the option "a" in TROOT::Reset in version 2.00/04.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:32 MET