00001 //------------------------------------------------------------- 00002 // Go4 Release Package v3.04-01 (build 30401) 00003 // 28-November-2008 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at EE 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 #ifndef TGO4TASKOWNER_H 00017 #define TGO4TASKOWNER_H 00018 00019 #include "TGo4CommandReceiver.h" 00020 00021 class TMutex; 00022 class TGo4Task; 00023 class TGo4ServerTask; 00024 00029 class TGo4TaskOwner : public TGo4CommandReceiver { 00030 friend class TGo4Task; 00031 friend class TGo4ServerTask; 00032 00033 public: 00034 00035 TGo4TaskOwner(); 00036 00037 TGo4TaskOwner(Bool_t isserver); 00038 00039 virtual ~TGo4TaskOwner(); 00040 00041 Bool_t IsServer() { return fbServerMode; } 00042 00043 TGo4Task* GetTask() { return fxTask; } 00044 00048 virtual Int_t StartWorkThreads(); 00049 00053 virtual Int_t StopWorkThreads(); 00054 00059 virtual void Quit(); 00060 00061 const char* GetName() const; 00062 00063 Bool_t IsConnected(); 00064 00066 TMutex* GetTaskManagerMutex(); 00067 00068 00069 protected: 00070 00071 void SetTask(TGo4Task* task, Bool_t delold=kTRUE); 00072 00073 private: 00074 00078 TGo4Task* fxTask; 00079 00081 Bool_t fbServerMode; 00082 }; 00083 00084 #endif //TGO4TASKOWNER_H 00085 00086 //----------------------------END OF GO4 SOURCE FILE ---------------------