Re: ControlBar

Rene Brun (Rene.Brun@cern.ch)
Thu, 16 Apr 1998 09:09:33 +0200


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