GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4LoggingRunnable.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 "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 *)",__LINE__, __FILE__));
25 fxServer=serv;
26}
27
29{
30 GO4TRACE((15,"TGo4LoggingRunnable::TGo4LoggingRunnable()",__LINE__, __FILE__));
31}
32
34{
35 GO4TRACE((12,"TGo4LoggingRunnable::Run()",__LINE__, __FILE__));
36 TGo4TaskHandler *currenttask=fxServer->GetCurrentTaskHandler();
37 if(!currenttask) {
38 GO4TRACE((11,"TGo4LoggingRunnable::Run()-- no current client existing",__LINE__, __FILE__));
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}
#define GO4TRACE(X)
Definition TGo4Log.h:25
example class for a server task that fits to the example application
TGo4ExampleController * GetController()
TGo4ExampleServer * fxServer
TGo4ExampleController * fxController
1
Int_t Run(void *) override
The working function which runs in the thread.
TGo4Runnable(const TGo4Runnable &right)
This class is responsible for the interconnection of two tasks: provided are three communication chan...
static void Sleep(UInt_t millisecs)
wrapper for gSystem->Sleep with consecutive TThread::CancelPoint - necessary for proper pthread termi...