Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4TaskHandlerExample/TGo4LoggingRunnable.cxx

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include "TGo4LoggingRunnable.h"
00017 
00018 #include "TGo4ExampleServer.h"
00019 #include "TGo4ExampleController.h"
00020 
00021 TGo4LoggingRunnable::TGo4LoggingRunnable(const char* name, TGo4ExampleServer* serv)
00022 : TGo4Runnable(name,serv)
00023 {
00024    TRACE((15,"TGo4LoggingRunnable::TGo4LoggingRunnable(Text_t*,TGo4ExampleServer*) constructor",__LINE__, __FILE__));
00025    fxController=serv->GetController();
00026    fxServer=serv;
00027 }
00028 
00029 TGo4LoggingRunnable::~TGo4LoggingRunnable()
00030 {
00031    TRACE((15,"TGo4LoggingRunnable::TGo4LoggingRunnable(Text_t*,TGo4ExampleServer*) constructor",__LINE__, __FILE__));
00032 }
00033 
00034 Int_t TGo4LoggingRunnable::Run(void*)
00035 {
00036    TRACE((12,"TGo4LoggingRunnable::Run()",__LINE__, __FILE__));
00037    TGo4TaskHandler* currenttask=fxServer->GetCurrentTaskHandler();
00038    if(currenttask==0)
00039       {
00040          TRACE((11,"TGo4LoggingRunnable::Run()-- no current client existing",__LINE__, __FILE__));
00041          TGo4Thread::Sleep(5000);
00042          // no client has connected to server so far, we do nothing!
00043       }
00044    else
00045       {
00046          TRACE((11,"TGo4LoggingRunnable::Run()-- working on client's taskhandler queues",__LINE__, __FILE__));
00047          TGo4Status* status= fxServer->NextStatus();
00048          fxController->DisplayLog(status);
00049       }
00050    return 0;
00051 }
00052 
00053 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:07 2005 for Go4-v2.10-5 by doxygen1.2.15