00001 // $Id: TGo4TaskHandlerRunnable.h 478 2009-10-29 12:26:09Z 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 #ifndef TGO4TASKHANDLERRUNNABLE_H 00015 #define TGO4TASKHANDLERRUNNABLE_H 00016 00017 #include "TGo4Runnable.h" 00018 00019 class TGo4Socket; 00020 class TGo4ThreadManager; 00021 class TGo4TaskHandler; 00022 class TGo4ObjectQueue; 00023 class TGo4BufferQueue; 00024 00031 class TGo4TaskHandlerRunnable : public TGo4Runnable { 00032 00033 public: 00034 00035 TGo4TaskHandlerRunnable(const char* name, TGo4ThreadManager* man, TGo4TaskHandler* hand, Bool_t receivermode=kTRUE); 00036 00037 virtual ~TGo4TaskHandlerRunnable(); 00038 00039 virtual Int_t Run(void* ptr) =0; 00040 00041 TGo4TaskHandler* GetTaskHandler(); 00042 00043 protected: 00044 00050 Bool_t CheckStopBuffer(TBuffer* buf, Int_t* result=0); 00051 00054 Bool_t CheckTransportOpen(); 00055 00057 TGo4Socket* fxTransport; 00058 00062 TGo4TaskHandler* fxTaskHandler; 00063 00066 Bool_t fbReceiverMode; 00067 00069 TGo4BufferQueue * fxBufferQueue; 00070 00071 private: 00072 TGo4TaskHandlerRunnable(); 00073 }; 00074 00075 #endif //TGO4TASKHANDLERRUNNABLE_H