#include <TGo4AnalysisClientImp.h>
Inheritance diagram for TGo4AnalysisClient:
Public Methods | |
TGo4AnalysisClient (const char *name, TGo4Analysis *analysis, const char *host="localhost", UInt_t negport=0, Bool_t histoserver=kFALSE, const char *basename="Go4", const char *passwd="abcd", Bool_t servermode=kFALSE, Bool_t autorun=kFALSE, Bool_t clientmode=kFALSE) | |
TGo4AnalysisClient (int argc, char **argv, TGo4Analysis *analysis, Bool_t histoserver=kFALSE, const char *basename="Go4", const char *passwd="abcd", Bool_t servermode=kFALSE, Bool_t autorun=kFALSE) | |
virtual | ~TGo4AnalysisClient () |
TGo4Analysis * | GetAnalysis () const |
virtual void | Start () |
General start method of slave application to be called from remote command; should be re-implemented by application. More... | |
virtual void | Stop () |
General stop method of slave application to be called from remote command; should be re-implemented by application. More... | |
virtual void | KillMain () |
Kill the main thread; method to be called from command, should be overridden in user implementation. More... | |
virtual void | RestartMain () |
Restart the main thread; method to be called from command, should be overridden in user implementation. More... | |
virtual TGo4TaskStatus * | CreateStatus () |
create a status object with information on the current client state. More... | |
virtual Int_t | Initialization () |
Override the ClientTask/ThreadManager Initialization used by AppControlTimer to init event classes before the threads are started. More... | |
void | SendAnalysisObject (const Text_t *name) |
Fetch object of name from analysis instance and put it into the data queue of the client. More... | |
void | SendAnalysisStatus () |
Send a complete status object of the analysis via the status queue. More... | |
void | SendAnalysisClientStatus () |
Send a complete status object of the analysis client via the status queue. More... | |
void | SendNamesList () |
Send the list of object names (folder structure) as status object to the gui. More... | |
void | UpdateRate (Int_t counts=1) |
Update ratemeter. More... | |
UInt_t | GetCurrentCount () |
Number of currently processed events since last start. More... | |
Bool_t | TestRatemeter () |
Test if ratemeter has been updated. More... | |
Bool_t | TestBufferUpdateConditions () |
Test if status buffer shall be updated now. More... | |
void | StartObjectServer (const Text_t *basename, const Text_t *passwd) |
Start the object (histogram) server. More... | |
void | StopObjectServer () |
Stop the object (histogram) server. More... | |
virtual Int_t | StartWorkThreads () |
start the working threads of the slave implementation;. More... | |
virtual Int_t | StopWorkThreads () |
stop the working threads of the slave implementation;. More... | |
virtual void | Terminate () |
Overwrites the Threadmanager Terminate to shutdown the objectserver properly. More... | |
virtual void | TerminateFast () |
Overwrites the Threadmanager TerminateFast to shutdown the objectserver properly. More... | |
virtual void | ExecuteString (const Text_t *command) |
Execute string command. More... | |
void | SetCintMode (Bool_t on=kTRUE) |
Bool_t & | IsCintMode () |
Static Public Attributes | |
const Text_t | fgcMAINTHREAD [] = "MAIN-" |
suffix for main thread name. More... | |
const Text_t | fgcWATCHTHREAD [] = "WATCH-" |
suffix for watch thread name. More... | |
const UInt_t | fguSTATUSUPDATE = 1000 |
Number of mainloop runs between two updates of the client status object. More... | |
const Double_t | fgdSTATUSTIMEOUT = 2 |
Maximum time (in s) between two updates of the client status object. More... | |
const UInt_t | fguCINTTIMERPERIOD = 200 |
Timer period (in ms) for cint locking timer. More... | |
Private Methods | |
void | Constructor (Bool_t starthistserv=kFALSE, const char *basename="Go4", const char *passwd="abcd") |
void | UpdateStatus (TGo4TaskStatus *state) |
Method needed by method CreateStatus of any status subclasses to set the values of the clienttask specific part of the status object. More... | |
TGo4AnalysisClient () | |
Private Attributes | |
TGo4Analysis * | fxAnalysis |
The analysis the client is working on. More... | |
Text_t * | fcMainName |
remember name of main thread. More... | |
Text_t * | fcWatchName |
remember name of watch thread. More... | |
Double_t | fdBufferUpdateTime |
absoulute time of the last status buffer update. More... | |
TStopwatch * | fxUpdateWatch |
Stopwatch controlling the buffer update time. More... | |
TGo4Ratemeter * | fxRatemeter |
More... | |
TGo4HistogramServer * | fxHistoServer |
More... | |
Bool_t | fbAutoStart |
If true, this slave will initialize and start analysis immediately without waiting for a submit/start command. More... | |
Bool_t | fbCintMode |
If true, this slave runs to control CINT macro. More... | |
TTimer * | fxCintLockTimer |
For cintmode, we only allow to release the main lock within a certain time window, triggered by this timer. More... | |
TGo4InterruptHandler * | fxInterruptHandler |
use to treat Ctrl-C interrupts in CINT mode. More... |
Definition at line 37 of file TGo4AnalysisClientImp.h.
|
Definition at line 90 of file TGo4AnalysisClientImp.cxx. References Constructor(), TGo4Log::Debug(), fxAnalysis, fxInterruptHandler, TGo4TaskOwner::GetName(), TGo4Analysis::Instance(), TGo4Analysis::SetAnalysisClient(), SetCintMode(), and TRACE. |
|
Definition at line 128 of file TGo4AnalysisClientImp.cxx. References argv, Constructor(), TGo4Log::Debug(), TGo4Log::Error(), fxAnalysis, TGo4TaskOwner::GetName(), TGo4Analysis::Instance(), TGo4Analysis::SetAnalysisClient(), and TRACE. |
|
Definition at line 195 of file TGo4AnalysisClientImp.cxx. References TGo4ThreadHandler::CancelAll(), TGo4TaskHandler::DisConnect(), fcMainName, fcWatchName, fxAnalysis, fxCintLockTimer, fxInterruptHandler, fxRatemeter, fxUpdateWatch, TGo4TaskOwner::GetTask(), TGo4Task::GetTaskHandler(), TGo4Slave::GetThreadHandler(), TGo4Analysis::LockAutoSave(), TGo4TaskHandler::SetAborting(), StopObjectServer(), TRACE, and TGo4Analysis::UnLockAutoSave(). |
|
|
|
Definition at line 60 of file TGo4AnalysisClientImp.h. References fxAnalysis. Referenced by SendAnalysisStatus(), and TGo4HistogramServer::TGo4HistogramServer(). |
|
General start method of slave application to be called from remote command; should be re-implemented by application.
Reimplemented from TGo4Slave. Definition at line 324 of file TGo4AnalysisClientImp.cxx. References fcMainName, fdBufferUpdateTime, fxAnalysis, fxRatemeter, fxUpdateWatch, TGo4TaskOwner::GetName(), TGo4Slave::GetThreadHandler(), TGo4Analysis::IsInitDone(), TGo4Slave::MainIsRunning(), TGo4Analysis::PreLoop(), TGo4Ratemeter::Reset(), SendAnalysisClientStatus(), TGo4Slave::SendStatusMessage(), TGo4Slave::Start(), TGo4ThreadHandler::Start(), TRACE, UpdateRate(), and TGo4Slave::UpdateStatusBuffer(). Referenced by Initialization(), and TGo4Analysis::SetRunning(). |
|
General stop method of slave application to be called from remote command; should be re-implemented by application.
Reimplemented from TGo4Slave. Definition at line 429 of file TGo4AnalysisClientImp.cxx. References fxAnalysis, TGo4TaskOwner::GetName(), TGo4Slave::MainIsRunning(), TGo4Analysis::PostLoop(), SendAnalysisClientStatus(), TGo4Slave::SendStatusMessage(), TGo4Slave::Stop(), TRACE, UpdateRate(), and TGo4Slave::UpdateStatusBuffer(). Referenced by TGo4Analysis::Process(), TGo4AnalysisMainRunnable::Run(), and TGo4Analysis::SetRunning(). |
|
Kill the main thread; method to be called from command, should be overridden in user implementation.
Reimplemented from TGo4Slave. Definition at line 404 of file TGo4AnalysisClientImp.cxx. References TGo4ThreadHandler::Cancel(), fcMainName, TGo4TaskOwner::GetName(), TGo4TaskOwner::GetTask(), TGo4Slave::GetThreadHandler(), TGo4Slave::SendStatusMessage(), TGo4ThreadHandler::Stop(), TRACE, and TGo4Task::WakeCommandQueue(). |
|
Restart the main thread; method to be called from command, should be overridden in user implementation.
Reimplemented from TGo4Slave. Definition at line 414 of file TGo4AnalysisClientImp.cxx. References fcMainName, fxRatemeter, TGo4TaskOwner::GetName(), TGo4TaskOwner::GetTask(), TGo4Slave::GetThreadHandler(), TGo4ThreadHandler::ReCreate(), TGo4Ratemeter::Reset(), TGo4Slave::SendStatusMessage(), TGo4ThreadHandler::Start(), TGo4ThreadHandler::Stop(), TRACE, and TGo4Task::WakeCommandQueue(). |
|
create a status object with information on the current client state. this object may be sent to the server or may be used to restore current status by memento mechanism. Overridden from superclass Reimplemented from TGo4Slave. Definition at line 315 of file TGo4AnalysisClientImp.cxx. References TGo4TaskOwner::GetName(), TRACE, and UpdateStatus(). |
|
Override the ClientTask/ThreadManager Initialization used by AppControlTimer to init event classes before the threads are started.
Reimplemented from TGo4Slave. Definition at line 229 of file TGo4AnalysisClientImp.cxx. References fbAutoStart, TGo4Analysis::fgcDEFAULTSTATUSFILENAME, fxAnalysis, TGo4TaskOwner::GetName(), TGo4Analysis::InitEventClasses(), IsCintMode(), TGo4Analysis::LoadObjects(), TGo4Analysis::LoadStatus(), SendAnalysisClientStatus(), SendAnalysisStatus(), TGo4Slave::SendStatusMessage(), Start(), TGo4Slave::Stop(), and TGo4Slave::UpdateStatusBuffer(). |
|
Fetch object of name from analysis instance and put it into the data queue of the client. Send an error status object via status queue if there is no such object. Definition at line 348 of file TGo4AnalysisClientImp.cxx. References fxAnalysis, TGo4Analysis::GetObject(), TGo4Slave::SendObject(), and TRACE. |
|
Send a complete status object of the analysis via the status queue.
Definition at line 355 of file TGo4AnalysisClientImp.cxx. References TGo4Analysis::CreateStatus(), TGo4Log::Debug(), GetAnalysis(), TGo4Slave::SendStatus(), TGo4Slave::SendStatusMessage(), and TRACE. Referenced by Initialization(). |
|
Send a complete status object of the analysis client via the status queue.
Definition at line 373 of file TGo4AnalysisClientImp.cxx. References TGo4Log::Debug(), TGo4Slave::SendStatusBuffer(), and TRACE. Referenced by Initialization(), TGo4AnalysisWatchRunnable::Run(), Start(), and Stop(). |
|
Send the list of object names (folder structure) as status object to the gui.
Definition at line 386 of file TGo4AnalysisClientImp.cxx. References TGo4Log::Debug(), fxAnalysis, TGo4Analysis::GetNamesList(), TGo4Slave::SendObject(), TGo4Slave::SendStatusMessage(), TRACE, and TGo4Analysis::UpdateNamesList(). |
|
Update ratemeter. To be used from main thread. Definition at line 442 of file TGo4AnalysisClientImp.cxx. References fxRatemeter, TRACE, and TGo4Ratemeter::Update(). Referenced by TGo4Analysis::MainCycle(), TGo4AnalysisWatchRunnable::Run(), Start(), and Stop(). |
|
Number of currently processed events since last start.
Definition at line 447 of file TGo4AnalysisClientImp.cxx. References fxRatemeter, and TGo4Ratemeter::GetCurrentCount(). Referenced by TestBufferUpdateConditions(). |
|
Test if ratemeter has been updated.
Definition at line 452 of file TGo4AnalysisClientImp.cxx. References fxRatemeter, and TGo4Ratemeter::TestUpdate(). Referenced by TGo4AnalysisWatchRunnable::Run(). |
|
Test if status buffer shall be updated now.
Definition at line 457 of file TGo4AnalysisClientImp.cxx. References fdBufferUpdateTime, fgdSTATUSTIMEOUT, fguSTATUSUPDATE, fxUpdateWatch, and GetCurrentCount(). Referenced by TGo4Analysis::MainCycle(). |
|
Start the object (histogram) server. Existing server will be stopped and replaced by new server with different basename and password. Definition at line 477 of file TGo4AnalysisClientImp.cxx. References fxHistoServer, and StopObjectServer(). Referenced by Constructor(), and ExecuteString(). |
|
Stop the object (histogram) server.
Definition at line 485 of file TGo4AnalysisClientImp.cxx. References fxHistoServer. Referenced by ExecuteString(), StartObjectServer(), Terminate(), TerminateFast(), and ~TGo4AnalysisClient(). |
|
start the working threads of the slave implementation;.
Reimplemented from TGo4TaskOwner. Definition at line 567 of file TGo4AnalysisClientImp.cxx. References fcMainName, fcWatchName, TGo4Slave::GetThreadHandler(), TGo4ThreadHandler::Start(), and TGo4TaskOwner::StartWorkThreads(). |
|
stop the working threads of the slave implementation;.
Reimplemented from TGo4TaskOwner. Definition at line 579 of file TGo4AnalysisClientImp.cxx. References fcMainName, fcWatchName, TGo4Slave::GetThreadHandler(), TGo4ThreadHandler::Stop(), and TGo4TaskOwner::StopWorkThreads(). |
|
Overwrites the Threadmanager Terminate to shutdown the objectserver properly.
Definition at line 497 of file TGo4AnalysisClientImp.cxx. References TGo4TaskOwner::GetTask(), and StopObjectServer(). |
|
Overwrites the Threadmanager TerminateFast to shutdown the objectserver properly.
Reimplemented from TGo4Slave. Definition at line 505 of file TGo4AnalysisClientImp.cxx. References TGo4ThreadHandler::Cancel(), TGo4Log::Debug(), fcMainName, fcWatchName, fxAnalysis, TGo4TaskOwner::GetTask(), TGo4Slave::GetThreadHandler(), TGo4ThreadHandler::StopAll(), and StopObjectServer(). |
|
Execute string command. Overrides base class implementation to decouple some commands from analysis client. Reimplemented from TGo4Slave. Definition at line 522 of file TGo4AnalysisClientImp.cxx. References TGo4Slave::ExecuteString(), TGo4ThreadManager::fguTEXTLENGTH, StartObjectServer(), and StopObjectServer(). Referenced by TGo4ComStopHistoServ::ExeCom(), and TGo4ComStartHistoServ::ExeCom(). |
|
Definition at line 591 of file TGo4AnalysisClientImp.cxx. References fbCintMode, fguCINTTIMERPERIOD, fxAnalysis, fxCintLockTimer, and TGo4Analysis::SetAutoSave(). Referenced by TGo4AnalysisClient(). |
|
Definition at line 142 of file TGo4AnalysisClientImp.h. References fbCintMode. Referenced by Initialization(), and TGo4AnalysisMainRunnable::Run(). |
|
Definition at line 166 of file TGo4AnalysisClientImp.cxx. References TGo4Log::Debug(), fcMainName, fcWatchName, fgcMAINTHREAD, fgcWATCHTHREAD, TGo4ThreadManager::fguTEXTLENGTH, fxInterruptHandler, fxRatemeter, fxUpdateWatch, TGo4TaskOwner::GetName(), TGo4TaskOwner::GetTask(), TGo4Slave::GetThreadHandler(), TGo4CommandInvoker::Instance(), TGo4ThreadManager::Launch(), TGo4ThreadHandler::NewThread(), TGo4CommandInvoker::Register(), StartObjectServer(), TGo4Slave::Stop(), and TGo4Slave::UpdateStatusBuffer(). Referenced by TGo4AnalysisClient(). |
|
Method needed by method CreateStatus of any status subclasses to set the values of the clienttask specific part of the status object.
Reimplemented from TGo4Slave. Definition at line 297 of file TGo4AnalysisClientImp.cxx. References fxRatemeter, TGo4Ratemeter::GetAvRate(), TGo4Ratemeter::GetCurrentCount(), TGo4Ratemeter::GetRate(), TGo4Ratemeter::GetTime(), n, TGo4AnalysisClientStatus::SetRates(), TRACE, and TGo4Slave::UpdateStatus(). Referenced by CreateStatus(). |
|
suffix for main thread name.
Definition at line 85 of file TGo4AnalysisClientImp.cxx. Referenced by Constructor(). |
|
suffix for watch thread name.
Definition at line 84 of file TGo4AnalysisClientImp.cxx. Referenced by Constructor(). |
|
Number of mainloop runs between two updates of the client status object.
Definition at line 86 of file TGo4AnalysisClientImp.cxx. Referenced by TestBufferUpdateConditions(). |
|
Maximum time (in s) between two updates of the client status object.
Definition at line 87 of file TGo4AnalysisClientImp.cxx. Referenced by TestBufferUpdateConditions(). |
|
Timer period (in ms) for cint locking timer.
Definition at line 88 of file TGo4AnalysisClientImp.cxx. Referenced by SetCintMode(). |
|
The analysis the client is working on.
Definition at line 174 of file TGo4AnalysisClientImp.h. Referenced by GetAnalysis(), Initialization(), SendAnalysisObject(), SendNamesList(), SetCintMode(), Start(), Stop(), TerminateFast(), TGo4AnalysisClient(), and ~TGo4AnalysisClient(). |
|
remember name of main thread.
Definition at line 177 of file TGo4AnalysisClientImp.h. Referenced by Constructor(), KillMain(), RestartMain(), Start(), StartWorkThreads(), StopWorkThreads(), TerminateFast(), and ~TGo4AnalysisClient(). |
|
remember name of watch thread.
Definition at line 180 of file TGo4AnalysisClientImp.h. Referenced by Constructor(), StartWorkThreads(), StopWorkThreads(), TerminateFast(), and ~TGo4AnalysisClient(). |
|
absoulute time of the last status buffer update. Reset by TestBufferUpdateCondition Definition at line 183 of file TGo4AnalysisClientImp.h. Referenced by Start(), and TestBufferUpdateConditions(). |
|
Stopwatch controlling the buffer update time.
Definition at line 186 of file TGo4AnalysisClientImp.h. Referenced by Constructor(), Start(), TestBufferUpdateConditions(), and ~TGo4AnalysisClient(). |
|
Definition at line 190 of file TGo4AnalysisClientImp.h. Referenced by Constructor(), GetCurrentCount(), RestartMain(), Start(), TestRatemeter(), UpdateRate(), UpdateStatus(), and ~TGo4AnalysisClient(). |
|
Definition at line 195 of file TGo4AnalysisClientImp.h. Referenced by StartObjectServer(), and StopObjectServer(). |
|
If true, this slave will initialize and start analysis immediately without waiting for a submit/start command.
Definition at line 199 of file TGo4AnalysisClientImp.h. Referenced by Initialization(). |
|
If true, this slave runs to control CINT macro. Will have effect on some initialization behaviour. Definition at line 203 of file TGo4AnalysisClientImp.h. Referenced by IsCintMode(), and SetCintMode(). |
|
For cintmode, we only allow to release the main lock within a certain time window, triggered by this timer.
Definition at line 208 of file TGo4AnalysisClientImp.h. Referenced by SetCintMode(), and ~TGo4AnalysisClient(). |
|
use to treat Ctrl-C interrupts in CINT mode.
Definition at line 211 of file TGo4AnalysisClientImp.h. Referenced by Constructor(), TGo4AnalysisClient(), and ~TGo4AnalysisClient(). |