Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4Runnable Class Reference

Base class for all go4 runnables. More...

#include <TGo4Runnable.h>

Inheritance diagram for TGo4Runnable:

TGo4AnalysisMainRunnable TGo4AnalysisWatchRunnable TGo4ConnectorRunnable TGo4ControllerRunnable TGo4HisConnectorRunnable TGo4LocalCommandRunnable TGo4LoggingRunnable TGo4MainRunnable TGo4ObjConnectorRunnable TGo4TaskHandlerRunnable TGo4TestRunnable TGo4WatchRunnable List of all members.

Public Methods

 TGo4Runnable (const TGo4Runnable &right)
 TGo4Runnable (const char *name, TGo4ThreadManager *man)
virtual ~TGo4Runnable ()
TGo4Runnable & operator= (const TGo4Runnable &right)
void SetThread (TGo4Thread *gthread)
TGo4ThreadGetThread ()
TGo4ThreadManagerGetThreadManager ()

Protected Methods

virtual Int_t Run (void *ptr)=0
 The working function which runs in the thread. More...

virtual Int_t PreRun (void *ptr)
 Function which is called once before the Run() method on threadstart. More...

virtual Int_t PostRun (void *ptr)
 Function which is called once after the Run() method on threadstop. More...

virtual void ThreadCatch (TGo4Exception &ex)
 catch for exceptions occuring in workfunc. More...

virtual void UnexpectedCatch ()
 catch for all unexcpected exceptions happening in workfunc. More...


Protected Attributes

TGo4ThreadManagerfxManager
 The threadmanager which is responsible for our thread. More...

TGo4ThreadfxGo4Thread
 Backlink to thread which runs this. More...


Private Methods

 TGo4Runnable ()

Friends

class TGo4Thread

Detailed Description

Base class for all go4 runnables.

Virtual method Run() is working in the thread, this must be overridden by the user runnables.

Author:
J. Adamczewski , Go4 project-DVEE-GSI Darmstadt , Germany , j.adamczewski@gsi.de
Version:
0.9
Since:
jul 2000-oct 2001

Definition at line 35 of file TGo4Runnable.h.


Constructor & Destructor Documentation

TGo4Runnable::TGo4Runnable const TGo4Runnable &    right
 

Definition at line 21 of file TGo4Runnable.cxx.

References fxGo4Thread, fxManager, and TRACE.

TGo4Runnable::TGo4Runnable const char *    name,
TGo4ThreadManager   man
 

Definition at line 28 of file TGo4Runnable.cxx.

References fxManager, and TRACE.

TGo4Runnable::~TGo4Runnable   [virtual]
 

Definition at line 36 of file TGo4Runnable.cxx.

References TRACE.

TGo4Runnable::TGo4Runnable   [private]
 


Member Function Documentation

TGo4Runnable & TGo4Runnable::operator= const TGo4Runnable &    right
 

Definition at line 42 of file TGo4Runnable.cxx.

References fxGo4Thread, fxManager, and TRACE.

Referenced by TGo4TestRunnable::operator=().

void TGo4Runnable::SetThread TGo4Thread   gthread [inline]
 

Definition at line 47 of file TGo4Runnable.h.

References fxGo4Thread.

Referenced by TGo4Thread::TGo4Thread().

TGo4Thread* TGo4Runnable::GetThread   [inline]
 

Definition at line 52 of file TGo4Runnable.h.

References fxGo4Thread.

Referenced by TGo4TaskHandlerRunnable::CheckStopBuffer(), TGo4StartException::Handle(), TGo4RestartException::Handle(), TGo4ReplaceException::Handle(), TGo4RemoveException::Handle(), TGo4CreateException::Handle(), TGo4CancelException::Handle(), TGo4TaskHandlerAbortException::Handle(), TGo4StatusRunnable::Run(), TGo4LocalCommandRunnable::Run(), TGo4DataRunnable::Run(), TGo4CommandRunnable::Run(), and TGo4AnalysisMainRunnable::Run().

