GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Client for the go4 object server delivering root objects. More...
#include <TGo4ObjClient.h>
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 |
TGo4AnalysisObjectNames * | RequestNamesList (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 | |
TGo4Socket * | fxTransport {nullptr} |
transport socket for connection to server | |
Client for the go4 object server delivering root objects.
Definition at line 29 of file TGo4ObjClient.h.
TGo4ObjClient::TGo4ObjClient | ( | ) |
Definition at line 30 of file TGo4ObjClient.cxx.
References fiPort, fxHostname, fxServerName, fxServerPass, and fxTransport.
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().
|
virtual |
Definition at line 56 of file TGo4ObjClient.cxx.
References fxTransport.
|
private |
Definition at line 172 of file TGo4ObjClient.cxx.
References TGo4Log::Debug(), fxTransport, TGo4TaskHandler::Get_fgcOK(), GetBase(), GetHost(), GetPasswd(), and GetPort().
Referenced by RequestNamesList(), and RequestObject().
|
private |
Definition at line 199 of file TGo4ObjClient.cxx.
References fxTransport.
Referenced by RequestNamesList(), and RequestObject().
|
inline |
Definition at line 64 of file TGo4ObjClient.h.
References fxServerName.
Referenced by ConnectServer().
|
inline |
Definition at line 66 of file TGo4ObjClient.h.
References fxHostname.
Referenced by ConnectServer().
|
inline |
Definition at line 65 of file TGo4ObjClient.h.
References fxServerPass.
Referenced by ConnectServer().
|
inline |
|
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().
|
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().
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().
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().
|
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().
|
inline |
|
inline |
|
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().
|
inline |
|
inline |
|
private |
serversocket port number
Definition at line 89 of file TGo4ObjClient.h.
Referenced by TGo4ObjClient(), TGo4ObjClient(), GetPort(), and SetPort().
|
private |
hostname of the server to connect to
Definition at line 86 of file TGo4ObjClient.h.
Referenced by TGo4ObjClient(), TGo4ObjClient(), GetHost(), and SetHost().
|
private |
contains api basename
Definition at line 80 of file TGo4ObjClient.h.
Referenced by TGo4ObjClient(), TGo4ObjClient(), GetBase(), and SetBase().
|
private |
contains api password
Definition at line 83 of file TGo4ObjClient.h.
Referenced by TGo4ObjClient(), TGo4ObjClient(), GetPasswd(), and SetPasswd().
|
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().