GSI Object Oriented Online Offline (Go4)
GO4-5.3.2
|
#include <TGo4TaskOwner.h>
Public Member Functions | |
TGo4TaskOwner () | |
TGo4TaskOwner (Bool_t isserver) | |
virtual | ~TGo4TaskOwner () |
Bool_t | IsServer () |
TGo4Task * | GetTask () |
virtual Int_t | StartWorkThreads () |
virtual Int_t | StopWorkThreads () |
virtual void | Quit () |
const char * | GetName () const |
Bool_t | IsConnected () |
Bool_t | IsBeingQuit () |
TMutex * | GetTaskManagerMutex () |
Public Member Functions inherited from TGo4CommandReceiver | |
virtual | ~TGo4CommandReceiver () |
TGo4CommandReceiver () | |
Protected Member Functions | |
void | SetTask (TGo4Task *task, Bool_t delold=kTRUE) |
Private Attributes | |
TGo4Task * | fxTask |
Bool_t | fbServerMode |
Friends | |
class | TGo4Task |
class | TGo4ServerTask |
Baseclass for all instances that can own a TGo4Task. Bridge between client/server functionality and master/slave.
Definition at line 27 of file TGo4TaskOwner.h.
TGo4TaskOwner::TGo4TaskOwner | ( | ) |
Definition at line 25 of file TGo4TaskOwner.cxx.
TGo4TaskOwner::TGo4TaskOwner | ( | Bool_t | isserver | ) |
Definition at line 32 of file TGo4TaskOwner.cxx.
|
virtual |
Definition at line 39 of file TGo4TaskOwner.cxx.
References fxTask, and TGo4Task::SetOwner().
const char * TGo4TaskOwner::GetName | ( | ) | const |
Definition at line 47 of file TGo4TaskOwner.cxx.
References fxTask.
Referenced by TGo4AnalysisClient::Constructor(), TGo4AnalysisClient::CreateStatus(), TGo4Slave::CreateStatus(), TGo4ComAction1::ExeCom(), TGo4AnalysisClient::Initialization(), IsConnected(), TGo4AnalysisClient::KillMain(), main(), TGo4AnalysisClient::RestartMain(), TGo4AnalysisMainRunnable::Run(), TGo4Slave::Start(), TGo4AnalysisClient::Start(), TGo4AnalysisClient::Stop(), TGo4Slave::Stop(), TGo4AnalysisClient::TGo4AnalysisClient(), and TGo4HistogramServer::TGo4HistogramServer().
|
inline |
Definition at line 41 of file TGo4TaskOwner.h.
References fxTask.
Referenced by TGo4HistogramServer::ConnectObjectClient(), TGo4AnalysisProxy::ConnectorPort(), TGo4AnalysisProxy::ConnectToServer(), TGo4AnalysisClient::Constructor(), TGo4Master::DisconnectSlave(), TGo4AnalysisProxy::GetRole(), GetTaskManagerMutex(), TGo4Slave::GetThreadHandler(), IsConnected(), TGo4AnalysisClient::KillMain(), TGo4AnalysisProxy::LaunchAsClient(), TGo4Slave::NextCommand(), TGo4DisplayDrawerTimer::Notify(), TGo4DisplayLoggerTimer::Notify(), TGo4AnalysisProxy::ReceiveStatus(), TGo4AnalysisClient::RestartMain(), TGo4AnalysisMainRunnable::Run(), TGo4Slave::SendObject(), TGo4Slave::SendStatus(), TGo4Slave::SendStatusBuffer(), TGo4Slave::SendStatusMessage(), TGo4AnalysisClient::Stop(), TGo4Master::SubmitCommand(), TGo4Master::SubmitEmergencyCommand(), TGo4AnalysisClient::SubmitShutdown(), TGo4Slave::Terminate(), TGo4AnalysisClient::Terminate(), TGo4AnalysisClient::TerminateFast(), TGo4AnalysisProxy::TGo4AnalysisProxy(), TGo4Display::TGo4Display(), TGo4Slave::UpdateStatus(), TGo4Slave::UpdateStatusBuffer(), TGo4HistogramServer::WaitForConnection(), TGo4HistogramServer::WaitForOpen(), and TGo4Display::~TGo4Display().
TMutex * TGo4TaskOwner::GetTaskManagerMutex | ( | ) |
Access to taskmanager mutex; to be locked outside main mutex
Definition at line 104 of file TGo4TaskOwner.cxx.
References TGo4TaskManager::GetMutex(), GetTask(), TGo4ServerTask::GetTaskManager(), and IsServer().
Referenced by TGo4AnalysisMainRunnable::Run().
Bool_t TGo4TaskOwner::IsBeingQuit | ( | ) |
Definition at line 98 of file TGo4TaskOwner.cxx.
References fxTask, and TGo4ThreadManager::IsBeingQuit().
Referenced by main().
Bool_t TGo4TaskOwner::IsConnected | ( | ) |
Definition at line 78 of file TGo4TaskOwner.cxx.
References TGo4ServerTask::GetCurrentTaskHandler(), GetName(), GetTask(), TGo4ClientTask::IsConnected(), and IsServer().
Referenced by TGo4AnalysisProxy::IsConnected().
|
inline |
Definition at line 39 of file TGo4TaskOwner.h.
References fbServerMode.
Referenced by TGo4AnalysisClient::Constructor(), TGo4Master::DisconnectSlave(), GetTaskManagerMutex(), TGo4TaskHandlerAbortException::Handle(), IsConnected(), TGo4AnalysisMainRunnable::PostRun(), TGo4Master::TGo4Master(), and TGo4Slave::TGo4Slave().
|
virtual |
Quit this instance and the owned task; method to be called from command object, may be overridden in user implementation
Reimplemented in TGo4AnalysisClient.
Definition at line 59 of file TGo4TaskOwner.cxx.
References fxTask, and TGo4Task::Quit().
Referenced by TGo4ComMasterQuit::ExeCom(), and TGo4Task::Quit().
|
protected |
Definition at line 52 of file TGo4TaskOwner.cxx.
References fxTask, and TGo4Task::SetOwner().
Referenced by TGo4ServerTask::Shutdown(), TGo4Master::TGo4Master(), TGo4Slave::TGo4Slave(), and TGo4Task::~TGo4Task().
|
virtual |
Start the working threads of the task owner implementation; this method is used after the current connection has changed, to continue reading/writing the queues. To be overridden.
Reimplemented in TGo4AnalysisClient.
Definition at line 64 of file TGo4TaskOwner.cxx.
References TGo4Log::Debug(), fxTask, and TGo4Task::SetWorkIsStopped().
Referenced by TGo4AnalysisClient::StartWorkThreads(), and TGo4Task::StartWorkThreads().
|
virtual |
stop the working threads of the task owne implementation; this method is used before the current connection is changed to prevent reading/writing and waiting for the wrong queues. To be overridden.
Reimplemented in TGo4AnalysisClient.
Definition at line 71 of file TGo4TaskOwner.cxx.
References TGo4Log::Debug(), fxTask, and TGo4Task::SetWorkIsStopped().
Referenced by TGo4AnalysisClient::StopWorkThreads(), and TGo4Task::StopWorkThreads().
|
friend |
Definition at line 29 of file TGo4TaskOwner.h.
Referenced by TGo4Master::TGo4Master(), and TGo4Slave::TGo4Slave().
|
friend |
Definition at line 28 of file TGo4TaskOwner.h.
|
private |
Flag if master uses servertask or client task connection.
Definition at line 81 of file TGo4TaskOwner.h.
Referenced by IsServer().
|
private |
Definition at line 78 of file TGo4TaskOwner.h.
Referenced by GetName(), GetTask(), IsBeingQuit(), Quit(), SetTask(), StartWorkThreads(), StopWorkThreads(), and ~TGo4TaskOwner().