Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4Master Class Reference

#include <TGo4Master.h>

Inheritance diagram for TGo4Master:

TGo4TaskOwner TGo4CommandReceiver TGo4Display List of all members.

Public Methods

 TGo4Master ()
 TGo4Master (const char *name, Bool_t isserver=kTRUE, const char *serverhost="localhost", UInt_t negotport=5000)
virtual ~TGo4Master ()
Bool_t SubmitCommand (const char *name)
 send command specified by name to the current slave task. More...

Bool_t SubmitEmergencyCommand (Go4EmergencyCommand_t val)
 send emergency quit command to the current slave task. More...

Bool_t SubmitCommand (TGo4Command *com)
 send given command to the current slave task. More...

virtual void SetSlave (const char *node, const char *shell, const char *command)
 Remember properties of slave process; this is usefull for killing the slave from the master. More...

const char * GetSlaveNode ()
const char * GetSlaveShell ()
const char * GetSlaveExec ()
virtual void StartSlaveWindow (const char *command)
 This method may start a gui window that contains the output of the slave task. More...

virtual TGo4TaskHandlerCommandListCreateCommandList ()
 factory method for command list; overridden by implementation. More...

virtual Bool_t ConnectSlave (const char *name, const char *remotehost=0, UInt_t negport=0, const char *remotedir=0, const char *remotecommand=0, Int_t mode=0, Bool_t startserver=kFALSE, Go4CommandMode_t role=kGo4ComModeController, const char *passwd=0)
 Start connection to the slave. More...

virtual Bool_t DisconnectSlave (const char *name=0, Bool_t waitforslave=kTRUE)
 Disconnect slave process. More...

virtual Int_t LaunchSlaveServer (const char *name, const char *remotehost=0, const char *remotedir=0, const char *remotecommand=0, Int_t mode=0)
 method using a shell script to create a new linux xterm with a slave executable as server. More...


Private Attributes

TString fxSlaveNode
 Name of the node where the slave is running. More...

TString fxSlaveShell
 Name of the shell where the slave is running. More...

TString fxSlaveExec
 Name of the executable (command) that is running in the slave process. More...


Constructor & Destructor Documentation

TGo4Master::TGo4Master  
 

Definition at line 61 of file TGo4Master.cxx.

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

Definition at line 30 of file TGo4Master.cxx.

References TGo4CommandInvoker::Instance(), TGo4TaskOwner::IsServer(), TGo4CommandInvoker::Register(), TGo4TaskOwner::SetTask(), and TGo4TaskOwner::TGo4ServerTask.

TGo4Master::~TGo4Master   [virtual]
 

Definition at line 66 of file TGo4Master.cxx.


Member Function Documentation

Bool_t TGo4Master::SubmitCommand const char *    name
 

send command specified by name to the current slave task.

Definition at line 76 of file TGo4Master.cxx.

References TGo4TaskOwner::GetTask(), and TGo4Task::SubmitCommand().

Referenced by TGo4GUIRegistry::SubmitCommand().

Bool_t TGo4Master::SubmitEmergencyCommand Go4EmergencyCommand_t    val
 

send emergency quit command to the current slave task.

Definition at line 81 of file TGo4Master.cxx.

References TGo4TaskOwner::GetTask(), Go4EmergencyCommand_t, and TGo4Task::SubmitEmergencyCommand().

Referenced by TGo4GUIRegistry::SubmitEmergencyCommand().

Bool_t TGo4Master::SubmitCommand TGo4Command   com
 

send given command to the current slave task.

Command object is deleted after this call internally!

Definition at line 85 of file TGo4Master.cxx.

References TGo4TaskOwner::GetTask(), and TGo4Task::SubmitCommand().

void TGo4Master::SetSlave const char *    node,
const char *    shell,
const char *    command
[virtual]
 

Remember properties of slave process; this is usefull for killing the slave from the master.

Reimplemented in TGo4Display.

Definition at line 90 of file TGo4Master.cxx.

References fxSlaveExec, fxSlaveNode, and fxSlaveShell.

Referenced by TGo4ServerTask::LaunchClient(), LaunchSlaveServer(), and TGo4Display::SetSlave().

const char * TGo4Master::GetSlaveNode  
 

Definition at line 97 of file TGo4Master.cxx.

References fxSlaveNode.

const char * TGo4Master::GetSlaveShell  
 

Definition at line 102 of file TGo4Master.cxx.

References fxSlaveShell.

const char * TGo4Master::GetSlaveExec  
 

Definition at line 107 of file TGo4Master.cxx.

References fxSlaveExec.

