00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TGO4OBJCLIENT_H
00017 #define TGO4OBJCLIENT_H
00018
00019 #include "TNamed.h"
00020 #include "TString.h"
00021
00022 class TGo4AnalysisObjectNames;
00023 class TGo4Socket;
00024 class TBuffer;
00025
00032 class TGo4ObjClient : public TNamed {
00033 public:
00034
00035 TGo4ObjClient();
00036
00037 TGo4ObjClient(const char* clientname,
00038 const char* base=0,
00039 const char* passwd=0,
00040 const char* host=0,
00041 Int_t port=0);
00042
00043 virtual ~TGo4ObjClient();
00044
00048 TGo4AnalysisObjectNames* RequestNamesList(const char* base=0,
00049 const char* passwd=0,
00050 const char* host=0,
00051 Int_t port=0);
00052
00056 TObject* RequestObject(const char* objectname,
00057 const char* base=0,
00058 const char* passwd=0,
00059 const char* host=0,
00060 Int_t port=0);
00061
00062 void SetBase(const char* serverbase) { fxServerName = serverbase; }
00063 void SetPasswd(const char* serverpasswd) { fxServerPass = serverpasswd; }
00064 void SetHost(const char* serverhost) { fxHostname=serverhost; }
00065 void SetPort(Int_t port) { fiPort=port; }
00066
00067 const char* GetBase() const { return fxServerName.Data(); }
00068 const char* GetPasswd() const { return fxServerPass.Data(); }
00069 const char* GetHost() const { return fxHostname.Data(); }
00070 Int_t GetPort() const { return fiPort; }
00071
00072 protected:
00073
00075 void SendCommand(const char* com);
00076
00078 TObject* ReceiveObject();
00079
00080 private:
00081
00083 TString fxServerName;
00084
00086 TString fxServerPass;
00087
00089 TString fxHostname;
00090
00092 Int_t fiPort;
00093
00095 TGo4Socket* fxTransport;
00096
00098 void SetParms(const char* base, const char* passwd,
00099 const char* host, Int_t port);
00100
00101 Int_t ConnectServer();
00102
00103 Int_t DisconnectServer();
00104
00106 TBuffer* ReceiveBuffer();
00107
00108 ClassDef(TGo4ObjClient,1)
00109 };
00110
00111 #endif
00112
00113