Re: [ROOT] Some kind of a switch function...

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Jul 11 2003 - 15:22:12 MEST


Hi Zaldy,

You can call gSystem->ProcessEvents() in your event loop.
See example in $ROOTSYS/test/RootShower.cxx in function produce.

By doing so, the GUI will get the control every time ProcessEvents is
executed in case there are GUI events in the queue.

You can call ProcessEvents conditionally (say every 100 events) if you
want to pass the control only at some regular interval.

You can also control this interval by using a Timer. see, eg

TTreePlayer::Process.

Rene Brun

zaldy wrote:
> 
> Dear ROOTers,
> 
> I dont know exactly the name, but
> Is there some kind of a switch function in root to interrupt the event
> loop? For instance I enjoyed watching root application during an event
> loop, but at some point, I wanted to examine the graphical primitives of a
> single event, and I want to stop or interrupt the loop; Or maybe move
> backward, and save the plots into a ps or gif file, too.
> 
> I noticed two functions: GetEntry() and Show() from the TTree Class. But
> they are "well-finished". I mean  I cannot manipulate the data output
> easily.
> 
> I wish there is one from the tutorial stuff.
> But maybe I just dont know exactly the name of the file.
> 
> Thank you....
> 
> --------------------------------------------------------
>                    Zaldy A. Nawang
>                    PS Users Room 2
>                    Yon Gokan,
>                    E362, Neutrino Group,
>                    IPNS, KEK,
>                    Japan
> 
>                    e-mail: zaldy@neutrino.kek.jp
>                    Tel. No. : (81) 029864 - 5387
> --------------------------------------------------------



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET