Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TGO4OBJCLIENT_H
00015 #define TGO4OBJCLIENT_H
00016
00017 #include "TNamed.h"
00018 #include "TString.h"
00019
00020 class TGo4AnalysisObjectNames;
00021 class TGo4Socket;
00022 class TBuffer;
00023
00030 class TGo4ObjClient : public TNamed {
00031 public:
00032
00033 TGo4ObjClient();
00034
00035 TGo4ObjClient(const char* clientname,
00036 const char* base=0,
00037 const char* passwd=0,
00038 const char* host=0,
00039 Int_t port=0);
00040
00041 virtual ~TGo4ObjClient();
00042
00046 TGo4AnalysisObjectNames* RequestNamesList(const char* base=0,
00047 const char* passwd=0,
00048 const char* host=0,
00049 Int_t port=0);
00050
00054 TObject* RequestObject(const char* objectname,
00055 const char* base=0,
00056 const char* passwd=0,
00057 const char* host=0,
00058 Int_t port=0);
00059
00060 void SetBase(const char* serverbase) { fxServerName = serverbase; }
00061 void SetPasswd(const char* serverpasswd) { fxServerPass = serverpasswd; }
00062 void SetHost(const char* serverhost) { fxHostname=serverhost; }
00063 void SetPort(Int_t port) { fiPort=port; }
00064
00065 const char* GetBase() const { return fxServerName.Data(); }
00066 const char* GetPasswd() const { return fxServerPass.Data(); }
00067 const char* GetHost() const { return fxHostname.Data(); }
00068 Int_t GetPort() const { return fiPort; }
00069
00070 protected:
00071
00073 void SendCommand(const char* com);
00074
00076 TObject* ReceiveObject();
00077
00078 private:
00079
00081 TString fxServerName;
00082
00084 TString fxServerPass;
00085
00087 TString fxHostname;
00088
00090 Int_t fiPort;
00091
00093 TGo4Socket* fxTransport;
00094
00096 void SetParms(const char* base, const char* passwd,
00097 const char* host, Int_t port);
00098
00099 Int_t ConnectServer();
00100
00101 Int_t DisconnectServer();
00102
00104 TBuffer* ReceiveBuffer();
00105
00106 ClassDef(TGo4ObjClient,1)
00107 };
00108
00109 #endif