Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4HistogramServer/TGo4HistogramServer.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE 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 TGO4HISTOGRAMSERVER_H
00017 #define TGO4HISTOGRAMSERVER_H
00018 
00019 #include "Go4CommandsBase/TGo4CommandReceiver.h"
00020 #include "TString.h"
00021 
00022 class TGo4AnalysisClient;
00023 class TGo4Analysis;
00024 class TGo4ThreadHandler;
00025 class TGo4ObjConnectorTimer;
00026 class TGo4Socket;
00027 
00037 class TGo4HistogramServer : public TGo4CommandReceiver {
00038 
00039    friend class TGo4HisConnectorRunnable;
00040 
00041    public:
00042 
00043       virtual ~TGo4HistogramServer();
00044 
00045       TGo4HistogramServer(TGo4AnalysisClient* owner,
00046                           const char* servername="localhost",
00047                           const char* password="go4",
00048                           Bool_t useobjectserver=kFALSE);
00049 
00050       TGo4HistogramServer();
00051 
00053       Int_t ServeObjectClient();
00054 
00056       UInt_t GetObjPort();
00057 
00061       virtual Int_t TimerConnect();
00062 
00063       TGo4AnalysisClient* GetAnalysisClient() const { return fxAnalysisClient; }
00064 
00065       TGo4Analysis* GetAnalysis() const { return fxAnalysis; }
00066 
00068       static const Text_t fgcCONTHREADNAME[]; 
00069 
00071       static const Text_t fgcOBJTHREADNAME[]; 
00072 
00074       static const Text_t fgcSHUTDOWNNAME[]; 
00075 
00077       static const Text_t fgcCOMGETLIST[]; 
00078 
00080       static const UInt_t fguTIMERPERIOD;         
00081 
00083       static const Int_t fgiOPENWAITCYCLES;        
00084 
00086       static const UInt_t fguOPENWAITCYCLETIME;   
00087 
00089       static const Int_t fgiCLOSEWAITCYCLES;      
00090 
00092       static const UInt_t fguCLOSEWAITCYCLETIME;  
00093 
00095       static const Int_t fgiCONNECTWAITCYCLES;    
00096 
00098       static const UInt_t fguCONNECTWAITCYCLETIME;  
00099 
00100    private:
00101 
00102       const char* ConnectorName() const { return fxConnectorName.Data(); }
00103       
00104       const char* ObjectThreadName() const { return fxObjectThreadName.Data(); }
00105       
00106       const char* ConnectHost() const { return fcConnectHost.Data(); }
00107 
00108       void SetConnect(TGo4Socket * trans, const char* host, UInt_t port);
00109 
00110       void SetDisConnect(TGo4Socket * trans);
00111 
00112       Int_t WaitForOpen();
00113 
00114       Int_t WaitForClose();
00115 
00116       Int_t WaitForConnection();
00117 
00119       void DisconnectObjectClient();
00120 
00122       Bool_t CheckLogin();
00123 
00125       Int_t ConnectObjectClient();
00126 
00128       Bool_t HandleObjectRequest();
00129 
00132       Bool_t SendObject(TObject* obj);
00133 
00134       TGo4AnalysisClient* fxAnalysisClient;
00135       TGo4Analysis* fxAnalysis;
00136       TGo4ThreadHandler* fxThreadHandler;
00137       
00139       TString fxServerName;    
00140 
00142       TString fxServerPass;    
00143       
00145       TString fxConnectorName; 
00146       
00148       TString fxObjectThreadName; 
00149       
00151       Int_t fiServerPort;
00152       
00154       TGo4Socket* fxTransport; 
00155       
00157       UInt_t fuObjectPort;
00158 
00161       TGo4Socket * fxConnectTransport; 
00162 
00165       TGo4Socket * fxDisConnectTransport; 
00166 
00168       TString fcConnectHost; 
00169 
00171       UInt_t fuConnectPort;
00172 
00174       Bool_t fbConnectRequest;
00175 
00177       Bool_t fbDisConnectRequest;
00178 
00180       Bool_t fbConnectIsOpen;
00181 
00184       Bool_t fbConnectIsDone;
00185 
00188       Bool_t fbConnectIsClose;
00189 
00194       TGo4ObjConnectorTimer * fxConnectorTimer; 
00195 
00197       Bool_t fbUseObjectServer;
00198 
00199 
00200   ClassDef(TGo4HistogramServer,1)
00201 };
00202 
00203 #endif //TGO4HISTOGRAMSERVER_H
00204 
00205 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:03 2005 for Go4-v2.10-5 by doxygen1.2.15