GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4ObjClient.h
Go to the documentation of this file.
1 // $Id: TGo4ObjClient.h 478 2009-10-29 12:26:09Z 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 für 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 #include "TString.h"
19 
21 class TGo4Socket;
22 class TBuffer;
23 
30 class TGo4ObjClient : public TNamed {
31  public:
32 
33  TGo4ObjClient();
34 
35  TGo4ObjClient(const char* clientname,
36  const char* base=0,
37  const char* passwd=0,
38  const char* host=0,
39  Int_t port=0);
40 
41  virtual ~TGo4ObjClient();
42 
46  TGo4AnalysisObjectNames* RequestNamesList(const char* base=0,
47  const char* passwd=0,
48  const char* host=0,
49  Int_t port=0);
50 
54  TObject* RequestObject(const char* objectname,
55  const char* base=0,
56  const char* passwd=0,
57  const char* host=0,
58  Int_t port=0);
59 
60  void SetBase(const char* serverbase) { fxServerName = serverbase; }
61  void SetPasswd(const char* serverpasswd) { fxServerPass = serverpasswd; }
62  void SetHost(const char* serverhost) { fxHostname=serverhost; }
63  void SetPort(Int_t port) { fiPort=port; }
64 
65  const char* GetBase() const { return fxServerName.Data(); }
66  const char* GetPasswd() const { return fxServerPass.Data(); }
67  const char* GetHost() const { return fxHostname.Data(); }
68  Int_t GetPort() const { return fiPort; }
69 
70  protected:
71 
73  void SendCommand(const char* com);
74 
76  TObject* ReceiveObject();
77 
78  private:
79 
81  TString fxServerName;
82 
84  TString fxServerPass;
85 
87  TString fxHostname;
88 
90  Int_t fiPort;
91 
94 
96  void SetParms(const char* base, const char* passwd,
97  const char* host, Int_t port);
98 
99  Int_t ConnectServer();
100 
101  Int_t DisconnectServer();
102 
104  TBuffer* ReceiveBuffer();
105 
106  ClassDef(TGo4ObjClient,1)
107 };
108 
109 #endif
void SetBase(const char *serverbase)
Definition: TGo4ObjClient.h:60
void SetPasswd(const char *serverpasswd)
Definition: TGo4ObjClient.h:61
TString fxServerName
Definition: TGo4ObjClient.h:81
TObject * ReceiveObject()
TString fxHostname
Definition: TGo4ObjClient.h:87
TGo4Socket * fxTransport
Definition: TGo4ObjClient.h:93
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:67
void SetHost(const char *serverhost)
Definition: TGo4ObjClient.h:62
void SetParms(const char *base, const char *passwd, const char *host, Int_t port)
const char * GetPasswd() const
Definition: TGo4ObjClient.h:66
void SetPort(Int_t port)
Definition: TGo4ObjClient.h:63
TString fxServerPass
Definition: TGo4ObjClient.h:84
Int_t DisconnectServer()
Int_t GetPort() const
Definition: TGo4ObjClient.h:68
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:65
Int_t ConnectServer()
void SendCommand(const char *com)
TBuffer * ReceiveBuffer()