TGo4Slave Class Reference

Baseclass for all slave process entities. More...

#include <TGo4Slave.h>

Inheritance diagram for TGo4Slave:

TGo4TaskOwner TGo4CommandReceiver

List of all members.

Public Member Functions

 TGo4Slave ()
 TGo4Slave (const char *name, Bool_t isserver=kTRUE, const char *serverhost="localhost", UInt_t negotport=5000)
virtual ~TGo4Slave ()
virtual void Start ()
 General start method of slave application to be called from remote command; should be re-implemented by application.
virtual void Stop ()
 General stop method of slave application to be called from remote command; should be re-implemented by application.
virtual void KillMain ()
 Kill the main thread; method to be called from command, should be overridden in user implementation.
virtual void RestartMain ()
 Restart the main thread; method to be called from command, should be overridden in user implementation.
virtual void Terminate (Bool_t termapp=kTRUE)
virtual void TerminateFast ()
virtual TGo4TaskStatusCreateStatus ()
 create a status object with information on the current (slave) task.
Bool_t MainIsRunning ()
TGo4CommandNextCommand ()
 Delivers next command from command queue.
void SendObject (TObject *obj, const char *receiver=0)
 Send object via data channel to the server.
void SendStatus (TGo4Status *stat, const char *receiver=0)
 Send status object via status channel to the server.
virtual Int_t Initialization ()
 Overrides the ThreadManager Initialization; is used to setup the client connections on demand; checks for fbConnectRequest flag.
TGo4ThreadHandlerGetThreadHandler ()
void SendStatusBuffer ()
 Send internal status buffer to the server.
void SendStatusMessage (Int_t level, Bool_t printout, const char *text,...)
 Send message string in a status object to the gui.
void UpdateStatusBuffer ()
 Create status object and stream it into the status send buffer.
virtual void ExecuteString (const char *command)
 Execute string command.

Protected Member Functions

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.

Private Attributes

Bool_t fbMainIsRunning
 True if analysis main loop is running.


Detailed Description

Baseclass for all slave process entities.

A Slave receives commands and may send data and status objects via the TGo4Task connection. This can run either as server or client task.

Definition at line 27 of file TGo4Slave.h.


Constructor & Destructor Documentation

TGo4Slave::TGo4Slave (  ) 

Definition at line 57 of file TGo4Slave.cxx.

TGo4Slave::TGo4Slave ( const char *  name,
Bool_t  isserver = kTRUE,
const char *  serverhost = "localhost",
UInt_t  negotport = 5000 
)

Definition at line 26 of file TGo4Slave.cxx.

TGo4Slave::~TGo4Slave (  )  [virtual]

Definition at line 62 of file TGo4Slave.cxx.


Member Function Documentation

void TGo4Slave::Start (  )  [virtual]

General start method of slave application to be called from remote command; should be re-implemented by application.

Definition at line 68 of file TGo4Slave.cxx.

void TGo4Slave::Stop (  )  [virtual]

General stop method of slave application to be called from remote command; should be re-implemented by application.

Definition at line 73 of file TGo4Slave.cxx.

void TGo4Slave::KillMain (  )  [virtual]

Kill the main thread; method to be called from command, should be overridden in user implementation.

Definition at line 79 of file TGo4Slave.cxx.

void TGo4Slave::RestartMain (  )  [virtual]

Restart the main thread; method to be called from command, should be overridden in user implementation.

Definition at line 84 of file TGo4Slave.cxx.

void TGo4Slave::Terminate ( Bool_t  termapp = kTRUE  )  [virtual]

Definition at line 89 of file TGo4Slave.cxx.

void TGo4Slave::TerminateFast (  )  [virtual]

Definition at line 95 of file TGo4Slave.cxx.

TGo4TaskStatus * TGo4Slave::CreateStatus (  )  [virtual]

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

Definition at line 101 of file TGo4Slave.cxx.

Bool_t TGo4Slave::MainIsRunning (  )  [inline]

Definition at line 73 of file TGo4Slave.h.

TGo4Command * TGo4Slave::NextCommand (  ) 

Delivers next command from command queue.

Definition at line 114 of file TGo4Slave.cxx.

void TGo4Slave::SendObject ( TObject *  obj,
const char *  receiver = 0 
)

Send object via data channel to the server.

Definition at line 124 of file TGo4Slave.cxx.

void TGo4Slave::SendStatus ( TGo4Status stat,
const char *  receiver = 0 
)

Send status object via status channel to the server.

Definition at line 130 of file TGo4Slave.cxx.

Int_t TGo4Slave::Initialization (  )  [virtual]

Overrides the ThreadManager Initialization; is used to setup the client connections on demand; checks for fbConnectRequest flag.

Definition at line 136 of file TGo4Slave.cxx.

TGo4ThreadHandler * TGo4Slave::GetThreadHandler (  ) 

Definition at line 142 of file TGo4Slave.cxx.

void TGo4Slave::SendStatusBuffer (  ) 

Send internal status buffer to the server.

Definition at line 151 of file TGo4Slave.cxx.

void TGo4Slave::SendStatusMessage ( Int_t  level,
Bool_t  printout,
const char *  text,
  ... 
)

Send message string in a status object to the gui.

Will be displayed in status window. Level indicates info, warning or error,

Definition at line 156 of file TGo4Slave.cxx.

void TGo4Slave::UpdateStatusBuffer (  ) 

Create status object and stream it into the status send buffer.

To be executed from the main thread; buffer will be send by status thread.

Definition at line 169 of file TGo4Slave.cxx.

void TGo4Slave::ExecuteString ( const char *  command  )  [virtual]

Execute string command.

Uses gInterpreter by default. May be overridden to evaluate go4 command strings in subclass.

Definition at line 174 of file TGo4Slave.cxx.

void TGo4Slave::UpdateStatus ( TGo4TaskStatus state  )  [protected, virtual]

method needed by method CreateStatus of any status subclasses to set the values of the clienttask specific part of the status object.

Definition at line 108 of file TGo4Slave.cxx.


Member Data Documentation

Bool_t TGo4Slave::fbMainIsRunning [private]

True if analysis main loop is running.

If false, the slave main thread will just wait on incoming commands without processing main loop.

Definition at line 132 of file TGo4Slave.h.


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

Generated on Thu Oct 28 12:31:33 2010 for Go4-Taskhandlerv4.04-2 by  doxygen 1.5.6