| v2.10-0 (21000JUN2005) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Class that encapsulates a root TThread which calls a user runnable Method
(TGo4Runnable::Run()) in a loop. This working loop can be suspended to a
condition wait to stop the action.
Field Summary | |
private Bool_t | fbIsCreated kTRUE if TThread instance exists and pthread is created |
private Bool_t | fbIsInternal specifes whether thread is internal thread of handlerr (true) or is owned by external class (false). |
private Bool_t | fbIsRunning Flag that controls Workfunc loop within Threadfunc |
private Bool_t | fbIsWaiting true if Threadfunc is suspended to condition wait |
private Int_t | fiThreadPID linux process id associated with the pthread |
private Int_t | fiThreadSelfID self id of the current thread |
private TCondition* | fxCondition |
private TGo4Runnable* | fxRunnable External class providing the threaded workfunction and exception routines for workfunction. |
private TThread* | fxThread |
Fields inherited from class TNamed |
fName, fTitle |
Constructor Summary | |
| TGo4Thread(const TGo4Thread& right) |
| TGo4Thread(const char * name, TGo4Runnable* runnable, Bool_t internal) TGo4Thread constructor parameters: name: name of the thread runnable: external user runnable to be executed from TThread. internal: define if thread shall be owned by threadmanager, or if it belongs to other aggregation |
private | TGo4Thread() |
Destructor Summary | |
virtual synchronized | ~TGo4Thread() |
Method Summary | |
Bool_t | Cancel() Cancels TThread |
Bool_t | Create() creates the TThread if not yet existing |
private TCondition* | GetCondition() |
const Int_t | GetPID() linux process id associated with the pthread |
private TGo4Runnable* | GetRunnable() We need this to have access to instance runnable from static Threadfunc: |
const Int_t | GetSelfID() self id of the current thread |
const Bool_t | IsCreated() kTRUE if TThread instance exists and pthread is created |
const Bool_t | IsInternal() returns flag indicating if go4thread object is internal to threadhandler or created externally |
const Bool_t | IsRunning() Flag that controls Workfunc loop within Threadfunc |
Bool_t | IsWaiting() true if Threadfunc is suspended to condition wait |
synchronized TGo4Thread& | operator=(const TGo4Thread& right) |
Bool_t | ReCreate() Stops old Runnable; Creates new TThread of same Runnable and name; cancels old Thread |
private void | SetPID() |
private void | SetSelfID() |
private void | SetWaiting(Bool_t mode) |
static void | Sleep(UInt_t millisecs) wrapper for gSystem->Sleep with consecutive TThread::CancelPoint - necessary for proper pthread termination |
Bool_t | Start() starts runnable method Run within thread loop by setting running flag and signaling condition |
Bool_t | Stop() resets running flag for runnable |
private static void | Threadfunc(void * arg) This function is passed to TThread ctor and runs as pthread. |
Methods inherited from class TNamed |
operator=, Clear, Clone, Compare, Copy, FillBuffer, GetName, GetTitle, Hash, IsSortable, SetName, SetNameTitle, SetTitle, ls, Print, Sizeof, Class, Class_Name, Class_Version, Dictionary, IsA, ShowMembers, Streamer, StreamerNVirtual, DeclFileName, ImplFileLine, ImplFileName, DeclFileLine |
Field Detail |
private Bool_t fbIsCreated
private Bool_t fbIsInternal
private Bool_t fbIsRunning
private Bool_t fbIsWaiting
private Int_t fiThreadPID
private Int_t fiThreadSelfID
private TCondition* fxCondition
private TGo4Runnable* fxRunnable
private TThread* fxThread
Constructor Detail |
public TGo4Thread(const TGo4Thread& right)
public TGo4Thread(const char * name, TGo4Runnable* runnable, Bool_t internal)
private TGo4Thread()
Method Detail |
public virtual synchronized ~TGo4Thread()
Method Detail |
public Bool_t Cancel()
public Bool_t Create()
private TCondition* GetCondition()
public const Int_t GetPID()
private TGo4Runnable* GetRunnable()
public const Int_t GetSelfID()
public const Bool_t IsCreated()
public const Bool_t IsInternal()
public const Bool_t IsRunning()
public Bool_t IsWaiting()
public synchronized TGo4Thread& operator=(const TGo4Thread& right)
public Bool_t ReCreate()
private void SetPID()
private void SetSelfID()
private void SetWaiting(Bool_t mode)
public static void Sleep(UInt_t millisecs)
public Bool_t Start()
public Bool_t Stop()
private static void Threadfunc(void * arg)
Association Links |
to Class TThread
to Class TCondition
| J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |