GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4LoggingRunnable.cxx
Go to the documentation of this file.
1 // $Id: TGo4LoggingRunnable.cxx 2757 2020-04-16 11:45:21Z 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 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 "TGo4LoggingRunnable.h"
15 
16 #include "TGo4Log.h"
17 #include "TGo4Thread.h"
18 #include "TGo4ExampleServer.h"
19 
21 : TGo4Runnable(name,serv)
22 {
23  GO4TRACE((15,"TGo4LoggingRunnable::TGo4LoggingRunnable(const char*,TGo4ExampleServer*) constructor",__LINE__, __FILE__));
25  fxServer=serv;
26 }
27 
29 {
30  GO4TRACE((15,"TGo4LoggingRunnable::TGo4LoggingRunnable() constructor",__LINE__, __FILE__));
31 }
32 
34 {
35  GO4TRACE((12,"TGo4LoggingRunnable::Run()",__LINE__, __FILE__));
37  if(currenttask==0) {
38  GO4TRACE((11,"TGo4LoggingRunnable::Run()-- no current client existing",__LINE__, __FILE__));
39  TGo4Thread::Sleep(5000);
40  // no client has connected to server so far, we do nothing!
41  } else {
42  GO4TRACE((11,"TGo4LoggingRunnable::Run()-- working on client's taskhandler queues",__LINE__, __FILE__));
43  TGo4Status* status= fxServer->NextStatus();
44  fxController->DisplayLog(status);
45  }
46  return 0;
47 }
static void Sleep(UInt_t millisecs)
Definition: TGo4Thread.cxx:336
TGo4ExampleController * fxController
TGo4ExampleServer * fxServer
#define GO4TRACE(X)
Definition: TGo4Log.h:26
TGo4ExampleController * GetController()
void DisplayLog(TGo4Status *)
TGo4Status * NextStatus(Bool_t wait=kTRUE)
Definition: TGo4Task.cxx:161
TGo4TaskHandler * GetCurrentTaskHandler()
virtual Int_t Run(void *)