GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4ObjClient Class Reference

Client for the go4 object server delivering root objects. More...

#include <TGo4ObjClient.h>

+ Inheritance diagram for TGo4ObjClient:

Public Member Functions

 TGo4ObjClient ()
 
 TGo4ObjClient (const char *clientname, const char *base=nullptr, const char *passwd=nullptr, const char *host=nullptr, Int_t port=0)
 
virtual ~TGo4ObjClient ()
 
const char * GetBase () const
 
const char * GetHost () const
 
const char * GetPasswd () const
 
Int_t GetPort () const
 
TGo4AnalysisObjectNamesRequestNamesList (const char *base=nullptr, const char *passwd=nullptr, const char *host=nullptr, Int_t port=0)
 Get nameslist object from client.
 
TObject * RequestObject (const char *objectname, const char *base=nullptr, const char *passwd=nullptr, const char *host=nullptr, Int_t port=0)
 Get object by name from client.
 
void SetBase (const char *serverbase)
 
void SetHost (const char *serverhost)
 
void SetPasswd (const char *serverpasswd)
 
void SetPort (Int_t port)
 

Protected Member Functions

TObject * ReceiveObject ()
 Receive root object streamed from server.
 
void SendCommand (const char *com)
 Send (command) string to server.
 

Private Member Functions

Int_t ConnectServer ()
 
Int_t DisconnectServer ()
 
TBuffer * ReceiveBuffer ()
 Receive root buffer containing requested object.
 
void SetParms (const char *base, const char *passwd, const char *host, Int_t port)
 Set server parameters if necessary.
 

Private Attributes

Int_t fiPort {0}
 serversocket port number
 
TString fxHostname
 hostname of the server to connect to
 
TString fxServerName
 contains api basename
 
TString fxServerPass
 contains api password
 
TGo4SocketfxTransport {nullptr}
 transport socket for connection to server
 

Detailed Description

Client for the go4 object server delivering root objects.

Author
J. Adamczewski
Since
17-Jan-2003

Definition at line 29 of file TGo4ObjClient.h.

Constructor & Destructor Documentation

◆ TGo4ObjClient() [1/2]

TGo4ObjClient::TGo4ObjClient ( )

Definition at line 30 of file TGo4ObjClient.cxx.

References fiPort, fxHostname, fxServerName, fxServerPass, and fxTransport.

◆ TGo4ObjClient() [2/2]

TGo4ObjClient::TGo4ObjClient ( const char * clientname,
const char * base = nullptr,
const char * passwd = nullptr,
const char * host = nullptr,
Int_t port = 0 )

Definition at line 40 of file TGo4ObjClient.cxx.

References fiPort, fxHostname, fxServerName, fxServerPass, fxTransport, and SetParms().

◆ ~TGo4ObjClient()

TGo4ObjClient::~TGo4ObjClient ( )
virtual

Definition at line 56 of file TGo4ObjClient.cxx.

References fxTransport.

Member Function Documentation

◆ ConnectServer()

Int_t TGo4ObjClient::ConnectServer ( )
private

◆ DisconnectServer()

Int_t TGo4ObjClient::DisconnectServer ( )
private

Definition at line 199 of file TGo4ObjClient.cxx.

References fxTransport.

Referenced by RequestNamesList(), and RequestObject().

◆ GetBase()

const char * TGo4ObjClient::GetBase ( ) const
inline

Definition at line 64 of file TGo4ObjClient.h.

References fxServerName.

Referenced by ConnectServer().

◆ GetHost()

const char * TGo4ObjClient::GetHost ( ) const
inline

Definition at line 66 of file TGo4ObjClient.h.

References fxHostname.

Referenced by ConnectServer().

◆ GetPasswd()

const char * TGo4ObjClient::GetPasswd ( ) const
inline

Definition at line 65 of file TGo4ObjClient.h.

References fxServerPass.

Referenced by ConnectServer().

◆ GetPort()

Int_t TGo4ObjClient::GetPort ( ) const
inline

Definition at line 67 of file TGo4ObjClient.h.

References fiPort.

Referenced by ConnectServer().

◆ ReceiveBuffer()

TBuffer * TGo4ObjClient::ReceiveBuffer ( )
private

Receive root buffer containing requested object.

Definition at line 205 of file TGo4ObjClient.cxx.

References TGo4Log::Debug(), fxTransport, TGo4SocketSignalHandler::IsLastSignalWINCH(), and TGo4SocketSignalHandler::SetLastSignal().

Referenced by ReceiveObject().