void TGo4Master::StartSlaveWindow const char *    command [virtual]
 

This method may start a gui window that contains the output of the slave task.

Reimplemented in TGo4Display to redirect the analysis output into q QWindow

Reimplemented in TGo4Display.

Definition at line 111 of file TGo4Master.cxx.

Referenced by TGo4ServerTask::LaunchClient(), and LaunchSlaveServer().

TGo4TaskHandlerCommandList * TGo4Master::CreateCommandList   [virtual]
 

factory method for command list; overridden by implementation.

Reimplemented in TGo4Display.

Definition at line 71 of file TGo4Master.cxx.

Referenced by TGo4Task::Initialization().

Bool_t TGo4Master::ConnectSlave const char *    name,
const char *    remotehost = 0,
UInt_t    negport = 0,
const char *    remotedir = 0,
const char *    remotecommand = 0,
Int_t    mode = 0,
Bool_t    startserver = kFALSE,
Go4CommandMode_t    role = kGo4ComModeController,
const char *    passwd = 0
[virtual]
 

Start connection to the slave.

If master is server, this will launch a client slave on the remotehost, by means of LaunchClient method of TGo4ServerTask. If master is client, this method will try to connect to an existing slave (analysis) server. Parameters: name - arbitrary name of slave remotehost - nodename of slave process negport - negotiationport (if slave already running as server ) remotedir - directory to start slave application remotecommand - executable name of slave mode - embedding mode (Qt, Xterm - ssh, rsh) of the slave output startserver - start slave server itself before connecting this master to it role - master role when connecting to slave server passwd - login passwd

Definition at line 115 of file TGo4Master.cxx.

References TGo4ClientTask::ConnectServer(), TGo4TaskOwner::GetTask(), Go4CommandMode_t, TGo4TaskOwner::IsServer(), TGo4ServerTask::LaunchClient(), and LaunchSlaveServer().

Referenced by TGo4ComConnectSlave::ExeCom().

Bool_t TGo4Master::DisconnectSlave const char *    name = 0,
Bool_t    waitforslave = kTRUE
[virtual]
 

Disconnect slave process.

If master is server, this will remove taskhandler of specified name, or current task handler. If master is client, this will remove the existing client connection (name argument is nop). If waitforslave is false, master will not wait for slave disconnect acknowledgement (fast disconnect mode).

Reimplemented in TGo4Display.

Definition at line 169 of file TGo4Master.cxx.

References TGo4ClientTask::DisconnectServer(), TGo4TaskOwner::GetTask(), TGo4TaskOwner::IsServer(), and TGo4ServerTask::RemoveClient().

Referenced by TGo4Display::DisconnectSlave(), and TGo4ComDisconnectSlave::ExeCom().

Int_t TGo4Master::LaunchSlaveServer const char *    name,
const char *    remotehost = 0,
const char *    remotedir = 0,
const char *    remotecommand = 0,
Int_t    mode = 0
[virtual]
 

method using a shell script to create a new linux xterm with a slave executable as server.

May be overridden by specialised subclass methods to call the script appropriate for the respective client. mode specifiers: Bit1=0 - use rsh for starting analysis client Bit1=1 - use ssh for starting analysis slave Bit2=0 - client in xterm window Bit2=1 - client without xterm in same shell as gui Bit3=0 - client outside gui mainframe (not implemented) Bit3=1 - client embedded in gui mainframe (not implemented) specify these bits respectively, with kSecureShell, kNoXterm, kGuiEmbed

Definition at line 191 of file TGo4Master.cxx.

References TGo4Log::Debug(), TGo4ServerTask::fgcLAUNCHPREFSFILE, TGo4ThreadManager::fguTEXTLENGTH, TGo4ServerTask::kGuiEmbed, TGo4ServerTask::kSecureShell, SetSlave(), and StartSlaveWindow().

Referenced by ConnectSlave().


Member Data Documentation

TString TGo4Master::fxSlaveNode [private]
 

Name of the node where the slave is running.

Used to kill it later.

Definition at line 139 of file TGo4Master.h.

Referenced by GetSlaveNode(), and SetSlave().

TString TGo4Master::fxSlaveShell [private]
 

Name of the shell where the slave is running.

Used to kill it later.

Definition at line 144 of file TGo4Master.h.

Referenced by GetSlaveShell(), and SetSlave().

TString TGo4Master::fxSlaveExec [private]
 

Name of the executable (command) that is running in the slave process.

Used to kill it later.

Definition at line 150 of file TGo4Master.h.

Referenced by GetSlaveExec(), and SetSlave().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:46 2005 for Go4-v2.10-5 by doxygen1.2.15