16#include "TCondition.h"
17#include "TApplication.h"
30 :TTimer(msperiod,mode),
34 GO4TRACE((15,
"TGo4AppControlTimer::TGo4AppControlTimer(TGo4ThreadManager *, Long_t, Bool_t) ctor",__LINE__, __FILE__));
41 GO4TRACE((15,
"TGo4AppControlTimer::~TGo4AppControlTimer() dtor",__LINE__, __FILE__));
53 TGo4Log::Error(
"TGo4AppControlTimer::Notify() NEVER COME HERE!!!");
54 TGo4Log::Error(
"TGo4AppControlTimer::Notify() with zero threadmanager!!!");
61 GO4TRACE((11,
"TGo4AppControlTimer: Successful Initialization",__LINE__, __FILE__));
65 GO4TRACE((11,
"TGo4AppControlTimer: Application shall be blocked!",__LINE__, __FILE__));
70 GO4TRACE((10,
"TGo4AppControlTimer: blocking ROOT gSystem!",__LINE__, __FILE__));
71 TGo4Log::Debug(
" Application Control Timer -- Blocking ROOT gSystem!! ");
73 TGo4Log::Debug(
" Application Control Timer -- Releasing ROOT gSystem!! ");
78 GO4TRACE((10,
"TGo4AppControlTimer: no TThread existing, not blocking !",__LINE__, __FILE__));
84 GO4TRACE((11,
"TGo4AppControlTimer: Application shall not be blocked!",__LINE__, __FILE__));
90 GO4TRACE((11,
"TGo4AppControlTimer: Terminating mode",__LINE__, __FILE__));
93 TGo4Log::Debug(
" Application Control Timer -- waiting for Runnables to stop... ");
97 TGo4Log::Debug(
" Application Control Timer -- deleting TGo4ThreadManager! ");
98 Bool_t pleaseterminate=
fxManager->IsTerminateApp();
104 TGo4Log::Debug(
" Application Control Timer -- Terminating Application now! Goodbye...");
105 gApplication->Terminate(0);
109 TGo4Log::Debug(
" Application Control Timer -- Finished Threadmanager deletion, killing myself now...");
117 GO4TRACE((11,
"TGo4AppControlTimer: Resetting for new cycle",__LINE__, __FILE__));
125 GO4TRACE((11,
"TGo4AppControlTimer: Initialization failed",__LINE__, __FILE__));
126 TGo4Log::Debug(
" Application Control Timer -- ThreadManager Init not successful, retrying! ");
Bool_t Notify() override
Routine called from TTimer on timeout.
TGo4ThreadManager * fxManager
Backlink to threadmanager who owns this timer.
static UInt_t fguTERMWAIT
time in ms to wait for all Runnables being stopped before Termination; after this time,...
TGo4AppControlTimer()=delete
virtual ~TGo4AppControlTimer()
static Int_t fgiTERMWAITCYCLES
On Termination, Notify will test fgiTERMWAITCYCLES times if Runnables are stopped,...
static void Debug(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 0.
static void Error(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 3.