◆ ReceiveObject()

TObject * TGo4ObjClient::ReceiveObject ( )
protected

Receive root object streamed from server.

Definition at line 130 of file TGo4ObjClient.cxx.

References TGo4Log::Error(), fxTransport, TGo4TaskHandler::Get_fgcOK(), ReceiveBuffer(), and TGo4LockGuard.

Referenced by RequestNamesList(), and RequestObject().

◆ RequestNamesList()

TGo4AnalysisObjectNames * TGo4ObjClient::RequestNamesList ( const char * base = nullptr,
const char * passwd = nullptr,
const char * host = nullptr,
Int_t port = 0 )

Get nameslist object from client.

basename, password,host and portnumber may be specified at any time new if left out (default), the previously stored values are used

Definition at line 74 of file TGo4ObjClient.cxx.

References ConnectServer(), DisconnectServer(), TGo4Log::Error(), TGo4HistogramServer::fgcCOMGETLIST, ReceiveObject(), SendCommand(), and SetParms().

Referenced by main().

◆ RequestObject()

TObject * TGo4ObjClient::RequestObject ( const char * objectname,
const char * base = nullptr,
const char * passwd = nullptr,
const char * host = nullptr,
Int_t port = 0 )

Get object by name from client.

basename, password, host and portnumber may be specified at any time new if left out (default), the previously stored values are used

Definition at line 106 of file TGo4ObjClient.cxx.

References ConnectServer(), DisconnectServer(), TGo4Log::Error(), ReceiveObject(), SendCommand(), and SetParms().

Referenced by main().

◆ SendCommand()

void TGo4ObjClient::SendCommand ( const char * com)
protected

Send (command) string to server.

Command may be just name of requested object

Definition at line 166 of file TGo4ObjClient.cxx.

References fxTransport.

Referenced by RequestNamesList(), and RequestObject().

◆ SetBase()

void TGo4ObjClient::SetBase ( const char * serverbase)
inline

Definition at line 59 of file TGo4ObjClient.h.

References fxServerName.

Referenced by SetParms().

◆ SetHost()

void TGo4ObjClient::SetHost ( const char * serverhost)
inline

Definition at line 61 of file TGo4ObjClient.h.

References fxHostname.

Referenced by SetParms().

◆ SetParms()

void TGo4ObjClient::SetParms ( const char * base,
const char * passwd,
const char * host,
Int_t port )
private

Set server parameters if necessary.

Definition at line 61 of file TGo4ObjClient.cxx.

References SetBase(), SetHost(), SetPasswd(), and SetPort().

Referenced by TGo4ObjClient(), RequestNamesList(), and RequestObject().

◆ SetPasswd()

void TGo4ObjClient::SetPasswd ( const char * serverpasswd)
inline

Definition at line 60 of file TGo4ObjClient.h.

References fxServerPass.

Referenced by SetParms().

◆ SetPort()

void TGo4ObjClient::SetPort ( Int_t port)
inline

Definition at line 62 of file TGo4ObjClient.h.

References fiPort.

Referenced by SetParms().

Field Documentation

◆ fiPort

Int_t TGo4ObjClient::fiPort {0}
private

serversocket port number

Definition at line 89 of file TGo4ObjClient.h.

Referenced by TGo4ObjClient(), TGo4ObjClient(), GetPort(), and SetPort().

◆ fxHostname

TString TGo4ObjClient::fxHostname
private

hostname of the server to connect to

Definition at line 86 of file TGo4ObjClient.h.

Referenced by TGo4ObjClient(), TGo4ObjClient(), GetHost(), and SetHost().

◆ fxServerName

TString TGo4ObjClient::fxServerName
private

contains api basename

Definition at line 80 of file TGo4ObjClient.h.

Referenced by TGo4ObjClient(), TGo4ObjClient(), GetBase(), and SetBase().

◆ fxServerPass

TString TGo4ObjClient::fxServerPass
private

contains api password

Definition at line 83 of file TGo4ObjClient.h.

Referenced by TGo4ObjClient(), TGo4ObjClient(), GetPasswd(), and SetPasswd().

◆ fxTransport

TGo4Socket* TGo4ObjClient::fxTransport {nullptr}
private

transport socket for connection to server

Definition at line 92 of file TGo4ObjClient.h.

Referenced by TGo4ObjClient(), TGo4ObjClient(), ~TGo4ObjClient(), ConnectServer(), DisconnectServer(), ReceiveBuffer(), ReceiveObject(), and SendCommand().


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