GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4ObjClient.h
Go to the documentation of this file.
1 // $Id: TGo4ObjClient.h 2627 2019-10-01 08:02:45Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4OBJCLIENT_H
15 #define TGO4OBJCLIENT_H
16 
17 #include "TNamed.h"
18 
20 class TGo4Socket;
21 class TBuffer;
22 
29 class TGo4ObjClient : public TNamed {
30  public:
31 
32  TGo4ObjClient();
33 
34  TGo4ObjClient(const char* clientname,
35  const char* base=0,
36  const char* passwd=0,
37  const char* host=0,
38  Int_t port=0);
39 
40  virtual ~TGo4ObjClient();
41 
45  TGo4AnalysisObjectNames* RequestNamesList(const char* base=0,
46  const char* passwd=0,
47  const char* host=0,
48  Int_t port=0);
49 
53  TObject* RequestObject(const char* objectname,
54  const char* base=0,
55  const char* passwd=0,
56  const char* host=0,
57  Int_t port=0);
58 
59  void SetBase(const char* serverbase) { fxServerName = serverbase; }
60  void SetPasswd(const char* serverpasswd) { fxServerPass = serverpasswd; }
61  void SetHost(const char* serverhost) { fxHostname=serverhost; }
62  void SetPort(Int_t port) { fiPort=port; }
63 
64  const char* GetBase() const { return fxServerName.Data(); }
65  const char* GetPasswd() const { return fxServerPass.Data(); }
66  const char* GetHost() const { return fxHostname.Data(); }
67  Int_t GetPort() const { return fiPort; }
68 
69  protected:
70 
72  void SendCommand(const char* com);
73 
75  TObject* ReceiveObject();
76 
77  private:
78 
80  TString fxServerName;
81 
83  TString fxServerPass;
84 
86  TString fxHostname;
87 
89  Int_t fiPort;
90 
93 
95  void SetParms(const char* base, const char* passwd,
96  const char* host, Int_t port);
97 
98  Int_t ConnectServer();
99 
100  Int_t DisconnectServer();
101 
103  TBuffer* ReceiveBuffer();
104 
105  ClassDef(TGo4ObjClient,1)
106 };
107 
108 #endif
void SetBase(const char *serverbase)
Definition: TGo4ObjClient.h:59
void SetPasswd(const char *serverpasswd)
Definition: TGo4ObjClient.h:60
TString fxServerName
Definition: TGo4ObjClient.h:80
TObject * ReceiveObject()
TString fxHostname
Definition: TGo4ObjClient.h:86
TGo4Socket * fxTransport
Definition: TGo4ObjClient.h:92
TGo4AnalysisObjectNames * RequestNamesList(const char *base=0, const char *passwd=0, const char *host=0, Int_t port=0)
const char * GetHost() const
Definition: TGo4ObjClient.h:66
void SetHost(const char *serverhost)
Definition: TGo4ObjClient.h:61
void SetParms(const char *base, const char *passwd, const char *host, Int_t port)
const char * GetPasswd() const
Definition: TGo4ObjClient.h:65
void SetPort(Int_t port)
Definition: TGo4ObjClient.h:62
TString fxServerPass
Definition: TGo4ObjClient.h:83
Int_t DisconnectServer()
Int_t GetPort() const
Definition: TGo4ObjClient.h:67
TObject * RequestObject(const char *objectname, const char *base=0, const char *passwd=0, const char *host=0, Int_t port=0)
virtual ~TGo4ObjClient()
const char * GetBase() const
Definition: TGo4ObjClient.h:64
Int_t ConnectServer()
void SendCommand(const char *com)
TBuffer * ReceiveBuffer()