33 GO4TRACE((14,
"TGo4TestRunnable::TGo4Runnable() constructor", __LINE__, __FILE__));
38 GO4TRACE((14,
"TGo4TestRunnable::TGo4TestRunnable() copy ctor", __LINE__, __FILE__));
45 (14,
"TGo4TestRunnable::TGo4TestRunnable(const char*,TGo4ThreadManager*,Int_t) constructor", __LINE__, __FILE__));
50 GO4TRACE((14,
"TGo4TestRunnable::~TGo4TestRunnable() destructor",__LINE__, __FILE__));
55 GO4TRACE((12,
"TGo4TestRunnable::Run()",__LINE__, __FILE__));
72 GO4TRACE((11,
"TGo4TestRunnable::Run() mode 0",__LINE__, __FILE__));
80 GO4TRACE((11,
"TGo4TestRunnable::Run() mode 1",__LINE__, __FILE__));
87 han->
Cancel(
"First Thread");
88 han->
Cancel(
"Second Thread");
89 han->
Cancel(
"Third Thread");
90 han->
Cancel(
"Fourth Thread");
92 TGo4Log::Debug(
"\t ''%s'' re-starting all other Threads", GetName());
93 han->
Create(
"First Thread");
94 han->
Create(
"Second Thread");
95 han->
Create(
"Third Thread");
96 han->
Create(
"Fourth Thread");
101 GO4TRACE((11,
"TGo4TestRunnable::Run() mode 2",__LINE__, __FILE__));
102 TGo4Log::Debug(
" ControlRunnable ''%s'' running, testcase %d -- ",
105 TGo4Log::Debug(
"\t ''%s'' stopping all other Workfunctions:", GetName());
107 han->
Stop(
"First Thread");
108 han->
Stop(
"Second Thread");
109 han->
Stop(
"Third Thread");
110 han->
Stop(
"Fourth Thread");
112 TGo4Log::Debug(
"\t ''%s'' re-starting all other Workfunctions:", GetName());
113 han->
Start(
"First Thread");
114 han->
Start(
"Second Thread");
115 han->
Start(
"Third Thread");
116 han->
Start(
"Fourth Thread");
122 GO4TRACE((11,
"TGo4TestRunnable::Run() mode 3",__LINE__, __FILE__));
123 TGo4Log::Debug(
" ControlRunnable ''%s'' running, testcase %d -- ",
134 GO4TRACE((11,
"TGo4TestRunnable::Run() mode 4",__LINE__, __FILE__));
135 TGo4Log::Debug(
" ControlRunnable ''%s'' running, testcase %d -- ",
141 fxHisto =
new TH1D(GetName(),
"histogram",2048,0,100);
149 x=gRandom->Gaus(50,7);
153 if(strstr(GetName(),
"Maker1"))
165 TThread::CancelPoint();
169 TThread::CancelPoint();
170 if(strstr(GetName(),
"Maker1"))
201 GO4TRACE((11,
"TGo4TestRunnable::Run() mode 5",__LINE__, __FILE__));
202 TGo4Log::Debug(
" ControlRunnable ''%s'' running, testcase %d -- ",
210 TString rname = TString::Format(
"NewHistogramMaker1:%d",loops++);
218 go4thr=
new TGo4Thread(
"First Thread",th1run,kFALSE);
246 GO4TRACE((11,
"TGo4TestRunnable::Run() mode 6",__LINE__, __FILE__));
247 TGo4Log::Debug(
" ControlRunnable ''%s'' running, testcase %d -- ",
272 GO4TRACE((11,
"TGo4TestRunnable::Run() mode 7",__LINE__, __FILE__));
273 TGo4Log::Debug(
" ControlRunnable ''%s'' running, testcase %d -- ",
278 fxHisto =
new TH1D(GetName(),
"histogram",2048,0,100);
286 x=gRandom->Gaus(50,7);
295 TGo4Log::Debug(
"\t ''%s'' histogram %d filled, waiting", GetName(),loops);
297 TGo4Log::Debug(
"\t ''%s'' deleting histogram %d", GetName(),loops++);
304 GO4TRACE((11,
"TGo4TestRunnable::Run() mode default",__LINE__, __FILE__));
305 TGo4Log::Debug(
" TestRunnable ''%s'' -- unspecified Workfunc action! ",
317 GO4TRACE((12,
"TGo4TestRunnable::ThreadCatch()",__LINE__, __FILE__));
331 GO4TRACE((12,
"TGo4TestRunnable::UnexpectedCatch()",__LINE__, __FILE__));
virtual void ThreadCatch(TGo4Exception &ex)
TGo4ThreadManager * fxManager
virtual ~TGo4TestRunnable()
TGo4Thread * GetThread() const
Bool_t UnBlockApp(Int_t mode=0)
static void Sleep(UInt_t millisecs)
virtual void UnexpectedCatch()
virtual Int_t Run(void *ptr)
virtual void UnexpectedCatch()
TGo4ThreadHandler * GetWorkHandler() const
Bool_t Create(const char *thname)
Bool_t Stop(const char *thname)
Bool_t Start(const char *thname)
Bool_t Cancel(const char *thname)
virtual void ThreadCatch(TGo4Exception &ex)
static void Debug(const char *text,...)