GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Base class for all go4 runnables. More...
#include <TGo4Runnable.h>
Public Member Functions | |
TGo4Runnable (const char *name, TGo4ThreadManager *man) | |
TGo4Runnable (const TGo4Runnable &right) | |
virtual | ~TGo4Runnable () |
TGo4Thread * | GetThread () const |
TGo4ThreadManager * | GetThreadManager () const |
void | SetThread (TGo4Thread *gthread) |
Protected Member Functions | |
TGo4Runnable () | |
virtual Int_t | PostRun (void *ptr) |
Function which is called once after the Run()method on threadstop. | |
virtual Int_t | PreRun (void *ptr) |
Function which is called once before the Run() method on threadstart. | |
virtual Int_t | Run (void *ptr)=0 |
The working function which runs in the thread. | |
virtual void | ThreadCatch (TGo4Exception &ex) |
catch for exceptions occurring in workfunc | |
virtual void | UnexpectedCatch () |
catch for all unexpected exceptions happening in workfunc | |
Protected Attributes | |
TGo4Thread * | fxGo4Thread {nullptr} |
Backlink to thread which runs this. | |
TGo4ThreadManager * | fxManager {nullptr} |
The threadmanager which is responsible for our thread. | |
Friends | |
class | TGo4Thread |
Base class for all go4 runnables.
Virtual method Run() is working in the thread, this must be overridden by the user runnables.
Definition at line 34 of file TGo4Runnable.h.
TGo4Runnable::TGo4Runnable | ( | const TGo4Runnable & | right | ) |
Definition at line 24 of file TGo4Runnable.cxx.
References TGo4Runnable(), fxGo4Thread, fxManager, and GO4TRACE.
Referenced by TGo4AnalysisMainRunnable::TGo4AnalysisMainRunnable(), TGo4AnalysisWatchRunnable::TGo4AnalysisWatchRunnable(), TGo4ConnectorRunnable::TGo4ConnectorRunnable(), TGo4ControllerRunnable::TGo4ControllerRunnable(), TGo4HisConnectorRunnable::TGo4HisConnectorRunnable(), TGo4HisConnectorRunnable::TGo4HisConnectorRunnable(), TGo4LocalCommandRunnable::TGo4LocalCommandRunnable(), TGo4LocalCommandRunnable::TGo4LocalCommandRunnable(), TGo4LoggingRunnable::TGo4LoggingRunnable(), TGo4MainRunnable::TGo4MainRunnable(), TGo4ObjConnectorRunnable::TGo4ObjConnectorRunnable(), TGo4ObjConnectorRunnable::TGo4ObjConnectorRunnable(), TGo4Runnable(), TGo4TaskHandlerRunnable::TGo4TaskHandlerRunnable(), TGo4TestRunnable::TGo4TestRunnable(), TGo4TestRunnable::TGo4TestRunnable(), TGo4TestRunnable::TGo4TestRunnable(), TGo4WatchRunnable::TGo4WatchRunnable(), and TGo4Thread.
TGo4Runnable::TGo4Runnable | ( | const char * | name, |
TGo4ThreadManager * | man ) |
Definition at line 32 of file TGo4Runnable.cxx.
|
virtual |
Definition at line 39 of file TGo4Runnable.cxx.
References GO4TRACE.
|
inlineprotected |
Definition at line 52 of file TGo4Runnable.h.
|
inline |
Definition at line 46 of file TGo4Runnable.h.
References fxGo4Thread, and TGo4Thread.
Referenced by TGo4TaskHandlerRunnable::CheckStopBuffer(), TGo4AnalysisMainRunnable::Run(), TGo4CommandRunnable::Run(), TGo4DataRunnable::Run(), TGo4LocalCommandRunnable::Run(), and TGo4StatusRunnable::Run().
|
inline |
Definition at line 48 of file TGo4Runnable.h.
References fxManager.
Referenced by TGo4TerminateException::TGo4TerminateException().
|
protectedvirtual |
Function which is called once after the Run()method on threadstop.
Reimplemented in TGo4AnalysisMainRunnable.
Definition at line 72 of file TGo4Runnable.cxx.
References TGo4Log::Debug(), and GO4TRACE.
Referenced by TGo4Thread::Threadfunc().
|
protectedvirtual |
Function which is called once before the Run() method on threadstart.
Reimplemented in TGo4AnalysisMainRunnable.
Definition at line 64 of file TGo4Runnable.cxx.
References TGo4Log::Debug(), and GO4TRACE.
Referenced by TGo4Thread::Threadfunc().
|
protectedpure virtual |
The working function which runs in the thread.
Implemented in TGo4AnalysisMainRunnable, TGo4AnalysisWatchRunnable, TGo4CommandRunnable, TGo4ConnectorRunnable, TGo4ControllerRunnable, TGo4DataRunnable, TGo4HisConnectorRunnable, TGo4LocalCommandRunnable, TGo4LoggingRunnable, TGo4MainRunnable, TGo4ObjConnectorRunnable, TGo4StatusRunnable, TGo4TaskHandlerRunnable, TGo4TestRunnable, and TGo4WatchRunnable.
Referenced by TGo4Thread::Threadfunc().
|
inline |
Definition at line 44 of file TGo4Runnable.h.
References fxGo4Thread, and TGo4Thread.
|
protectedvirtual |
catch for exceptions occurring in workfunc
Reimplemented in TGo4TestRunnable.
Definition at line 44 of file TGo4Runnable.cxx.
References TGo4Log::Debug(), fxGo4Thread, GO4TRACE, TGo4Exception::Handle(), and TGo4Exception::What().
Referenced by TGo4TestRunnable::ThreadCatch(), and TGo4Thread::Threadfunc().
|
protectedvirtual |
catch for all unexpected exceptions happening in workfunc
Reimplemented in TGo4TestRunnable.
Definition at line 53 of file TGo4Runnable.cxx.
References TGo4Log::Debug(), fxGo4Thread, fxManager, and GO4TRACE.
Referenced by TGo4TestRunnable::UnexpectedCatch().
|
friend |
Definition at line 35 of file TGo4Runnable.h.
References TGo4Runnable(), and TGo4Thread.
Referenced by GetThread(), TGo4TestRunnable::Run(), SetThread(), and TGo4Thread.
|
protected |
Backlink to thread which runs this.
1 1
Definition at line 77 of file TGo4Runnable.h.
Referenced by TGo4Runnable(), GetThread(), TGo4ConnectorRunnable::Run(), TGo4ObjConnectorRunnable::Run(), TGo4TestRunnable::Run(), SetThread(), ThreadCatch(), and UnexpectedCatch().
|
protected |
The threadmanager which is responsible for our thread.
1 0..*
Definition at line 72 of file TGo4Runnable.h.
Referenced by TGo4Runnable(), TGo4Runnable(), GetThreadManager(), TGo4CommandRunnable::Run(), TGo4DataRunnable::Run(), TGo4MainRunnable::Run(), TGo4StatusRunnable::Run(), TGo4TestRunnable::Run(), TGo4WatchRunnable::Run(), and UnexpectedCatch().