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 TGO4SLAVE_H 00017 #define TGO4SLAVE_H 00018 00019 #include "TGo4TaskOwner.h" 00020 00021 class TGo4Status; 00022 class TGo4TaskStatus; 00023 class TGo4Command; 00024 class TGo4ThreadHandler; 00025 class TMutex; 00029 class TGo4Slave : public TGo4TaskOwner { 00030 public: 00031 TGo4Slave() ; 00032 00033 TGo4Slave(const char* name, Bool_t isserver=kTRUE, const char* serverhost="localhost", UInt_t negotport=5000) ; 00034 00035 virtual ~TGo4Slave() ; 00036 00041 virtual void Start(); 00042 00047 virtual void Stop(); 00048 00054 virtual void KillMain(); 00055 00061 virtual void RestartMain(); 00062 00063 virtual void Terminate (Bool_t termapp=kTRUE); 00064 00065 virtual void TerminateFast (); 00066 00073 virtual TGo4TaskStatus* CreateStatus(); 00074 00075 Bool_t& MainIsRunning() { return fbMainIsRunning; } 00076 00078 TGo4Command* NextCommand(); 00079 00081 void SendObject(TObject * obj, const char* receiver=0); 00082 00084 void SendStatus(TGo4Status * stat, const char* receiver=0); 00085 00086 00091 virtual Int_t Initialization(); 00092 00093 TGo4ThreadHandler* GetThreadHandler(); 00094 00096 void SendStatusBuffer(); 00097 00102 void SendStatusMessage(Int_t level, Bool_t printout, const char* text, ...); 00103 00110 void UpdateStatusBuffer(); 00111 00116 virtual void ExecuteString(const Text_t* command); 00117 00118 protected: 00119 00126 virtual void UpdateStatus(TGo4TaskStatus* state); 00127 00128 private: 00129 00134 Bool_t fbMainIsRunning; 00135 }; 00136 #endif //TGO4SLAVE_H 00137 00138 //----------------------------END OF GO4 SOURCE FILE ---------------------