GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4LoggingRunnable.cxx
Go to the documentation of this file.
1 // $Id: TGo4LoggingRunnable.cxx 999 2013-07-25 11:58:59Z 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 "TGo4LoggingRunnable.h"
15 
16 #include "TGo4Log.h"
17 #include "TGo4Thread.h"
18 #include "TGo4ExampleServer.h"
19 #include "TGo4ExampleController.h"
20 
22 : TGo4Runnable(name,serv)
23 {
24  GO4TRACE((15,"TGo4LoggingRunnable::TGo4LoggingRunnable(const char*,TGo4ExampleServer*) constructor",__LINE__, __FILE__));
26  fxServer=serv;
27 }
28 
30 {
31  GO4TRACE((15,"TGo4LoggingRunnable::TGo4LoggingRunnable() constructor",__LINE__, __FILE__));
32 }
33 
35 {
36  GO4TRACE((12,"TGo4LoggingRunnable::Run()",__LINE__, __FILE__));
38  if(currenttask==0) {
39  GO4TRACE((11,"TGo4LoggingRunnable::Run()-- no current client existing",__LINE__, __FILE__));
40  TGo4Thread::Sleep(5000);
41  // no client has connected to server so far, we do nothing!
42  } else {
43  GO4TRACE((11,"TGo4LoggingRunnable::Run()-- working on client's taskhandler queues",__LINE__, __FILE__));
44  TGo4Status* status= fxServer->NextStatus();
45  fxController->DisplayLog(status);
46  }
47  return 0;
48 }
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:179
TGo4TaskHandler * GetCurrentTaskHandler()
virtual Int_t Run(void *)