v2.10-0 (21000JUN2005)

Go4TaskHandler
Class TGo4Master

Direct Known Subclasses:
TGo4Display

class TGo4Master
derived from TGo4TaskOwner


Field Summary
 private TStringfxSlaveExec
          Name of the executable (command) that is running in the slave process.
 private TStringfxSlaveNode
          Name of the node where the slave is running.
 private TStringfxSlaveShell
          Name of the shell where the slave is running.

Constructor Summary
TGo4Master()
           
TGo4Master(const char * name, Bool_t isserver, const char * serverhost, UInt_t negotport)
           

Destructor Summary
 virtual synchronized ~TGo4Master()
           

Method Summary
 virtual Bool_tConnectSlave(const char * name, const char * remotehost, UInt_t negport, const char * remotedir, const char * remotecommand, Int_t mode, Bool_t startserver, Go4CommandMode_t role, const char * passwd)
          Start connection to the slave.
 virtual TGo4TaskHandlerCommandList*CreateCommandList()
          factory method for command list; overridden by implementation
 virtual Bool_tDisconnectSlave(const char * name, Bool_t waitforslave)
          Disconnect slave process.
 const const char *GetSlaveExec()
           
 const const char *GetSlaveNode()
           
 const const char *GetSlaveShell()
           
 virtual Int_tLaunchSlaveServer(const char * name, const char * remotehost, const char * remotedir, const char * remotecommand, Int_t mode)
          method using a shell script to create
a new linux xterm with a slave executable as server.
 virtual voidSetSlave(const char * node, const char * shell, const char * command)
          Remember properties of slave process; this is usefull for killing the slave from the master.
 virtual voidStartSlaveWindow(const char * command)
          This method may start a gui window that contains the output of the slave task.
 Bool_tSubmitCommand(const char * name)
          send command specified by name to the current slave task
 Bool_tSubmitCommand(TGo4Command* com)
          send given command to the current slave task.
 Bool_tSubmitEmergencyCommand(Go4EmergencyCommand_t val)
          send emergency quit command to the current slave task

Methods inherited from class Go4TaskHandler.TGo4TaskOwner
GetName, GetTask, IsConnected, IsServer, Quit, SetTask, StartWorkThreads, StopWorkThreads

Field Detail

fxSlaveExec

private TString fxSlaveExec
Name of the executable (command) that is running in the slave process.
Used to kill it later.

fxSlaveNode

private TString fxSlaveNode
Name of the node where the slave is running. Used to kill it later.

fxSlaveShell

private TString fxSlaveShell
Name of the shell where the slave is running. Used to kill it later.
Constructor Detail

TGo4Master

public TGo4Master()

TGo4Master

public TGo4Master(const char * name, Bool_t isserver, const char * serverhost, UInt_t negotport)
Method Detail

~TGo4Master

public virtual synchronized ~TGo4Master()
Method Detail

ConnectSlave

public virtual Bool_t ConnectSlave(const char * name, const char * remotehost, UInt_t negport, const char * remotedir, const char * remotecommand, Int_t mode, Bool_t startserver, Go4CommandMode_t role, const char * passwd)
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

CreateCommandList

public virtual TGo4TaskHandlerCommandList* CreateCommandList()
factory method for command list; overridden by implementation

DisconnectSlave

public virtual Bool_t DisconnectSlave(const char * name, Bool_t waitforslave)
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).

GetSlaveExec

public const const char * GetSlaveExec()

GetSlaveNode

public const const char * GetSlaveNode()

GetSlaveShell

public const const char * GetSlaveShell()

LaunchSlaveServer

public virtual Int_t LaunchSlaveServer(const char * name, const char * remotehost, const char * remotedir, const char * remotecommand, Int_t mode)
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

SetSlave

public 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.

StartSlaveWindow

public virtual void StartSlaveWindow(const char * command)
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

SubmitCommand

public Bool_t SubmitCommand(const char * name)
send command specified by name to the current slave task

SubmitCommand

public Bool_t SubmitCommand(TGo4Command* com)
send given command to the current slave task. Command object is deleted after
this call internally!

SubmitEmergencyCommand

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

J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005