#include <TGo4Slave.h>
Inheritance diagram for TGo4Slave:
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 TGo4TaskStatus * | CreateStatus () |
create a status object with information on the current (slave) task. | |
Bool_t & | MainIsRunning () |
TGo4Command * | NextCommand () |
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. | |
TGo4ThreadHandler * | GetThreadHandler () |
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 Text_t *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. |
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 29 of file TGo4Slave.h.
|
Definition at line 59 of file TGo4Slave.cxx. |
|
Definition at line 28 of file TGo4Slave.cxx. References TGo4CommandInvoker::Instance(), TGo4TaskOwner::IsServer(), TGo4CommandInvoker::Register(), TGo4CommandInvoker::SetCommandList(), TGo4TaskOwner::SetTask(), and TGo4TaskOwner::TGo4ServerTask. |
|
Definition at line 64 of file TGo4Slave.cxx. References TGo4CommandInvoker::UnRegister(). |
|
General start method of slave application to be called from remote command; should be re-implemented by application.
Reimplemented in TGo4AnalysisClient. Definition at line 70 of file TGo4Slave.cxx. References TGo4Log::Debug(), fbMainIsRunning, and TGo4TaskOwner::GetName(). Referenced by TGo4Task::Start(), and TGo4AnalysisClient::Start(). |
|
General stop method of slave application to be called from remote command; should be re-implemented by application.
Reimplemented in TGo4AnalysisClient. Definition at line 75 of file TGo4Slave.cxx. References TGo4Log::Debug(), fbMainIsRunning, and TGo4TaskOwner::GetName(). Referenced by TGo4AnalysisClient::Constructor(), TGo4AnalysisClient::Initialization(), TGo4ServerTask::Shutdown(), TGo4Task::Stop(), and TGo4AnalysisClient::Stop(). |
|
Kill the main thread; method to be called from command, should be overridden in user implementation.
Reimplemented in TGo4AnalysisClient. Definition at line 81 of file TGo4Slave.cxx. Referenced by TGo4Task::KillMain(). |
|
Restart the main thread; method to be called from command, should be overridden in user implementation.
Reimplemented in TGo4AnalysisClient. Definition at line 86 of file TGo4Slave.cxx. Referenced by TGo4Task::RestartMain(). |
|
Reimplemented in TGo4AnalysisClient. Definition at line 91 of file TGo4Slave.cxx. References TGo4TaskOwner::GetTask(). Referenced by TGo4ServerTask::Shutdown(), TGo4Task::Terminate(), and TerminateFast(). |
|
Reimplemented in TGo4AnalysisClient. Definition at line 97 of file TGo4Slave.cxx. References Terminate(). Referenced by TGo4TaskHandlerAbortException::Handle(), and TGo4Task::TerminateFast(). |
|
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 Reimplemented in TGo4AnalysisClient. Definition at line 103 of file TGo4Slave.cxx. References TGo4TaskOwner::GetName(), and UpdateStatus(). Referenced by TGo4Task::UpdateStatusBuffer(). |
|
Definition at line 75 of file TGo4Slave.h. References fbMainIsRunning. Referenced by TGo4ComSetAnalysisStatus::ExeCom(), TGo4ComInitAnalysis::ExeCom(), TGo4Analysis::IsRunning(), TGo4Task::NextCommand(), TGo4AnalysisMainRunnable::PostRun(), TGo4AnalysisWatchRunnable::Run(), TGo4AnalysisMainRunnable::Run(), TGo4AnalysisClient::Start(), and TGo4AnalysisClient::Stop(). |
|
Delivers next command from command queue.
Definition at line 116 of file TGo4Slave.cxx. References TGo4TaskOwner::GetTask(). Referenced by TGo4AnalysisMainRunnable::Run(). |
|
Send object via data channel to the server.
Definition at line 126 of file TGo4Slave.cxx. References TGo4TaskOwner::GetTask(). Referenced by TGo4ComGetObjectStatus::ExeCom(), TGo4ComGetNamesList::ExeCom(), TGo4ComGetEnvelope::ExeCom(), TGo4ComGetCurrentEvent::ExeCom(), TGo4AnalysisClient::SendAnalysisObject(), TGo4AnalysisClient::SendNamesList(), and TGo4Analysis::SendObjectToGUI(). |
|
Send status object via status channel to the server.
Definition at line 132 of file TGo4Slave.cxx. References TGo4TaskOwner::GetTask(). Referenced by TGo4ComSetObject::ExeCom(), TGo4ComGetAnalysisStatus::ExeCom(), and TGo4AnalysisClient::SendAnalysisStatus(). |
|
Overrides the ThreadManager Initialization; is used to setup the client connections on demand; checks for fbConnectRequest flag.
Reimplemented in TGo4AnalysisClient. Definition at line 138 of file TGo4Slave.cxx. Referenced by TGo4Task::Initialization(). |
|
|
Send internal status buffer to the server.
Definition at line 153 of file TGo4Slave.cxx. References TGo4TaskOwner::GetTask(). Referenced by TGo4AnalysisClient::SendAnalysisClientStatus(). |
|
|
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 171 of file TGo4Slave.cxx. References TGo4TaskOwner::GetTask(). Referenced by TGo4AnalysisClient::Constructor(), TGo4AnalysisClient::Initialization(), TGo4Analysis::MainCycle(), TGo4AnalysisWatchRunnable::Run(), TGo4AnalysisClient::Start(), and TGo4AnalysisClient::Stop(). |
|
Execute string command. Uses gInterpreter by default. May be overridden to evaluate go4 command strings in subclass. Reimplemented in TGo4AnalysisClient. Definition at line 175 of file TGo4Slave.cxx. Referenced by TGo4Task::ExecuteString(), and TGo4AnalysisClient::ExecuteString(). |
|
method needed by method CreateStatus of any status subclasses to set the values of the clienttask specific part of the status object.
Reimplemented in TGo4AnalysisClient. Definition at line 110 of file TGo4Slave.cxx. References TGo4TaskOwner::GetTask(). Referenced by CreateStatus(), and TGo4AnalysisClient::UpdateStatus(). |
|
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 134 of file TGo4Slave.h. Referenced by MainIsRunning(), Start(), and Stop(). |