Re: TApplication & process control

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Fri Mar 27 1998 - 13:04:35 MET


Hi Andrej,

   you should call once in while in your DAQ loop the function:

gSystem->InnerLoop();

this will flush pending graphics, socket and synchronous timer
events. When pending events have been processed it will return, when
no events are pending it will wait for an event to happen. To
prevent this from blocking your app use a timeouttimer like is done
in the TMonitor class (http://root.cern.ch/root/html/src/TMonitor.cxx.html).
See TMonitor::Select(Long_t timeout). I might provide a 
TSystem::InnerLoop(Long_t timeout), but for the time being add the time-out
like in the Select method.

Cheers, Fons.


Andrej Filipcic wrote:
> 
> I have a DAQ program in which I would like to have buttons to do actions
> like start or stop run (etc..). If I start the run, the main button bar
> (using new TG classes) is not sensitive any more unless I try to call
> gApplication->Run() with 0 idle time inside the DAQ loop. But this does
> not work properly. In fact, I am looking for an equivalent of tcl's update
> call.
> 
> Thanks, Andrej
>  _____________________________________________________________
>    Andrej Filipcic,          E-mail: Andrej.Filipcic@ijs.si
>    Department of Experimental High Energy Physics - F9
>    Jozef Stefan Institute, Jamova 39, P.o.Box 3000
>    SI-1001 Ljubljana, Slovenia
>    Tel.: +386-61-177-3674    Fax: +386-61-125-7074
> -------------------------------------------------------------

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910



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