Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "TGo4ControllerRunnable.h"
00015
00016 #include "TGo4Log.h"
00017 #include "TGo4Thread.h"
00018 #include "TGo4ExampleServer.h"
00019 #include "TGo4ExampleController.h"
00020
00021 const UInt_t TGo4ControllerRunnable::fguCOMMANDINTERVAL=10000;
00022
00023 TGo4ControllerRunnable::TGo4ControllerRunnable(const char* name, TGo4ExampleServer* serv)
00024 : TGo4Runnable(name,serv)
00025 {
00026 GO4TRACE((15,"TGo4ControllerRunnable::TGo4ControllerRunnable(const char*,TGo4ExampleServer*) constructor",__LINE__, __FILE__));
00027 fxController=serv->GetController();
00028 fxServer=serv;
00029 }
00030
00031 TGo4ControllerRunnable::~TGo4ControllerRunnable()
00032 {
00033 GO4TRACE((15,"TGo4ControllerRunnable::~TGo4ControllerRunnable() destructor",__LINE__, __FILE__));
00034 }
00035
00036 Int_t TGo4ControllerRunnable::Run(void*)
00037 {
00038 GO4TRACE((12,"TGo4ControllerRunnable::Run()",__LINE__, __FILE__));
00039
00040
00041 TGo4TaskHandler* currenttask=fxServer->GetCurrentTaskHandler();
00042 if(currenttask==0)
00043 {
00044 GO4TRACE((11,"TGo4ControllerRunnable::Run()-- no current client existing",__LINE__, __FILE__));
00045 TGo4Thread::Sleep(fguCOMMANDINTERVAL);
00046
00047 }
00048 else
00049 {
00050 GO4TRACE((11,"TGo4ControllerRunnable::Run()-- working on client's taskhandler queues",__LINE__, __FILE__));
00051
00052 TGo4Thread::Sleep(fguCOMMANDINTERVAL);
00053
00054 TGo4Command* com=fxController->GetCommand();
00055 fxServer->SubmitCommand(com);
00056
00057 fxServer->SubmitCommand("EXAction2");
00058 TObject* data= fxServer->NextObject();
00059 fxController->DisplayData(data);
00060 }
00061 return 0;
00062
00063 }