00001 // $Id: TGo4ObjConnectorRunnable.cxx 934 2013-01-29 15:59:24Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #include "TGo4ObjConnectorRunnable.h" 00015 00016 #include "Riostream.h" 00017 00018 #include "TGo4Thread.h" 00019 #include "TGo4Task.h" 00020 #include "TGo4HistogramServer.h" 00021 #include "TGo4AnalysisClientImp.h" 00022 00023 TGo4ObjConnectorRunnable::TGo4ObjConnectorRunnable(const char* name, TGo4HistogramServer* hserv) 00024 : TGo4Runnable(name, hserv->GetAnalysisClient()->GetTask()) 00025 { 00026 fxHistogramServer=hserv; 00027 } 00028 00029 TGo4ObjConnectorRunnable::TGo4ObjConnectorRunnable() : TGo4Runnable(0,0) 00030 { 00031 } 00032 00033 TGo4ObjConnectorRunnable::~TGo4ObjConnectorRunnable() 00034 { 00035 } 00036 00037 Int_t TGo4ObjConnectorRunnable::Run(void*) 00038 { 00039 if(!fxHistogramServer) 00040 { 00041 std::cerr <<"error, no histogram server!!" << std::endl; 00042 fxGo4Thread->Stop(); 00043 return -1; 00044 } 00045 Int_t rev=fxHistogramServer->ServeObjectClient(); 00046 if(rev< -1) 00047 { 00048 fxGo4Thread->Stop(); // stop runnable for termination 00049 } 00050 else{} 00051 return 0; 00052 }