#include <TGo4ObjClient.h>
Public Member Functions | |
TGo4ObjClient () | |
TGo4ObjClient (const char *clientname, const char *base=0, const char *passwd=0, const char *host=0, Int_t port=0) | |
virtual | ~TGo4ObjClient () |
TGo4AnalysisObjectNames * | RequestNamesList (const char *base=0, const char *passwd=0, const char *host=0, Int_t port=0) |
TObject * | RequestObject (const char *objectname, const char *base=0, const char *passwd=0, const char *host=0, Int_t port=0) |
void | SetBase (const char *serverbase) |
void | SetPasswd (const char *serverpasswd) |
void | SetHost (const char *serverhost) |
void | SetPort (Int_t port) |
const char * | GetBase () const |
const char * | GetPasswd () const |
const char * | GetHost () const |
Int_t | GetPort () const |
Protected Member Functions | |
void | SendCommand (const char *com) |
TObject * | ReceiveObject () |
Private Member Functions | |
void | SetParms (const char *base, const char *passwd, const char *host, Int_t port) |
Int_t | ConnectServer () |
Int_t | DisconnectServer () |
TBuffer * | ReceiveBuffer () |
Private Attributes | |
TString | fxServerName |
TString | fxServerPass |
TString | fxHostname |
Int_t | fiPort |
TGo4Socket * | fxTransport |
Client for the go4 object server delivering root objects.
Definition at line 30 of file TGo4ObjClient.h.
TGo4ObjClient::TGo4ObjClient | ( | ) |
Definition at line 31 of file TGo4ObjClient.cxx.
TGo4ObjClient::TGo4ObjClient | ( | const char * | clientname, | |
const char * | base = 0 , |
|||
const char * | passwd = 0 , |
|||
const char * | host = 0 , |
|||
Int_t | port = 0 | |||
) |
Definition at line 41 of file TGo4ObjClient.cxx.
References fxTransport, and SetParms().
TGo4ObjClient::~TGo4ObjClient | ( | ) | [virtual] |
Definition at line 57 of file TGo4ObjClient.cxx.
References fxTransport.
Int_t TGo4ObjClient::ConnectServer | ( | ) | [private] |
Definition at line 174 of file TGo4ObjClient.cxx.
References TGo4Log::Debug(), fxTransport, TGo4TaskHandler::Get_fgcOK(), GetBase(), GetHost(), GetPasswd(), GetPort(), TGo4Socket::Open(), TGo4Socket::RecvRaw(), and TGo4Socket::Send().
Referenced by RequestNamesList(), and RequestObject().
Int_t TGo4ObjClient::DisconnectServer | ( | ) | [private] |
Definition at line 200 of file TGo4ObjClient.cxx.
References TGo4Socket::Close(), and fxTransport.
Referenced by RequestNamesList(), and RequestObject().
const char* TGo4ObjClient::GetBase | ( | ) | const [inline] |
Definition at line 65 of file TGo4ObjClient.h.
References fxServerName.
Referenced by ConnectServer().
const char* TGo4ObjClient::GetHost | ( | ) | const [inline] |
Definition at line 67 of file TGo4ObjClient.h.
References fxHostname.
Referenced by ConnectServer().
const char* TGo4ObjClient::GetPasswd | ( | ) | const [inline] |
Definition at line 66 of file TGo4ObjClient.h.
References fxServerPass.
Referenced by ConnectServer().
Int_t TGo4ObjClient::GetPort | ( | ) | const [inline] |
TBuffer * TGo4ObjClient::ReceiveBuffer | ( | ) | [private] |
Receive root buffer containing requested object
Definition at line 206 of file TGo4ObjClient.cxx.
References TGo4Log::Debug(), fxTransport, TGo4Socket::GetBuffer(), TGo4SocketSignalHandler::IsLastSignalWINCH(), TGo4Socket::ReceiveBuffer(), and TGo4SocketSignalHandler::SetLastSignal().
Referenced by ReceiveObject().
TObject * TGo4ObjClient::ReceiveObject | ( | ) | [protected] |
Receive root object streamed from server
Definition at line 131 of file TGo4ObjClient.cxx.
References TGo4Log::Error(), fxTransport, TGo4TaskHandler::Get_fgcOK(), ReceiveBuffer(), TGo4Socket::RecvRaw(), and TGo4Socket::Send().
Referenced by RequestNamesList(), and RequestObject().
TGo4AnalysisObjectNames * TGo4ObjClient::RequestNamesList | ( | const char * | base = 0 , |
|
const char * | passwd = 0 , |
|||
const char * | host = 0 , |
|||
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 75 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 = 0 , |
|||
const char * | passwd = 0 , |
|||
const char * | host = 0 , |
|||
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 107 of file TGo4ObjClient.cxx.
References ConnectServer(), DisconnectServer(), TGo4Log::Error(), ReceiveObject(), SendCommand(), and SetParms().
Referenced by main().
void TGo4ObjClient::SendCommand | ( | const char * | com | ) | [protected] |
Send (command) string to server. Command may be just name of requested object
Definition at line 168 of file TGo4ObjClient.cxx.
References fxTransport, and TGo4Socket::Send().
Referenced by RequestNamesList(), and RequestObject().
void TGo4ObjClient::SetBase | ( | const char * | serverbase | ) | [inline] |
void TGo4ObjClient::SetHost | ( | const char * | serverhost | ) | [inline] |
void TGo4ObjClient::SetParms | ( | const char * | base, | |
const char * | passwd, | |||
const char * | host, | |||
Int_t | port | |||
) | [private] |
Set server parameters if necessary
Definition at line 62 of file TGo4ObjClient.cxx.
References SetBase(), SetHost(), SetPasswd(), and SetPort().
Referenced by RequestNamesList(), RequestObject(), and TGo4ObjClient().
void TGo4ObjClient::SetPasswd | ( | const char * | serverpasswd | ) | [inline] |
void TGo4ObjClient::SetPort | ( | Int_t | port | ) | [inline] |
Int_t TGo4ObjClient::fiPort [private] |
serversocket port number
Definition at line 90 of file TGo4ObjClient.h.
TString TGo4ObjClient::fxHostname [private] |
hostname of the server to connect to
Definition at line 87 of file TGo4ObjClient.h.
TString TGo4ObjClient::fxServerName [private] |
contains api basename
Definition at line 81 of file TGo4ObjClient.h.
TString TGo4ObjClient::fxServerPass [private] |
contains api password
Definition at line 84 of file TGo4ObjClient.h.
Referenced by GetPasswd(), and SetPasswd().
TGo4Socket* TGo4ObjClient::fxTransport [private] |
transport socket for connection to server
Definition at line 93 of file TGo4ObjClient.h.
Referenced by ConnectServer(), DisconnectServer(), ReceiveBuffer(), ReceiveObject(), SendCommand(), TGo4ObjClient(), and ~TGo4ObjClient().