Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4ObjClient.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
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 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:26 2008 for Go4-v3.04-1 by  doxygen 1.4.2