GSI Object Oriented Online Offline (Go4) GO4-6.4.5
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 ()
 TGo4ObjClient (const char *clientname, const char *base=nullptr, const char *passwd=nullptr, const char *host=nullptr, Int_t port=0)
 TGo4ObjClient (const char *clientname, const char *base=nullptr, const char *passwd=nullptr, const char *host=nullptr, Int_t port=0)
virtual ~TGo4ObjClient ()
virtual ~TGo4ObjClient ()
const char * GetBase () const
const char * GetBase () const
const char * GetHost () const
const char * GetHost () const
const char * GetPasswd () const
const char * GetPasswd () const
Int_t GetPort () 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.
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.
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 SetBase (const char *serverbase)
void SetHost (const char *serverhost)
void SetHost (const char *serverhost)
void SetPasswd (const char *serverpasswd)
void SetPasswd (const char *serverpasswd)
void SetPort (Int_t port)
void SetPort (Int_t port)

Protected Member Functions

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

Private Member Functions

Int_t ConnectServer ()
Int_t ConnectServer ()
Int_t DisconnectServer ()
Int_t DisconnectServer ()
TBuffer * ReceiveBuffer ()
 Receive root buffer containing requested object.
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.
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/4]

TGo4ObjClient::TGo4ObjClient ( )

Definition at line 30 of file TGo4ObjClient.cxx.

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

Referenced by ReceiveBuffer().

◆ TGo4ObjClient() [2/4]

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() [1/2]

TGo4ObjClient::~TGo4ObjClient ( )
virtual

Definition at line 56 of file TGo4ObjClient.cxx.

References fxTransport.

◆ TGo4ObjClient() [3/4]

TGo4ObjClient::TGo4ObjClient ( )

◆ TGo4ObjClient() [4/4]

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

◆ ~TGo4ObjClient() [2/2]

virtual TGo4ObjClient::~TGo4ObjClient ( )
virtual

Member Function Documentation

◆ ConnectServer() [1/2]

Int_t TGo4ObjClient::ConnectServer ( )
private

◆ ConnectServer() [2/2]

Int_t TGo4ObjClient::ConnectServer ( )
private

◆ DisconnectServer() [1/2]

Int_t TGo4ObjClient::DisconnectServer ( )
private

Definition at line 199 of file TGo4ObjClient.cxx.

References fxTransport.

Referenced by RequestNamesList(), and RequestObject().

◆ DisconnectServer() [2/2]

Int_t TGo4ObjClient::DisconnectServer ( )
private

◆ GetBase() [1/2]

const char * TGo4ObjClient::GetBase ( ) const
inline

Definition at line 64 of file TGo4ObjClient.h.

References fxServerName.

Referenced by ConnectServer().

◆ GetBase() [2/2]

const char * TGo4ObjClient::GetBase ( ) const
inline

Definition at line 64 of file TGo4ObjClient.h.

References fxServerName.

◆ GetHost() [1/2]

const char * TGo4ObjClient::GetHost ( ) const
inline

Definition at line 66 of file TGo4ObjClient.h.

References fxHostname.

Referenced by ConnectServer().

◆ GetHost() [2/2]

const char * TGo4ObjClient::GetHost ( ) const
inline

Definition at line 66 of file TGo4ObjClient.h.

References fxHostname.

◆ GetPasswd() [1/2]

const char * TGo4ObjClient::GetPasswd ( ) const
inline

Definition at line 65 of file TGo4ObjClient.h.

References fxServerPass.

Referenced by ConnectServer().

◆ GetPasswd() [2/2]

const char * TGo4ObjClient::GetPasswd ( ) const
inline

Definition at line 65 of file TGo4ObjClient.h.

References fxServerPass.

◆ GetPort() [1/2]

Int_t TGo4ObjClient::GetPort ( ) const
inline

Definition at line 67 of file TGo4ObjClient.h.

References fiPort.

Referenced by ConnectServer().

◆ GetPort() [2/2]

Int_t TGo4ObjClient::GetPort ( ) const
inline

Definition at line 67 of file TGo4ObjClient.h.

References fiPort.

◆ ReceiveBuffer() [1/2]

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().

◆ ReceiveBuffer() [2/2]

TBuffer * TGo4ObjClient::ReceiveBuffer ( )
private

Receive root buffer containing requested object.

References TGo4ObjClient().

◆ ReceiveObject() [1/2]

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().

◆ ReceiveObject() [2/2]

TObject * TGo4ObjClient::ReceiveObject ( )
protected

Receive root object streamed from server.

References fiPort, fxHostname, fxServerName, and fxServerPass.

◆ RequestNamesList() [1/2]

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().

◆ RequestNamesList() [2/2]

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

◆ RequestObject() [1/2]

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().

◆ RequestObject() [2/2]

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

◆ SendCommand() [1/2]

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().

◆ SendCommand() [2/2]

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

Send (command) string to server.

Command may be just name of requested object

◆ SetBase() [1/2]

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

Definition at line 59 of file TGo4ObjClient.h.

References fxServerName.

Referenced by SetParms().

◆ SetBase() [2/2]

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

Definition at line 59 of file TGo4ObjClient.h.

References fxServerName.

◆ SetHost() [1/2]

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

Definition at line 61 of file TGo4ObjClient.h.

References fxHostname.

Referenced by SetParms().

◆ SetHost() [2/2]

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

Definition at line 61 of file TGo4ObjClient.h.

References fxHostname.

◆ SetParms() [1/2]

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().

◆ SetParms() [2/2]

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

Set server parameters if necessary.

◆ SetPasswd() [1/2]

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

Definition at line 60 of file TGo4ObjClient.h.

References fxServerPass.

Referenced by SetParms().

◆ SetPasswd() [2/2]

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

Definition at line 60 of file TGo4ObjClient.h.

References fxServerPass.

◆ SetPort() [1/2]

void TGo4ObjClient::SetPort ( Int_t port)
inline

Definition at line 62 of file TGo4ObjClient.h.

References fiPort.

Referenced by SetParms().

◆ SetPort() [2/2]

void TGo4ObjClient::SetPort ( Int_t port)
inline

Definition at line 62 of file TGo4ObjClient.h.

References fiPort.

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(), ReceiveObject(), 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(), ReceiveObject(), and SetHost().

◆ fxServerName

TString TGo4ObjClient::fxServerName
private

contains api basename

Definition at line 80 of file TGo4ObjClient.h.

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

◆ fxServerPass

TString TGo4ObjClient::fxServerPass
private

contains api password

Definition at line 83 of file TGo4ObjClient.h.

Referenced by TGo4ObjClient(), TGo4ObjClient(), GetPasswd(), ReceiveObject(), 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: