I have injected some root into a standalone c++ program for plotting. In trying to use a TTimer to keep canvas objects interactive, the TTimer Notify return value is printed to screen on each timeout. Is there a simple way to silence this?
Cheers,
Josh
I suspect you can derive your own class from TTimer and specify the correct behavior. Something like:
class TTimerDerived: public TTimer {
public:
virtual void Timeout() override { Emit("Timeout();"); } //*SIGNAL*
};
The only difference is to add a ; after the Timeout() signal.
Note that I have not tried how it’d work because I have not got your minimal reproducer.
If you provide a minimal reproducer I could be more helpful.
Hey vvassilev,
Thanks for the comment. It allowed me to discover that the the print was originating from a missed semicolon, not the Notify function. I had
_rootApp = new TApplication("testApp",0,0);
_updateTimer = new TTimer("gSystem->ProcessEvents()", 50,0);
_updateTimer->TurnOn();
_updateTimer->Start();
instead of
_rootApp = new TApplication("testApp",0,0);
_updateTimer = new TTimer("gSystem->ProcessEvents();", 50,0);
_updateTimer->TurnOn();
_updateTimer->Start();
Thanks so much.
With regard to minimally reproducible examples. How can we supply such a thing when the code is being built externally to root? Should we include a full makefile etc?
Cheers