On Fri, 27 Mar 1998, Fons Rademakers wrote: Dear Fons, actually I found another way to do that. If there is no input, a call to gSystem->InnerLoop(); would wait for an input. Is this correct? So, I created async MyTimer from TTimer and implemented Bool_t MyTimer::Notify() { if(gClient->HandleInput()) Reset(); // Should I use gClient->Notify()? return kFALSE; } Then, I do MyTimer* mytimer = new MyTimer(100); gSystem->AddTimer(mytimer); // Loop gSystem->RemoveTimer(mytimer); delete mytimer; This handles Gui events correctly. 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.
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:31 MET