GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4HistogramServer.h
Go to the documentation of this file.
1 // $Id: TGo4HistogramServer.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 TGO4HISTOGRAMSERVER_H
15 #define TGO4HISTOGRAMSERVER_H
16 
17 #include "TGo4CommandReceiver.h"
18 #include "TString.h"
19 
20 class TGo4AnalysisClient;
21 class TGo4Analysis;
22 class TGo4ThreadHandler;
24 class TGo4Socket;
25 
36 
38 
39  public:
40 
42 
44  const char* servername="localhost",
45  const char* password="go4",
46  Bool_t useobjectserver=kFALSE);
47 
48  virtual ~TGo4HistogramServer();
49 
51  Int_t ServeObjectClient();
52 
54  UInt_t GetObjPort();
55 
59  virtual Int_t TimerConnect();
60 
62 
63  TGo4Analysis* GetAnalysis() const { return fxAnalysis; }
64 
66  static const char* fgcCONTHREADNAME;
67 
69  static const char* fgcOBJTHREADNAME;
70 
72  static const char* fgcSHUTDOWNNAME;
73 
75  static const char* fgcCOMGETLIST;
76 
78  static const UInt_t fguTIMERPERIOD;
79 
81  static const Int_t fgiOPENWAITCYCLES;
82 
84  static const UInt_t fguOPENWAITCYCLETIME;
85 
87  static const Int_t fgiCLOSEWAITCYCLES;
88 
90  static const UInt_t fguCLOSEWAITCYCLETIME;
91 
93  static const Int_t fgiCONNECTWAITCYCLES;
94 
96  static const UInt_t fguCONNECTWAITCYCLETIME;
97 
98  private:
99 
100  const char* ConnectorName() const { return fxConnectorName.Data(); }
101 
102  const char* ObjectThreadName() const { return fxObjectThreadName.Data(); }
103 
104  const char* ConnectHost() const { return fcConnectHost.Data(); }
105 
106  void SetConnect(TGo4Socket * trans, const char* host, UInt_t port);
107 
108  void SetDisConnect(TGo4Socket * trans);
109 
110  Int_t WaitForOpen();
111 
112  Int_t WaitForClose();
113 
114  Int_t WaitForConnection();
115 
117  void DisconnectObjectClient();
118 
120  Bool_t CheckLogin();
121 
123  Int_t ConnectObjectClient();
124 
126  Bool_t HandleObjectRequest();
127 
130  Bool_t SendObject(TObject* obj);
131 
135 
137  TString fxServerName;
138 
140  TString fxServerPass;
141 
143  TString fxConnectorName;
144 
147 
150 
153 
155  UInt_t fuObjectPort;
156 
160 
164 
166  TString fcConnectHost;
167 
170 
173 
176 
179 
183 
187 
193 
196 
197 
198  ClassDef(TGo4HistogramServer,1)
199 };
200 
201 #endif //TGO4HISTOGRAMSERVER_H
const char * ConnectHost() const
static const char * fgcCONTHREADNAME
TGo4ObjConnectorTimer * fxConnectorTimer
TGo4AnalysisClient * fxAnalysisClient
static const Int_t fgiCLOSEWAITCYCLES
const char * ObjectThreadName() const
static const Int_t fgiOPENWAITCYCLES
TGo4Analysis * GetAnalysis() const
TGo4ThreadHandler * fxThreadHandler
static const char * fgcSHUTDOWNNAME
static const UInt_t fguCONNECTWAITCYCLETIME
static const char * fgcOBJTHREADNAME
static const UInt_t fguTIMERPERIOD
void SetDisConnect(TGo4Socket *trans)
const char * ConnectorName() const
TGo4Socket * fxConnectTransport
virtual Int_t TimerConnect()
TGo4AnalysisClient * GetAnalysisClient() const
static const UInt_t fguOPENWAITCYCLETIME
static const Int_t fgiCONNECTWAITCYCLES
static const UInt_t fguCLOSEWAITCYCLETIME
static const char * fgcCOMGETLIST
TGo4Socket * fxDisConnectTransport
Bool_t SendObject(TObject *obj)
void SetConnect(TGo4Socket *trans, const char *host, UInt_t port)