| v2.10-0 (21000JUN2005) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Field Summary | |
private Bool_t | fbCommandMaster This flag indicates the main state of the task: either master (sends commands, receives data and status), or slave (receives commands and may send date and status) |
private Bool_t | fbWorkIsStopped True if user work threads are stopped for connection change |
const static const Int_t | fgiTERMID Id number of dummy command that wakes the command queue on termination |
private TString | fxCommanderName remember name of localcommand thread |
private TGo4TaskHandlerCommandList* | fxCommandPrototype the command list which holds all command prototypes |
private TGo4ObjectQueue* | fxLocalCommandQueue queue for the server side local commands, submitted by the gui or cli |
private TGo4Master* | fxMaster |
private TGo4TaskOwner* | fxOwner |
private TBuffer* | fxQuitBuffer this buffer is used for quit command |
private TGo4Slave* | fxSlave |
protected TBuffer* | fxStatusBuffer Buffer containing the analysis status which is updated by the main thread |
protected TMutex* | fxStatusMutex Mutex protecting status buffer between main and watch thread. |
private TBuffer* | fxStopBuffer this buffer is used for stop message for threads |
Fields inherited from class Go4ThreadManager.TGo4ThreadManager |
fbAppBlocking, fbAutoCreate, fbAutoStart, fbInitDone, fbTerminateApplication, fbTerminating, fglTIMERPERIOD, fguTEXTLENGTH, fxBlocker, fxWorkHandler |
Fields inherited from class TNamed |
fName, fTitle |
Constructor Summary | |
TGo4Task(const char * name, Bool_t blockingmode, Bool_t autostart, Bool_t autocreate, Bool_t ismaster) |
Destructor Summary | |
virtual synchronized | ~TGo4Task() |
Method Summary | |
void | AddUserCommand(TGo4Command* com) Add a user command object to the existing command list. |
void | AddUserCommandList(TGo4CommandProtoList* comlist) Add a user command list to the existing command list. |
protected virtual TGo4TaskHandlerCommandList* | CreateCommandList() factory method for command list; overridden by implementation |
virtual TGo4TaskStatus* | CreateStatus() create a status object with information on the current (slave) task. this object may be sent to the master or may be used to restore current status by memento mechanism |
virtual void | ExecuteString(const Text_t* command) Execute string command. |
const const char * | GetCommanderName() |
virtual TGo4BufferQueue* | GetCommandQueue(const char * task) |
virtual TGo4BufferQueue* | GetDataQueue(const char * task) |
protected TGo4ObjectQueue* | GetLocalCommandQueue() |
TGo4Master* | GetMaster() |
protected TGo4TaskHandlerCommandList* | GetPrototype() get pointer to currently valid command list |
TGo4Slave* | GetSlave() |
virtual void | GetStatus() Send current status information of the task to the master; may be re-implemented by application subclass of TGo4Task |
virtual TGo4BufferQueue* | GetStatusQueue(const char * task) |
virtual TGo4TaskHandler* | GetTaskHandler() |
virtual Int_t | Initialization() Overrides the ThreadManager Initialization; is used to setup the client connections on demand; checks for fbConnectRequest flag |
Bool_t | IsMaster() |
Bool_t | IsWorkStopped() |
virtual void | KillMain() Kill the main thread; method to be called from command, should be overridden in user implementation |
TGo4Command* | MakeCommand(const char * name) Method using internal command prototype list to produce a clone of the specified command |
virtual TGo4Command* | NextCommand() Delivers next command from command queue. |
TObject* | NextObject(Bool_t wait) Delivers next object from data queue. |
TGo4Status* | NextStatus(Bool_t wait) Delivers next status object from status queue. |
virtual void | Quit() Quit the client; method to be called from command object, may be overridden in user implementation |
virtual void | RestartMain() Restart the main thread; method to be called from command, should be overridden in user implementation |
void | SendObject(TObject* obj, const char * receiver) Send object via data channel to the master. |
virtual void | SendStatus(TGo4Status* stat, const char * receiver) Send status object via status channel to the master. |
virtual void | SendStatusBuffer() Send internal status buffer to the master(s). |
void | SendStatusMessage(Int_t level, Bool_t printout, const char * text, ... ) Send message string in a status object to the gui. |
void | SendStopBuffers(const char * taskname) Send message buffers with stop values into queues and via socket connections. |
protected void | SetMaster(Bool_t on) |
private void | SetMaster(TGo4Master* m) |
void | SetOwner(TGo4TaskOwner* owner) Set owner object and switch automatically in master or slave mode, depending on owner type |
private void | SetSlave(TGo4Slave* s) |
protected void | SetWorkIsStopped(Bool_t on) |
virtual void | Start() General start method of client application to be called from remote command; should be re-implemented by application |
virtual Int_t | StartWorkThreads() start the working threads of the task implementation; this method is used after the current connection has changed, to continue reading/writing the queues. |
virtual void | Stop() General stop method of client application to be called from remote command; should be re-implemented by application |
virtual Int_t | StopWorkThreads() stop the working threads of the task implementation; this method is used before the current connection is changed to prevent reading/writing and waiting for the wrong queues. |
Bool_t | SubmitCommand(const char * name) send command specified by name to the current client task |
Bool_t | SubmitCommand(TGo4Command* com) send given command to the current client task. |
Bool_t | SubmitEmergencyCommand(Go4EmergencyCommand_t val) send emergency quit command to the current client task |
Bool_t | SubmitEmergencyData(Go4EmergencyCommand_t val, const char * receiver) Send emergency command via data channel. |
Bool_t | SubmitLocalCommand(TGo4Command* com) send given command to the current client task. |
virtual void | Terminate(Bool_t termapp) |
virtual void | TerminateFast() Overwrites the Threadmanager TerminateFast to shutdown the objectserver properly |
protected virtual void | UpdateStatus(TGo4TaskStatus* state) method needed by method CreateStatus of any status subclasses to set the values of the clienttask specific part of the status object. |
void | UpdateStatusBuffer() Create status object and stream it into the status send buffer. |
void | WakeCommandQueue(Int_t id) Put dummy object into command queue to wake up user threads which might wait for a command. |
Methods inherited from class Go4ThreadManager.TGo4ThreadManager |
BlockApp, GetWorkHandler, IsAppBlocking, IsInitDone, IsTerminateApp, IsTerminating, Launch, operator=, SetTimer, UnBlockApp |
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 fbCommandMaster
private Bool_t fbWorkIsStopped
public const static const Int_t fgiTERMID
private TString fxCommanderName
private TGo4TaskHandlerCommandList* fxCommandPrototype
private TGo4ObjectQueue* fxLocalCommandQueue
private TGo4Master* fxMaster
private TGo4TaskOwner* fxOwner
private TBuffer* fxQuitBuffer
private TGo4Slave* fxSlave
protected TBuffer* fxStatusBuffer
protected TMutex* fxStatusMutex
private TBuffer* fxStopBuffer
Constructor Detail |
public TGo4Task(const char * name, Bool_t blockingmode, Bool_t autostart, Bool_t autocreate, Bool_t ismaster)
Method Detail |
public virtual synchronized ~TGo4Task()
Method Detail |
public void AddUserCommand(TGo4Command* com)
public void AddUserCommandList(TGo4CommandProtoList* comlist)
protected virtual TGo4TaskHandlerCommandList* CreateCommandList()
public virtual TGo4TaskStatus* CreateStatus()
public virtual void ExecuteString(const Text_t* command)
public const const char * GetCommanderName()
public virtual TGo4BufferQueue* GetCommandQueue(const char * task)
public virtual TGo4BufferQueue* GetDataQueue(const char * task)
protected TGo4ObjectQueue* GetLocalCommandQueue()
public TGo4Master* GetMaster()
protected TGo4TaskHandlerCommandList* GetPrototype()
public TGo4Slave* GetSlave()
public virtual void GetStatus()
public virtual TGo4BufferQueue* GetStatusQueue(const char * task)
public virtual TGo4TaskHandler* GetTaskHandler()
public virtual Int_t Initialization()
public Bool_t IsMaster()
public Bool_t IsWorkStopped()
public virtual void KillMain()
public TGo4Command* MakeCommand(const char * name)
public virtual TGo4Command* NextCommand()
public TObject* NextObject(Bool_t wait)
public TGo4Status* NextStatus(Bool_t wait)
public virtual void Quit()
public virtual void RestartMain()
public void SendObject(TObject* obj, const char * receiver)
public virtual void SendStatus(TGo4Status* stat, const char * receiver)
public virtual void SendStatusBuffer()
public void SendStatusMessage(Int_t level, Bool_t printout, const char * text, ... )
public void SendStopBuffers(const char * taskname)
protected void SetMaster(Bool_t on)
private void SetMaster(TGo4Master* m)
public void SetOwner(TGo4TaskOwner* owner)
private void SetSlave(TGo4Slave* s)
protected void SetWorkIsStopped(Bool_t on)
public virtual void Start()
public virtual Int_t StartWorkThreads()
public virtual void Stop()
public virtual Int_t StopWorkThreads()
public Bool_t SubmitCommand(const char * name)
public Bool_t SubmitCommand(TGo4Command* com)
public Bool_t SubmitEmergencyCommand(Go4EmergencyCommand_t val)
public Bool_t SubmitEmergencyData(Go4EmergencyCommand_t val, const char * receiver)
public Bool_t SubmitLocalCommand(TGo4Command* com)
public virtual void Terminate(Bool_t termapp)
public virtual void TerminateFast()
protected virtual void UpdateStatus(TGo4TaskStatus* state)
public void UpdateStatusBuffer()
public void WakeCommandQueue(Int_t id)
Association Links |
to Class TBuffer
to Class TGo4TaskHandlerCommandList
to Class TGo4ObjectQueue
to Class TGo4Master
to Class TGo4Slave
to Class TGo4TaskOwner
to Class TBuffer
to Class TBuffer
| 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 |