TGo4ThreadManager* TGo4Runnable::GetThreadManager   [inline]
 

Definition at line 57 of file TGo4Runnable.h.

References fxManager.

Referenced by TGo4TerminateException::TGo4TerminateException(), and TGo4ThreadException::TGo4ThreadException().

virtual Int_t TGo4Runnable::Run void *    ptr [protected, pure virtual]
 

The working function which runs in the thread.

Implemented in TGo4AnalysisMainRunnable, TGo4AnalysisWatchRunnable, TGo4HisConnectorRunnable, TGo4ObjConnectorRunnable, TGo4CommandRunnable, TGo4ConnectorRunnable, TGo4DataRunnable, TGo4LocalCommandRunnable, TGo4StatusRunnable, TGo4TaskHandlerRunnable, TGo4ControllerRunnable, TGo4LoggingRunnable, TGo4MainRunnable, TGo4WatchRunnable, and TGo4TestRunnable.

Referenced by TGo4Thread::Threadfunc().

Int_t TGo4Runnable::PreRun void *    ptr [protected, virtual]
 

Function which is called once before the Run() method on threadstart.

Reimplemented in TGo4AnalysisMainRunnable.

Definition at line 81 of file TGo4Runnable.cxx.

References TGo4Log::Debug(), and TRACE.

Referenced by TGo4Thread::Threadfunc().

Int_t TGo4Runnable::PostRun void *    ptr [protected, virtual]
 

Function which is called once after the Run() method on threadstop.

Reimplemented in TGo4AnalysisMainRunnable.

Definition at line 89 of file TGo4Runnable.cxx.

References TGo4Log::Debug(), and TRACE.

Referenced by TGo4Thread::Threadfunc().

void TGo4Runnable::ThreadCatch TGo4Exception   ex [protected, virtual]
 

catch for exceptions occuring in workfunc.

Reimplemented in TGo4TestRunnable.

Definition at line 61 of file TGo4Runnable.cxx.

References TGo4Log::Debug(), fxGo4Thread, TGo4Thread::GetPID(), TGo4Exception::Handle(), TRACE, and TGo4Exception::What().

Referenced by TGo4TestRunnable::ThreadCatch(), and TGo4Thread::Threadfunc().

void TGo4Runnable::UnexpectedCatch   [protected, virtual]
 

catch for all unexcpected exceptions happening in workfunc.

Reimplemented in TGo4TestRunnable.

Definition at line 70 of file TGo4Runnable.cxx.

References TGo4Log::Debug(), fxGo4Thread, fxManager, TGo4Thread::GetPID(), TGo4ThreadManager::Terminate(), and TRACE.

Referenced by TGo4TestRunnable::UnexpectedCatch().


Friends And Related Function Documentation

friend class TGo4Thread [friend]
 

Definition at line 36 of file TGo4Runnable.h.

Referenced by TGo4TestRunnable::Run().


Member Data Documentation

TGo4ThreadManager* TGo4Runnable::fxManager [protected]
 

The threadmanager which is responsible for our thread.

@supplierCardinality 1 @clientCardinality 0..*

Definition at line 95 of file TGo4Runnable.h.

Referenced by GetThreadManager(), operator=(), TGo4TestRunnable::Run(), TGo4StatusRunnable::Run(), TGo4DataRunnable::Run(), TGo4CommandRunnable::Run(), TGo4Runnable(), and UnexpectedCatch().

TGo4Thread* TGo4Runnable::fxGo4Thread [protected]
 

Backlink to thread which runs this.

@supplierCardinality 1 @clientCardinality 1

Definition at line 102 of file TGo4Runnable.h.

Referenced by GetThread(), operator=(), TGo4TestRunnable::Run(), TGo4ConnectorRunnable::Run(), TGo4ObjConnectorRunnable::Run(), SetThread(), TGo4Runnable(), ThreadCatch(), and UnexpectedCatch().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:52 2005 for Go4-v2.10-5 by doxygen1.2.15