GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4HistogramServer.h
Go to the documentation of this file.
1 // $Id$
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 
149  Int_t fiServerPort{0};
150 
153 
155  UInt_t fuObjectPort{0};
156 
160 
164 
166  TString fcConnectHost;
167 
169  UInt_t fuConnectPort{0};
170 
172  Bool_t fbConnectRequest{kFALSE};
173 
175  Bool_t fbDisConnectRequest{kFALSE};
176 
178  Bool_t fbConnectIsOpen{kFALSE};
179 
182  Bool_t fbConnectIsDone{kFALSE};
183 
186  Bool_t fbConnectIsClose{kFALSE};
187 
193 
195  Bool_t fbUseObjectServer{kFALSE};
196 
197  ClassDef(TGo4HistogramServer,1)
198 };
199 
200 #endif //TGO4HISTOGRAMSERVER_H
static const char * fgcCONTHREADNAME
TGo4ObjConnectorTimer * fxConnectorTimer
TGo4AnalysisClient * fxAnalysisClient
static const Int_t fgiCLOSEWAITCYCLES
const char * ObjectThreadName() const
static const Int_t fgiOPENWAITCYCLES
const char * ConnectHost() 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)
TGo4AnalysisClient * GetAnalysisClient() const
TGo4Socket * fxConnectTransport
const char * ConnectorName() const
virtual Int_t TimerConnect()
static const UInt_t fguOPENWAITCYCLETIME
static const Int_t fgiCONNECTWAITCYCLES
static const UInt_t fguCLOSEWAITCYCLETIME
static const char * fgcCOMGETLIST
TGo4Analysis * GetAnalysis() const
TGo4Socket * fxDisConnectTransport
Bool_t SendObject(TObject *obj)
void SetConnect(TGo4Socket *trans, const char *host, UInt_t port)