16 #include "TApplication.h"
18 #include "TCondition.h"
29 fbTerminating(kFALSE),
30 fbTerminateApplication(kFALSE)
32 GO4TRACE((15,
"TGo4ThreadManager::TGo4ThreadManager copy ctor",__LINE__, __FILE__));
38 :TNamed(name,
"This is a TGo4ThreadManager"),
40 fbTerminating(kFALSE),
41 fbTerminateApplication(kFALSE),
44 GO4TRACE((15,
"TGo4ThreadManager::TGo4ThreadManager (const char*, Bool_t, Bool_t, Bool_t) constructor",__LINE__, __FILE__));
46 TString myname=GetName();
48 myname+=gSystem->HostName();
50 myname+=gSystem->GetPid();
51 SetName(myname.Data());
52 TString nomen(
"ThreadHandler of "); nomen+=GetName();
61 TGo4Log::Debug(
" ThreadManager -- Starting in application blocking mode ");
62 fxBlocker->SetApplicationRun(kFALSE);
67 TGo4Log::Debug(
" ThreadManager -- Starting in application non-blocking mode ");
68 fxBlocker->SetApplicationRun(kTRUE);
75 GO4TRACE((15,
"TGo4ThreadManager::~TGo4ThreadManager destructor",__LINE__, __FILE__));
83 GO4TRACE((12,
"TGo4ThreadManager::BlockApp()",__LINE__, __FILE__));
89 GO4TRACE((11,
"TGo4ThreadManager::BlockApp() blocking mode",__LINE__, __FILE__));
97 GO4TRACE((11,
"TGo4ThreadManager::BlockApp() unblocking mode",__LINE__, __FILE__));
111 GO4TRACE((12,
"TGo4ThreadManager::UnBlockApp()",__LINE__, __FILE__));
117 GO4TRACE((11,
"TGo4ThreadManager::UnBlockApp() mode 0",__LINE__, __FILE__));
130 GO4TRACE((11,
"TGo4ThreadManager::UnBlockApp() mode 1",__LINE__, __FILE__));
137 GO4TRACE((11,
"TGo4ThreadManager::UnBlockApp() mode 2",__LINE__, __FILE__));
148 GO4TRACE((16,
"++TGo4ThreadManager::UnBlockApp() unknown mode"));
159 GO4TRACE((12,
"TGo4ThreadManager::Initialization()",__LINE__, __FILE__));
163 GO4TRACE((11,
"TGo4ThreadManager::Initialization()--already init done, returning",__LINE__, __FILE__));
173 GO4TRACE((11,
"TGo4ThreadManager::Initialization()--in AutoCreate mode",__LINE__, __FILE__));
177 TGo4Log::Debug(
" ThreadManager -- All threads are up, writing dump file ");
183 GO4TRACE((11,
"TGo4ThreadManager::Initialization()--in AutoStart mode",__LINE__, __FILE__));
188 GO4TRACE((11,
"TGo4ThreadManager::Initialization()--in non-AutoStart mode",__LINE__, __FILE__));
199 TGo4Log::Debug(
" ThreadManager -- some threads are missing, re-doing Init ");
208 GO4TRACE((11,
"TGo4ThreadManager::Initialization()--not in AutoCreate mode",__LINE__, __FILE__));
217 GO4TRACE((15,
"TGo4ThreadManager::Launch()",__LINE__, __FILE__));
221 GO4TRACE((13,
"TGo4ThreadManager::Launch()-- executing AutoCreate mode",__LINE__, __FILE__));
227 GO4TRACE((13,
"TGo4ThreadManager::Launch()-- no AutoCreate mode",__LINE__, __FILE__));
234 GO4TRACE((15,
"TGo4ThreadManager::Terminate()",__LINE__, __FILE__));
241 GO4TRACE((13,
"TGo4ThreadManager::Terminate()--waking up timer:",__LINE__, __FILE__));
virtual Int_t Initialization()
virtual void TerminateFast()
Bool_t IsOperating() const
TGo4ThreadHandler * fxWorkHandler
TGo4AppControlTimer * fxBlocker
Bool_t UnBlockApp(Int_t mode=0)
Bool_t fbTerminateApplication
Int_t DumpThreads(Int_t mode=0)
Bool_t GetApplicationRun()
const TCondition * GetCondition() const
void SetApplicationRun(Bool_t flag=kTRUE)
virtual ~TGo4ThreadManager()
virtual void Terminate(Bool_t termapp=kTRUE)
static void Debug(const char *text,...)
static const Long_t fglTIMERPERIOD