#include <TGo4HistogramServer.h>
Inheritance diagram for TGo4HistogramServer:
Public Methods | |
virtual | ~TGo4HistogramServer () |
TGo4HistogramServer (TGo4AnalysisClient *owner, const char *servername="localhost", const char *password="go4", Bool_t useobjectserver=kFALSE) | |
TGo4HistogramServer () | |
Int_t | ServeObjectClient () |
Used by object connector runnable to serve client request. More... | |
UInt_t | GetObjPort () |
returns the portnumber for object server connection. More... | |
virtual Int_t | TimerConnect () |
This method is used by the object connectortimer Notify to connect or disconnect a transportchannel (TSocket) on demand; the connection process itself is handled by the connector runnable. More... | |
TGo4AnalysisClient * | GetAnalysisClient () const |
TGo4Analysis * | GetAnalysis () const |
Static Public Attributes | |
const Text_t | fgcCONTHREADNAME [] = "HISTOSERV-" |
histogram server connector thread name. More... | |
const Text_t | fgcOBJTHREADNAME [] = "OBJECTSERV-" |
object server connector thread name. More... | |
const Text_t | fgcSHUTDOWNNAME [] = "__HServLast__" |
This string is send as histogram name for termination connection. More... | |
const Text_t | fgcCOMGETLIST [] = "__OServNamesList__" |
command string for object server nameslist request. More... | |
const UInt_t | fguTIMERPERIOD = 200 |
Period of connector timer, in ms. More... | |
const Int_t | fgiOPENWAITCYCLES = 100 |
Maximum cycles to wait until transport is open. More... | |
const UInt_t | fguOPENWAITCYCLETIME = 500 |
Time for each open wait cycle, in ms. More... | |
const Int_t | fgiCLOSEWAITCYCLES = 100 |
Maximum cycles to wait until transport is closed. More... | |
const UInt_t | fguCLOSEWAITCYCLETIME = 500 |
Time for each close wait cycle, in ms. More... | |
const Int_t | fgiCONNECTWAITCYCLES = 20 |
Maximum cycles to wait until transport is connected. More... | |
const UInt_t | fguCONNECTWAITCYCLETIME = 500 |
Time for each connect wait cycle, in ms. More... | |
Private Methods | |
const char * | ConnectorName () const |
const char * | ObjectThreadName () const |
const char * | ConnectHost () const |
void | SetConnect (TGo4Socket *trans, const char *host, UInt_t port) |
void | SetDisConnect (TGo4Socket *trans) |
Int_t | WaitForOpen () |
Int_t | WaitForClose () |
Int_t | WaitForConnection () |
void | DisconnectObjectClient () |
Terminate connection to current object client, keep waiting for the next one. More... | |
Bool_t | CheckLogin () |
Checks basename and passwd login of connected client. More... | |
Int_t | ConnectObjectClient () |
Starts server socket waiting for the next client. More... | |
Bool_t | HandleObjectRequest () |
Ask for which object to send and give it to the client. More... | |
Bool_t | SendObject (TObject *obj) |
Send object to the current object client. More... | |
Private Attributes | |
TGo4AnalysisClient * | fxAnalysisClient |
TGo4Analysis * | fxAnalysis |
TGo4ThreadHandler * | fxThreadHandler |
TString | fxServerName |
contains api server name. More... | |
TString | fxServerPass |
contains api server password. More... | |
TString | fxConnectorName |
Name of connector thread. More... | |
TString | fxObjectThreadName |
Name of object server thread. More... | |
Int_t | fiServerPort |
port number for server socket. More... | |
TGo4Socket * | fxTransport |
socket for object server *. More... | |
UInt_t | fuObjectPort |
port number for the object server connections. More... | |
TGo4Socket * | fxConnectTransport |
link to the next TaskHandler transport instance that shall be connected by the Object connector Timer with the client. More... | |
TGo4Socket * | fxDisConnectTransport |
link to the next TaskHandler transport instance that shall be disconnected by the connector Timer with the client. More... | |
TString | fcConnectHost |
hostname for timer connect. More... | |
UInt_t | fuConnectPort |
port number for timer connect. More... | |
Bool_t | fbConnectRequest |
True if fxConnectTransport shall be Open() by Timer. More... | |
Bool_t | fbDisConnectRequest |
True if fxConnectTransport shall be Close() by Timer. More... | |
Bool_t | fbConnectIsOpen |
True if fxConnectTransport waits in server Open() call. More... | |
Bool_t | fbConnectIsDone |
True if fxConnectTransport has returned from Open(), i.e. More... | |
Bool_t | fbConnectIsClose |
True if fxConnectTransport has returned from Close(), i.e. More... | |
TGo4ObjConnectorTimer * | fxConnectorTimer |
timer responsible for the connection/disconnection of clients; independent of application control timer More... | |
Bool_t | fbUseObjectServer |
Switches Go4 objectserver option on/off. More... | |
Friends | |
class | TGo4HisConnectorRunnable |
Optionally, object server for root may be started using Go4 protocoll style. This was disabled for V3 by default 09/2005
Definition at line 37 of file TGo4HistogramServer.h.
|
Definition at line 153 of file TGo4HistogramServer.cxx. References TGo4Socket::Close(), ConnectorName(), f_his_close(), f_his_gethis(), fbUseObjectServer, fgcSHUTDOWNNAME, fiServerPort, fxConnectorTimer, fxServerName, fxServerPass, fxThreadHandler, fxTransport, INTS4, ObjectThreadName(), TGo4ThreadHandler::RemoveThread(), and TGo4ThreadHandler::Stop(). |
|
|
Definition at line 140 of file TGo4HistogramServer.cxx. References TGo4CommandInvoker::Instance(), and TGo4CommandInvoker::Register(). |
|
Used by object connector runnable to serve client request.
Definition at line 195 of file TGo4HistogramServer.cxx. References CheckLogin(), ConnectObjectClient(), DisconnectObjectClient(), and HandleObjectRequest(). Referenced by TGo4ObjConnectorRunnable::Run(). |
|
returns the portnumber for object server connection.
Definition at line 573 of file TGo4HistogramServer.cxx. References fuObjectPort, fxTransport, and TGo4Socket::GetPort(). Referenced by ConnectObjectClient(). |
|
This method is used by the object connectortimer Notify to connect or disconnect a transportchannel (TSocket) on demand; the connection process itself is handled by the connector runnable.
Definition at line 406 of file TGo4HistogramServer.cxx. References TGo4Socket::Close(), ConnectHost(), fbConnectIsClose, fbConnectIsDone, fbConnectIsOpen, fbConnectRequest, fbDisConnectRequest, fuConnectPort, fxConnectTransport, fxDisConnectTransport, TGo4Socket::IsOpen(), TGo4Socket::Open(), and TRACE. Referenced by TGo4ObjConnectorTimer::Notify(). |
|
Definition at line 63 of file TGo4HistogramServer.h. References fxAnalysisClient. |
|
Definition at line 65 of file TGo4HistogramServer.h. References fxAnalysis. Referenced by TGo4HisConnectorRunnable::Run(). |
|
Definition at line 102 of file TGo4HistogramServer.h. References fxConnectorName. Referenced by TGo4HistogramServer(), and ~TGo4HistogramServer(). |
|
Definition at line 104 of file TGo4HistogramServer.h. References fxObjectThreadName. Referenced by TGo4HistogramServer(), and ~TGo4HistogramServer(). |
|
Definition at line 106 of file TGo4HistogramServer.h. References fcConnectHost. Referenced by TimerConnect(). |
|
Definition at line 390 of file TGo4HistogramServer.cxx. References fbConnectRequest, fcConnectHost, fuConnectPort, fxConnectTransport, and TRACE. Referenced by ConnectObjectClient(). |
|
Definition at line 399 of file TGo4HistogramServer.cxx. References fbDisConnectRequest, fxDisConnectTransport, and TRACE. Referenced by DisconnectObjectClient(). |
|
Definition at line 488 of file TGo4HistogramServer.cxx. References fbConnectIsOpen, fgiOPENWAITCYCLES, fguOPENWAITCYCLETIME, fxAnalysisClient, TGo4TaskOwner::GetTask(), TGo4ThreadManager::IsTerminating(), TGo4Thread::Sleep(), and TRACE. Referenced by ConnectObjectClient(). |
|
Definition at line 520 of file TGo4HistogramServer.cxx. References fbConnectIsClose, fgiCLOSEWAITCYCLES, fguCLOSEWAITCYCLETIME, TGo4Thread::Sleep(), and TRACE. Referenced by DisconnectObjectClient(). |
|
Definition at line 546 of file TGo4HistogramServer.cxx. References fbConnectIsDone, fguCONNECTWAITCYCLETIME, fxAnalysisClient, TGo4TaskOwner::GetTask(), TGo4ThreadManager::IsTerminating(), TGo4Thread::Sleep(), and TRACE. Referenced by ConnectObjectClient(). |
|
Terminate connection to current object client, keep waiting for the next one.
Definition at line 207 of file TGo4HistogramServer.cxx. References fxTransport, SetDisConnect(), and WaitForClose(). Referenced by CheckLogin(), and ServeObjectClient(). |
|
Checks basename and passwd login of connected client.
Definition at line 277 of file TGo4HistogramServer.cxx. References DisconnectObjectClient(), TGo4TaskHandler::fgcERROR, TGo4TaskHandler::fgcOK, fxServerName, fxServerPass, fxTransport, TGo4Socket::RecvRaw(), and TGo4Socket::Send(). Referenced by ServeObjectClient(). |
|
Starts server socket waiting for the next client.
Definition at line 216 of file TGo4HistogramServer.cxx. References TGo4Log::Debug(), TGo4TaskHandler::fgiPORTWAITCYCLES, TGo4TaskHandler::fguPORTWAITTIME, fuObjectPort, fxAnalysisClient, fxServerName, fxTransport, GetObjPort(), TGo4TaskOwner::GetTask(), TGo4Analysis::Instance(), TGo4ThreadManager::IsTerminating(), TGo4Analysis::Message(), SetConnect(), TGo4Thread::Sleep(), WaitForConnection(), and WaitForOpen(). Referenced by ServeObjectClient(). |
|
Ask for which object to send and give it to the client.
Definition at line 315 of file TGo4HistogramServer.cxx. References fgcCOMGETLIST, TGo4ThreadManager::fguTEXTLENGTH, fxAnalysis, fxTransport, TGo4Analysis::GetNamesList(), TGo4Analysis::GetObject(), TGo4Socket::RecvRaw(), SendObject(), and TGo4Analysis::UpdateNamesList(). Referenced by ServeObjectClient(). |
|
Send object to the current object client. Protocol matches TGo4ObjectClient::ReceiveObject() Definition at line 347 of file TGo4HistogramServer.cxx. References TGo4Log::Debug(), TGo4TaskHandler::fgcERROR, TGo4TaskHandler::fgcOK, fxTransport, TGo4Socket::RecvRaw(), TGo4Socket::Send(), and TGo4Socket::SendBuffer(). Referenced by HandleObjectRequest(). |
|
Definition at line 39 of file TGo4HistogramServer.h. Referenced by TGo4HistogramServer(). |
|
histogram server connector thread name.
Definition at line 48 of file TGo4HistogramServer.cxx. Referenced by TGo4HistogramServer(). |
|
object server connector thread name.
Definition at line 52 of file TGo4HistogramServer.cxx. Referenced by TGo4HistogramServer(). |
|
This string is send as histogram name for termination connection.
Definition at line 49 of file TGo4HistogramServer.cxx. Referenced by TGo4HisConnectorRunnable::Run(), and ~TGo4HistogramServer(). |
|
command string for object server nameslist request.
Definition at line 50 of file TGo4HistogramServer.cxx. Referenced by HandleObjectRequest(), and TGo4ObjClient::RequestNamesList(). |
|
Period of connector timer, in ms.
Definition at line 53 of file TGo4HistogramServer.cxx. Referenced by TGo4HistogramServer(). |
|
Maximum cycles to wait until transport is open.
Definition at line 54 of file TGo4HistogramServer.cxx. Referenced by WaitForOpen(). |
|
Time for each open wait cycle, in ms.
Definition at line 55 of file TGo4HistogramServer.cxx. Referenced by WaitForOpen(). |
|
Maximum cycles to wait until transport is closed.
Definition at line 56 of file TGo4HistogramServer.cxx. Referenced by WaitForClose(). |
|
Time for each close wait cycle, in ms.
Definition at line 57 of file TGo4HistogramServer.cxx. Referenced by WaitForClose(). |
|
Maximum cycles to wait until transport is connected.
Definition at line 58 of file TGo4HistogramServer.cxx. |
|
Time for each connect wait cycle, in ms.
Definition at line 59 of file TGo4HistogramServer.cxx. Referenced by WaitForConnection(). |
|
Definition at line 134 of file TGo4HistogramServer.h. Referenced by ConnectObjectClient(), GetAnalysisClient(), TGo4HistogramServer(), WaitForConnection(), and WaitForOpen(). |
|
Definition at line 135 of file TGo4HistogramServer.h. Referenced by GetAnalysis(), HandleObjectRequest(), and TGo4HistogramServer(). |
|
Definition at line 136 of file TGo4HistogramServer.h. Referenced by TGo4HistogramServer(), and ~TGo4HistogramServer(). |
|
contains api server name.
Definition at line 139 of file TGo4HistogramServer.h. Referenced by CheckLogin(), ConnectObjectClient(), TGo4HistogramServer(), and ~TGo4HistogramServer(). |
|
contains api server password.
Definition at line 142 of file TGo4HistogramServer.h. Referenced by CheckLogin(), TGo4HistogramServer(), and ~TGo4HistogramServer(). |
|
Name of connector thread.
Definition at line 145 of file TGo4HistogramServer.h. Referenced by ConnectorName(), and TGo4HistogramServer(). |
|
Name of object server thread.
Definition at line 148 of file TGo4HistogramServer.h. Referenced by ObjectThreadName(), and TGo4HistogramServer(). |
|
port number for server socket.
Definition at line 151 of file TGo4HistogramServer.h. Referenced by TGo4HistogramServer(), and ~TGo4HistogramServer(). |
|
socket for object server *.
Definition at line 154 of file TGo4HistogramServer.h. Referenced by CheckLogin(), ConnectObjectClient(), DisconnectObjectClient(), GetObjPort(), HandleObjectRequest(), SendObject(), TGo4HistogramServer(), and ~TGo4HistogramServer(). |
|
port number for the object server connections.
Definition at line 157 of file TGo4HistogramServer.h. Referenced by ConnectObjectClient(), and GetObjPort(). |
|
link to the next TaskHandler transport instance that shall be connected by the Object connector Timer with the client.
Definition at line 161 of file TGo4HistogramServer.h. Referenced by SetConnect(), and TimerConnect(). |
|
link to the next TaskHandler transport instance that shall be disconnected by the connector Timer with the client.
Definition at line 165 of file TGo4HistogramServer.h. Referenced by SetDisConnect(), and TimerConnect(). |
|
hostname for timer connect.
Definition at line 168 of file TGo4HistogramServer.h. Referenced by ConnectHost(), and SetConnect(). |
|
port number for timer connect.
Definition at line 171 of file TGo4HistogramServer.h. Referenced by SetConnect(), and TimerConnect(). |
|
True if fxConnectTransport shall be Open() by Timer.
Definition at line 174 of file TGo4HistogramServer.h. Referenced by SetConnect(), and TimerConnect(). |
|
True if fxConnectTransport shall be Close() by Timer.
Definition at line 177 of file TGo4HistogramServer.h. Referenced by SetDisConnect(), and TimerConnect(). |
|
True if fxConnectTransport waits in server Open() call.
Definition at line 180 of file TGo4HistogramServer.h. Referenced by TimerConnect(), and WaitForOpen(). |
|
True if fxConnectTransport has returned from Open(), i.e. connection was established Definition at line 184 of file TGo4HistogramServer.h. Referenced by TimerConnect(), and WaitForConnection(). |
|
True if fxConnectTransport has returned from Close(), i.e. connection was closed Definition at line 188 of file TGo4HistogramServer.h. Referenced by TimerConnect(), and WaitForClose(). |
|
timer responsible for the connection/disconnection of clients; independent of application control timer
Definition at line 194 of file TGo4HistogramServer.h. Referenced by TGo4HistogramServer(), and ~TGo4HistogramServer(). |
|
Switches Go4 objectserver option on/off.
Definition at line 197 of file TGo4HistogramServer.h. Referenced by ~TGo4HistogramServer(). |