GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4TestThreadManager Class Reference

Example of a user subclass of the threadmanager. More...

#include <TGo4TestThreadManager.h>

+ Inheritance diagram for TGo4TestThreadManager:

Public Member Functions

 TGo4TestThreadManager (const char *name)
 
virtual ~TGo4TestThreadManager ()
 
TCanvas * GetCanvas () const
 
TPad * GetPad1 () const
 
TPad * GetPad2 () const
 
virtual Int_t TestAction ()
 general testfunction which can be called from any thread runnable
 
- Public Member Functions inherited from TGo4ThreadManager
 TGo4ThreadManager (const char *name, Bool_t blockingmode=kTRUE, Bool_t autostart=kTRUE, Bool_t autocreate=kTRUE)
 Normal constructor.
 
 TGo4ThreadManager (const TGo4ThreadManager &right)
 
virtual ~TGo4ThreadManager ()
 
Bool_t BlockApp ()
 Blocks gSystem by means of the blocking timer.
 
TGo4ThreadHandlerGetWorkHandler () const
 Access to ThreadHandler for working threads.
 
virtual Int_t Initialization ()
 
Bool_t IsAppBlocking () const
 Returns true if threadmanager works in root system blocking mode.
 
Bool_t IsBeingQuit () const
 Returns true if threadmanager works in root system blocking mode.
 
Bool_t IsInitDone () const
 
Bool_t IsTerminateApp () const
 
Bool_t IsTerminating () const
 returns termination status of Threadmanager
 
void Launch ()
 This Method has to be called to create the startup threads and to turn on the application control timer.
 
void SetBeingQuit (Bool_t on)
 
void SetTimer (TGo4AppControlTimer *ctrltimer)
 user can exchange the standard control timer by an own derived one by this method
 
virtual void Terminate (Bool_t termap=kTRUE)
 deletes the Manager instance via Control timer.
 
virtual void TerminateFast ()
 Alternative termination in case of error.
 
Bool_t UnBlockApp (Int_t mode=0)
 Wakes up the control timer waiting for his condition; parameter mode specifies whether timer will block again at next turn (mode = 0), timer will block when all threads are up (mode = 1), or timer will not block again unless the next Block call, i.e.
 

Protected Attributes

TGo4TestRunnablefxControlRunnable {nullptr}
 
- Protected Attributes inherited from TGo4ThreadManager
Bool_t fbAppBlocking {kFALSE}
 true if threadmanager shall block root gSystem using the AppControlTimer; false if gSystem shall never be blocked (necessary for gui)
 
Bool_t fbAutoCreate {kFALSE}
 If true, TThreads of all go4threads in list shall be created automatically on calling Launch().
 
Bool_t fbAutoStart {kFALSE}
 If true, workfunctions (runnable Run()) of all go4threads in list shall be started automatically on Initialization.
 
Int_t fbBeingQuit {0}
 
Bool_t fbInitDone {kFALSE}
 is set kTRUE after first Initialize is done
 
Bool_t fbTerminateApplication {kFALSE}
 If true, terminate complete application.
 
Bool_t fbTerminating {kFALSE}
 flag showing termination status
 
TGo4AppControlTimerfxBlocker {nullptr}
 Composition of Application control timer.
 
TGo4ThreadHandlerfxWorkHandler {nullptr}
 Thread handler aggregate (threadsafe list of go4 threads) aggregationByValue 1 1.
 

Private Attributes

TCanvas * fxCanvas {nullptr}
 
TPad * fxPad1 {nullptr}
 
TPad * fxPad2 {nullptr}
 

Additional Inherited Members

- Public Types inherited from TGo4ThreadManager
enum  { fguTEXTLENGTH = 256 }
 Default textlength for char arrays. More...
 
- Static Public Attributes inherited from TGo4ThreadManager
static const Long_t fglTIMERPERIOD = 200
 Period in ms for the application control timer.
 

Detailed Description

Example of a user subclass of the threadmanager.

This test threadmanager creates the runnables in its constructor and adds them to the threadhandler. NOTE: The Launch() method must be called at the end of the user threadmanager constructor to let all things begin.

Author
J. Adamczewski(at)gsi.de
Go4 project-DVEE-GSI Darmstadt
Germany
Version
0.9
Since
jul 2000-oct 2001

Definition at line 34 of file TGo4TestThreadManager.h.

Constructor & Destructor Documentation

◆ TGo4TestThreadManager()

TGo4TestThreadManager::TGo4TestThreadManager ( const char * name)

◆ ~TGo4TestThreadManager()

TGo4TestThreadManager::~TGo4TestThreadManager ( )
virtual

Definition at line 55 of file TGo4TestThreadManager.cxx.

References fxCanvas, fxPad1, fxPad2, and GO4TRACE.

Member Function Documentation

◆ GetCanvas()

TCanvas * TGo4TestThreadManager::GetCanvas ( ) const
inline

Definition at line 48 of file TGo4TestThreadManager.h.

References fxCanvas.

◆ GetPad1()

TPad * TGo4TestThreadManager::GetPad1 ( ) const
inline

Definition at line 50 of file TGo4TestThreadManager.h.

References fxPad1.

◆ GetPad2()

TPad * TGo4TestThreadManager::GetPad2 ( ) const
inline

Definition at line 52 of file TGo4TestThreadManager.h.

References fxPad1.

◆ TestAction()

Int_t TGo4TestThreadManager::TestAction ( )
virtual

general testfunction which can be called from any thread runnable

Definition at line 63 of file TGo4TestThreadManager.cxx.

References GO4TRACE.

Field Documentation

◆ fxCanvas

TCanvas* TGo4TestThreadManager::fxCanvas {nullptr}
private

◆ fxControlRunnable

TGo4TestRunnable* TGo4TestThreadManager::fxControlRunnable {nullptr}
protected

Definition at line 58 of file TGo4TestThreadManager.h.

Referenced by TGo4TestThreadManager().

◆ fxPad1

TPad* TGo4TestThreadManager::fxPad1 {nullptr}
private

◆ fxPad2

TPad* TGo4TestThreadManager::fxPad2 {nullptr}
private

Definition at line 64 of file TGo4TestThreadManager.h.

Referenced by TGo4TestThreadManager(), and ~TGo4TestThreadManager().


The documentation for this class was generated from the following files: