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