GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4AnalysisClientImp.cxx
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 #include "TGo4AnalysisClientImp.h"
15 
16 #include "TApplication.h"
17 #include "TROOT.h"
18 #include "TDatime.h"
19 #include "TDataType.h"
20 
21 #include "TGo4Log.h"
22 #include "TGo4LockGuard.h"
23 
24 #include "TGo4CommandInvoker.h"
26 #include "TGo4ComServerQuit.h"
27 #include "TGo4ThreadHandler.h"
28 #include "TGo4Task.h"
29 #include "TGo4TaskHandler.h"
32 #include "TGo4AnalysisSniffer.h"
33 #include "TGo4HistogramServer.h"
34 #include "TGo4AnalysisStatus.h"
35 #include "TGo4AnalysisImp.h"
36 #include "TGo4AnalysisStep.h"
37 
40 #include "TGo4Ratemeter.h"
41 
42 const char *TGo4AnalysisClient::fgcWATCHTHREAD = "WATCH-";
43 const char *TGo4AnalysisClient::fgcMAINTHREAD = "MAIN-";
44 const UInt_t TGo4AnalysisClient::fguSTATUSUPDATE = 1000; // events between two updates
45 const Double_t TGo4AnalysisClient::fgdSTATUSTIMEOUT = 2; // maximum seconds between two updates
46 const UInt_t TGo4AnalysisClient::fguCINTTIMERPERIOD = 200; // frequency of timer for cint lock
47 
48 
50  TGo4Analysis *analysis,
51  const char *host,
52  UInt_t negport,
53  Bool_t histoserver,
54  const char *basename,
55  const char *passwd,
56  Bool_t servermode,
57  Bool_t autorun,
58  Bool_t cintmode,
59  Bool_t loadprefs,
60  Bool_t showrate) :
61  TGo4Slave(name, servermode, host, negport),
62  fdBufferUpdateTime(0),
63  fbAutoStart(autorun),
64  fbCintMode(kFALSE),
65  fbLoadPrefs(loadprefs),
66  fbShowRate(showrate)
67 {
68  GO4TRACE((15,"TGo4AnalysisClient::TGo4AnalysisClient(const char*,...)",__LINE__, __FILE__));
69 
70  if(!analysis) {
71  TGo4Log::Debug("!!! AnalysisClient ''%s'': no external analysis specified !!",GetName());
73  } else {
74  fxAnalysis = analysis;
75  }
77 
78  Constructor(histoserver, basename, passwd);
79 
80  SetCintMode(cintmode);
81 }
82 
84  TGo4Analysis *analysis,
85  Bool_t histoserver,
86  const char *basename,
87  const char *passwd,
88  Bool_t servermode,
89  Bool_t autorun) :
90  TGo4Slave(argv[2], servermode, argv[3], (argc>4) ? atoi(argv[4]) : 5000),
92  fbAutoStart(autorun),
93  fbCintMode(kFALSE),
94  fbLoadPrefs(kTRUE),
95  fbShowRate(kFALSE)
96 {
97  GO4TRACE((15,"TGo4AnalysisClient::TGo4AnalysisClient(int, char**...)",__LINE__, __FILE__));
98 
99  if (argc < 5) {
100  TGo4Log::Error("!!! AnalysisClient: missing commandline arguments, aborting !!");
101  gApplication->Terminate();
102  }
103  if (!strcmp("-lGUI", argv[1])) {
104  TGo4Log::Error(" !!! AnalysisClient: GUI mode not specified, aborting !!");
105  gApplication->Terminate();
106  }
107 
108  if (!analysis) {
109  TGo4Log::Debug(" !!! AnalysisClient ''%s'': no external analysis specified !!", GetName());
111  } else {
112  fxAnalysis = analysis;
113  }
115  Constructor(histoserver, basename, passwd);
116 }
117 
118 void TGo4AnalysisClient::Constructor(Bool_t starthistserv, const char *basename, const char *passwd)
119 {
120  if (IsServer()) {
121  if (fxAnalysis->fServerObserverPass.Length()>0)
123  if (fxAnalysis->fServerCtrlPass.Length()>0)
125  if (fxAnalysis->fServerAdminPass.Length()>0)
127  }
128 
130  TGo4Log::Debug(" AnalysisClient ''%s'' started ",GetName());
131 
132  fcMainName = TString::Format("%s%s", fgcMAINTHREAD, GetName());
133  fcWatchName = TString::Format("%s%s", fgcWATCHTHREAD, GetName());
134 
135  TGo4AnalysisMainRunnable* mainrun =
136  new TGo4AnalysisMainRunnable(TString::Format("MainRunnable of %s",GetName()).Data(), this);
137  TGo4AnalysisWatchRunnable* watchrun =
138  new TGo4AnalysisWatchRunnable(TString::Format("WatchRunnable of %s",GetName()).Data(), this);
139 
140  // adding runnables to thread handler who takes over the responsibility...:
142  th->NewThread(fcMainName.Data(), mainrun);
143  th->NewThread(fcWatchName.Data(), watchrun);
144 
145  TGo4CommandInvoker::Instance(); // make sure we have an invoker instance!
147  TGo4CommandInvoker::Register("AnalysisClient",this); // register as command receiver at the global invoker
148  TGo4Slave::Stop();// prevent analysis to run before init
150  if(starthistserv) StartObjectServer(basename, passwd);
151  GetTask()->Launch();
152 }
153 
154 
156 {
157  GO4TRACE((15,"TGo4AnalysisClient::~TGo4AnalysisClient()",__LINE__, __FILE__));
158 // if(GetTask())
159 // {
160 // GetTask()->GetTaskHandler()->DisConnect(); // disconnect before we autosave etc.
161 // GetTask()->GetTaskHandler()->SetAborting(); // for superclass dtor: set fast abort mode
162 // }
163  fxAnalysis->LockAutoSave(); // wait until mainthread finishes the
164  // final autosaving before we cancel
165  StopObjectServer(); // first cancel histoserver and its thread!
166  if(GetThreadHandler()) // make sure threads wont work on application when its deleted
168 
170 
171  delete fxRatemeter;
172  delete fxAnalysis;
174 }
175 
176 
178 {
179  TGo4LockGuard mainguard; // threads are already up, protect next actions!
180  SendStatusMessage(1, kTRUE, TString::Format("AnalysisClient %s starting initialization...",GetName()));
181 
182  if(!fbAutoStart) { // normal mode: load last prefs and wait for submit
183 
184  // startup of analysis: get last saved status
185 
186  if (fbLoadPrefs) {
187  if(fxAnalysis->LoadStatus()) { // will load, close analysis and set the new status
188  // we have a status from file, i.e. go4 analysis: wait with init until gui command
189  SendStatusMessage(1,kTRUE, TString::Format("AnalysisClient %s: Status loaded from %s",
191  } else {
192  SendStatusMessage(2,kTRUE, TString::Format("AnalysisClient %s: Could not load status from %s",
194  }
195  }
196  // recover objects and dynamic list links from last autosave file:
197  if(!fxAnalysis->IsAutoSaveOn()){
198  SendStatusMessage(1,kTRUE, TString::Format("AnalysisClient %s: AUTOSAVE is DISABLED, Initialization did NOT load analysis objects!",
199  GetName()));
200  }
201  else if(fxAnalysis->LoadObjects()) {
202  SendStatusMessage(1,kTRUE, TString::Format("AnalysisClient %s: Objects loaded.",GetName()));
203  }
204  else {
205  //TGo4Log::Debug(" !!! Analysis Client Initialization -- Could not load dynamic list!!! ");
206  SendStatusMessage(2,kTRUE, TString::Format("AnalysisClient %s: Initialization could not load analysis objects!",GetName()));
207  }
208 
209  SendStatusMessage(1,kTRUE, TString::Format("Analysis Slave %s waiting for submit and start commands...",GetName()));
210  TGo4Slave::Stop(); // wait for command from master for start.
211  } else {
212  // in server mode, analysis slave will begin with analysis run
213  // before the master is connected. May not need master anyway!
214  // note: we do not recover preferences from file here anymore, all left to command line pars
215  SendStatusMessage(1,kTRUE, TString::Format("AnalysisSlave %s initializing analysis...",GetName()));
217  if(IsCintMode()) {
218  SendStatusMessage(1,kTRUE, TString::Format("Analysis CINTServer %s in MainCycle suspend mode.",GetName()));
219  TGo4Slave::Stop(); // no UserPostLoop
220  } else {
221  SendStatusMessage(1,kTRUE, TString::Format("AnalysisSlave %s starting analysis...",GetName()));
222  Start(); // UserPreLoop execution here!
223  }
224  } else {
225  SendStatusMessage(2,kTRUE, TString::Format("AnalysisSlave %s failed initializing analysis!",GetName()));
226  TGo4Slave::Stop();
227  }
228  } // if(!fbAutoStart)
229  SendAnalysisStatus(); // only send status if connections are up!
230  UpdateStatusBuffer(); // we need this for gui
231  //SendAnalysisClientStatus(); // JAM15 deadlock danger in analysis server mode!
232  SendStatusMessage(1,kFALSE, TString::Format("AnalysisClient %s has finished initialization.",GetName()));
233  return 0;
234 }
235 
236 
238 {
239  GO4TRACE((12,"TGo4AnalysisClient::UpdateStatus(TGo4TaskStatus *)",__LINE__, __FILE__));
240  TGo4Slave::UpdateStatus(state); // fill superclass attributes
241  TGo4AnalysisClientStatus* anstate = dynamic_cast<TGo4AnalysisClientStatus*> (state);
242  if (anstate) {
244  // new: set true running state
245  anstate->SetRunning(fxAnalysis->IsRunning());
246  // new: set name of current eventsource
247  TGo4AnalysisStep *firststep = fxAnalysis->GetAnalysisStep(nullptr);
248  if(firststep) {
249  anstate->SetCurrentSource(firststep->GetEventSourceName());
251  } else {
252  anstate->SetCurrentSource("- No event source -");
253  fxRatemeter->SetCurrentSource("- No event source -");
254  }
255  }
256 }
257 
259 {
260  GO4TRACE((12,"TGo4AnalysisClient::CreateStatus()",__LINE__, __FILE__));
261  // note: ratemeter update done by mainthread loop
263  UpdateStatus(stat); // set the internals
264  return stat;
265 }
266 
268 {
269  GO4TRACE((12,"TGo4AnalysisClient::Start()",__LINE__, __FILE__));
270  if(fxAnalysis->IsInitDone())
271  {
272  if(GetThreadHandler()) GetThreadHandler()->Start(fcMainName.Data()); // this is useful anyway...
273  if(!MainIsRunning()) fxAnalysis->PreLoop(); // only call once
275  fxRatemeter->Reset();
276  fdBufferUpdateTime = TTimeStamp().AsDouble();
277  SendStatusMessage(1,kTRUE, TString::Format("AnalysisClient %s has started analysis processing.",GetName()));
278  UpdateRate(-2); // fake rate to display green light :)
280  //SendAnalysisClientStatus(); // JAM15 deadlock danger in analysis server mode! never do this from main thread
281  }
282  else
283  {
284  // user did not initialize analysis, we do not start!
285  SendStatusMessage(2,kTRUE, TString::Format("Analysis %s was not initialized! Please SUBMIT settings first.",fxAnalysis->GetName()));
286  }
287 }
288 
290 {
291  GO4TRACE((12,"TGo4AnalysisClient::SendAnalysisObject(const char *name)",__LINE__, __FILE__));
292  TNamed *ob = fxAnalysis->GetObject(name);
293  SendObject(ob);
294 }
295 
297 {
298  GO4TRACE((12,"TGo4AnalysisClient::SendAnalysisStatus()",__LINE__, __FILE__));
299  TGo4Analysis *ana = GetAnalysis();
300  TGo4Log::Debug(" AnalysisClient - sending current analysis settings ");
301  if(ana) {
302  TGo4AnalysisStatus *state = ana->CreateStatus();
303  SendStatus(state);
304  delete state;
305  } else {
306  SendStatusMessage(3,kFALSE, "ERROR sending analysis status: no analysis ");
307  }
308 }
309 
310 
312 {
313  GO4TRACE((12,"TGo4AnalysisClient::SendAnalysisClientStatus()",__LINE__, __FILE__));
314 
315  TGo4Log::Debug(" AnalysisClient - sending current analysis client status ");
317  //TGo4Log::SetIgnoreLevel(0);
318 // TGo4Log::Debug("current rate:\t%f",fxRatemeter->GetRate());
319 // TGo4Log::Debug("average rate:\t%f",fxRatemeter->GetAvRate());
320 // TGo4Log::Debug("running time:\t%f",fxRatemeter->GetTime());
321 // TGo4Log::Debug("event number:\t%d",fxRatemeter->GetCurrentCount());
322 }
323 
325 {
326  GO4TRACE((12,"TGo4AnalysisClient::SendNamesList()",__LINE__, __FILE__));
327 
330  if(state)
331  {
332  TGo4Log::Debug(" AnalysisClient - sending names list ");
333  //SendStatus(state);
334  SendObject(state);
335  }
336  else
337  {
338  SendStatusMessage(3,kTRUE,"Analysis Client: Send Names List - ERROR: no nameslist !!! ");
339  }
340 }
341 
343 {
344  GO4TRACE((12,"TGo4AnalysisClient::KillMain()",__LINE__, __FILE__));
346  // put dummy buffer to command queue. This will wake up the main thread from command wait.
347  if(GetTask()) GetTask()->WakeCommandQueue(); // note that the dummy command will not have the termination id here!
349  SendStatusMessage(2,kTRUE,TString::Format("AnalysisClient %s has killed main analysis thread.",GetName()));
350 }
351 
353 {
354  GO4TRACE((12,"TGo4AnalysisClient::RestartMain()",__LINE__, __FILE__));
356  // put dummy buffer to command queue. This will wake up the main thread from command wait.
357  if(GetTask()) GetTask()->WakeCommandQueue(); // note that the dummy command will not have the termination id here!
358  if(GetThreadHandler()) {
360  GetThreadHandler()->Start(fcMainName.Data());
361  }
362  fxRatemeter->Reset();
363  SendStatusMessage(2,kTRUE,TString::Format("AnalysisClient %s has killed and relaunched main analysis thread.",GetName()));
364 }
365 
367 {
368  GO4TRACE((12,"TGo4AnalysisClient::Stop()",__LINE__, __FILE__));
369 
370  if(MainIsRunning()) fxAnalysis->PostLoop(); // only call postloop once
371  TGo4Slave::Stop(); // will stop for command queue wait
372  SendStatusMessage(1,kTRUE, TString::Format("AnalysisClient %s has STOPPED analysis processing.",GetName()));
373  if(GetTask()->IsTerminating()) return; // do not update status buffer from terminating state
375  UpdateRate(-1);
377 
378  //SendAnalysisClientStatus(); // JAM15 deadlock danger in analysis server mode! never do this from main thread
379 
380 // if (fxAnalysis && fxAnalysis->IsStopWorking()) {
381 // if (IsCintMode()) {
382 // fxAnalysis->ResumeWorking();
383 // } else {
384 // TGo4Log::StartTracing(); // debug
385 // fxAnalysis->CloseAnalysis();
386 // TGo4Log::CloseLogfile();
387 // exit(0);
388 // }
389 // }
390 }
391 
393 {
394  GO4TRACE((12,"TGo4AnalysisClient::UpdateRate(Int_t)",__LINE__, __FILE__));
395  if (fxRatemeter->Update(counts)) {
396 
398  fxRatemeter->SetRunning(an ? an->IsRunning() : kFALSE);
399 
400  TDatime dt;
401  fxRatemeter->SetDateTime(dt.AsSQLString());
402 
403  auto sniff = fxAnalysis->GetSniffer();
404  if (sniff) sniff->RatemeterUpdate(fxRatemeter);
405 
406  if (fbShowRate)
408  }
409 }
410 
412 {
413  return fxRatemeter->GetCurrentCount();
414 }
415 
417 {
418  return fxRatemeter->TestUpdate();
419 }
420 
422 {
423  Double_t currenttime = TTimeStamp().AsDouble();
424  Double_t deltatime = currenttime - fdBufferUpdateTime;
425  UInt_t currentcount = GetCurrentCount();
426  if( (currentcount && (currentcount % fguSTATUSUPDATE == 0) && (deltatime>0.1*fgdSTATUSTIMEOUT))
427  || (deltatime > fgdSTATUSTIMEOUT) ) {
428  // buffer shall be updated if certain number of events is processed or the time is up
429  fdBufferUpdateTime = currenttime;
430  return kTRUE;
431  }
432 
433  return kFALSE;
434 }
435 
436 
437 void TGo4AnalysisClient::StartObjectServer(const char *basename, const char *passwd)
438 {
439  StopObjectServer(); // shutdown existing one with old basename/passwd
440  fxHistoServer = new TGo4HistogramServer(this,basename,passwd,kFALSE);
441  // switch last boolean true if you want to use Go4 object server support
442  // default will only enable gsi histogram server JA 9/2005
443  //SendStatusMessage(1,kTRUE, TString::Format("AnalysisClient %s Started Object server.",GetName()));
444 }
445 
447 {
448  if(fxHistoServer) {
449  delete fxHistoServer;
450  fxHistoServer = nullptr;
451  //SendStatusMessage(1,kTRUE, TString::Format("AnalysisClient %s: Object server was stopped.",GetName()));
452  }
453 }
454 
456 {
457  Stop();
459 }
460 
461 void TGo4AnalysisClient::Terminate(Bool_t termapp)
462 {
463  SetCintMode(kFALSE);
464  StopObjectServer(); // shutdown objectserver and its threads properly
465  if(GetTask())
466  GetTask()->TGo4ThreadManager::Terminate(termapp); // stops all remaining threads and sets termination flag
467 }
468 
470 {
471  StopObjectServer(); // shutdown objectserver and its threads properly
472  TGo4Log::Debug("TGo4AnalysisClient::TerminateFast with delete analysis");
473  if(GetThreadHandler()) {
474  GetThreadHandler()->StopAll(); // this will not stop immediately, therefore:
476  GetThreadHandler()->Cancel(fcMainName.Data()); // maybe we not need this...
477  GetThreadHandler()->Cancel(GetTask()->GetTaskHandler()->GetDatName());
478  GetThreadHandler()->Cancel(GetTask()->GetTaskHandler()->GetStatName());
479  }
480  delete fxAnalysis;
481  fxAnalysis = nullptr;
482  gApplication->Terminate();
483 }
484 
486 {
487  if(GetTask()) {
489  //TGo4Log::StartTracing(); // debug
490  GetTask()->SubmitLocalCommand(com); // shutdown will be performed in local command thread
491  }
492 }
493 
494 void TGo4AnalysisClient::ExecuteString(const char *command)
495 {
496  if(strstr(command,"ANHServStart")) {
497  TString buffer = command;
498  strtok((char *) buffer.Data(), ":"); // first find the command itself
499  TString base = strtok(nullptr, ":");
500  TString pass = strtok(nullptr, ":");
501  StartObjectServer(base.Data(), pass.Data());
502  } else if (!strcmp(command,"ANHServStop")) {
504  } else{
505  fxAnalysis->ExecuteLine(command); // all scripting is handled in analysis singleton
506  fflush(stdout);
507  }
508 }
509 
511 {
513  if(GetThreadHandler()) {
514  GetThreadHandler()->Start(fcMainName.Data());
516  }
517  return 0;
518 }
519 
521 {
523  if(GetThreadHandler()) {
524  GetThreadHandler()->Stop(fcMainName.Data());
525  GetThreadHandler()->Stop(fcWatchName.Data());
526  }
527  return 0;
528 }
529 
531 {
532  fbCintMode = on;
533 
534  if (fbCintMode) {
535  gROOT->SetBatch(kFALSE);
536  fxAnalysis->SetAutoSave(kFALSE);
537  }
538 }
539 
540 void TGo4AnalysisClient::SendStatusMessage(Int_t level, Bool_t printout, const TString &text)
541 {
542  TGo4Slave::SendStatusMessage(level, printout, text);
543 
544  auto sniff = fxAnalysis->GetSniffer();
545  if (sniff) sniff->StatusMessage(level, printout, text);
546 }
Bool_t IsAutoSaveOn() const
const char * GetName() const
void SendObject(TObject *obj, const char *receiver=nullptr)
Definition: TGo4Slave.cxx:115
TGo4HistogramServer * fxHistoServer
TGo4AnalysisSniffer * GetSniffer() const
TGo4ThreadHandler * GetThreadHandler()
Definition: TGo4Slave.cxx:133
void SendStatusBuffer()
Definition: TGo4Slave.cxx:139
Bool_t TestUpdate()
virtual void StatusMessage(int level, Bool_t printout, const TString &)
Bool_t SubmitLocalCommand(TGo4Command *com)
Definition: TGo4Task.cxx:508
const char * GetName() const override
void SetDateTime(const char *str)
Definition: TGo4Ratemeter.h:70
void WakeCommandQueue(Int_t id=0)
Definition: TGo4Task.cxx:522
virtual void UpdateStatus(TGo4TaskStatus *state)
Definition: TGo4Slave.cxx:104
static void SetCommandList(TGo4CommandProtoList *list)
static void UnRegister(TGo4CommandReceiver *p)
virtual void CloseAnalysis()
static void SetObservAccount(const char *name, const char *passwd)
void SetCurrentSource(const char *str)
Definition: TGo4Ratemeter.h:71
TGo4Task * GetTask() const
Definition: TGo4TaskOwner.h:42
TGo4AnalysisObjectNames * GetNamesList() const
void Constructor(Bool_t starthistserv=kFALSE, const char *basename="Go4", const char *passwd="abcd")
void SetCintMode(Bool_t on=kTRUE)
TString fServerCtrlPass
static const char * fgcDEFAULTSTATUSFILENAME
void SetRates(Double_t rate, Double_t average, ULong64_t counts, Double_t time)
static void SetCtrlAccount(const char *name, const char *passwd)
TString fServerAdminPass
Bool_t ReCreate(const char *thname)
static void Register(const char *name, TGo4CommandReceiver *p)
virtual void RatemeterUpdate(TGo4Ratemeter *)
void ExecuteString(const char *command) override
void Terminate(Bool_t termapp=kTRUE) override
Bool_t IsInitDone() const
void SendStatusMessage(Int_t level, Bool_t printout, const TString &text) override
Bool_t NewThread(const char *name, TGo4Runnable *runnable)
void SetRunning(Bool_t on=kTRUE)
Definition: TGo4Ratemeter.h:69
void UpdateStatus(TGo4TaskStatus *state) override
virtual Int_t StopWorkThreads()
virtual void Start()
Definition: TGo4Slave.cxx:63
virtual void Stop()
Definition: TGo4Slave.cxx:70
TGo4AnalysisStep * GetAnalysisStep(const char *name)
Bool_t LoadObjects(const char *filename=nullptr)
Double_t GetRate() const
Definition: TGo4Ratemeter.h:50
static void Debug(const char *text,...) GO4_PRINTF_ARGS
Definition: TGo4Log.cxx:281
static const Double_t fgdSTATUSTIMEOUT
static const char * fgcMAINTHREAD
void SendAnalysisObject(const char *name)
void SetAutoSave(Bool_t on=kTRUE)
Bool_t IsServer() const
Definition: TGo4TaskOwner.h:40
Long64_t ExecuteLine(const char *command, Int_t *errcode=nullptr)
TString fServerObserverPass
static TGo4CommandInvoker * Instance()
void SetCurrentSource(const char *name)
static const char * fgcWATCHTHREAD
Bool_t Stop(const char *thname)
TGo4Analysis * GetAnalysis() const
const char * GetEventSourceName() const
void SendStatus(TGo4Status *stat, const char *receiver=nullptr)
Definition: TGo4Slave.cxx:121
Bool_t Start(const char *thname)
Bool_t Cancel(const char *thname)
virtual void SendStatusMessage(Int_t level, Bool_t printout, const TString &text)
Definition: TGo4Slave.cxx:145
TNamed * GetObject(const char *name, const char *folder=nullptr)
static void Error(const char *text,...) GO4_PRINTF_ARGS
Definition: TGo4Log.cxx:320
Bool_t Update(Int_t increment=1)
virtual Bool_t InitEventClasses()
Int_t StopWorkThreads() override
static void PrintRate(ULong64_t cnt, double rate)
Definition: TGo4Log.cxx:270
void SetAnalysisClient(TGo4AnalysisClient *cli)
#define GO4TRACE(X)
Definition: TGo4Log.h:25
Bool_t MainIsRunning() const
Definition: TGo4Slave.h:95
Bool_t IsRunning() const
TGo4TaskStatus * CreateStatus() override
Int_t StartWorkThreads() override
TGo4Ratemeter * fxRatemeter
ULong64_t GetCurrentCount() const
Definition: TGo4Ratemeter.h:54
void UpdateStatusBuffer()
Definition: TGo4Slave.cxx:152
static void SetAdminAccount(const char *name, const char *passwd)
static const UInt_t fguCINTTIMERPERIOD
TGo4AnalysisStatus * CreateStatus()
void UpdateRate(Int_t counts=1)
Int_t Initialization() override
Bool_t LoadStatus(const char *filename=nullptr)
Double_t GetAvRate() const
Definition: TGo4Ratemeter.h:56
static const UInt_t fguSTATUSUPDATE
static TGo4Analysis * Instance()
Double_t GetTime() const
Definition: TGo4Ratemeter.h:52
virtual Int_t StartWorkThreads()
void StartObjectServer(const char *basename, const char *passwd)