GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4Slave.h
Go to the documentation of this file.
1 // $Id: TGo4Slave.h 2627 2019-10-01 08:02:45Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4SLAVE_H
15 #define TGO4SLAVE_H
16 
17 #include "TGo4TaskOwner.h"
18 
19 class TGo4Status;
20 class TGo4TaskStatus;
21 class TGo4Command;
22 class TGo4ThreadHandler;
23 class TMutex;
27 class TGo4Slave : public TGo4TaskOwner {
28  private:
29 
35 
36  protected:
37 
44  virtual void UpdateStatus(TGo4TaskStatus* state);
45 
46 
47  public:
48  TGo4Slave();
49 
50  TGo4Slave(const char* name, Bool_t isserver=kTRUE, const char* serverhost="localhost", UInt_t negotport=5000);
51 
52  virtual ~TGo4Slave();
53 
58  virtual void Start();
59 
64  virtual void Stop();
65 
71  virtual void KillMain();
72 
78  virtual void RestartMain();
79 
80  virtual void Terminate (Bool_t termapp=kTRUE);
81 
82  virtual void TerminateFast ();
83 
90  virtual TGo4TaskStatus* CreateStatus();
91 
92  Bool_t MainIsRunning() { return fbMainIsRunning; }
93 
96 
98  void SendObject(TObject * obj, const char* receiver=0);
99 
101  void SendStatus(TGo4Status * stat, const char* receiver=0);
102 
103 
108  virtual Int_t Initialization();
109 
111 
113  void SendStatusBuffer();
114 
119  virtual void SendStatusMessage(Int_t level, Bool_t printout, const TString& text);
120 
127  void UpdateStatusBuffer();
128 
133  virtual void ExecuteString(const char* command);
134 
135 };
136 #endif //TGO4SLAVE_H
virtual Int_t Initialization()
Definition: TGo4Slave.cxx:131
virtual void Terminate(Bool_t termapp=kTRUE)
Definition: TGo4Slave.cxx:89
TGo4ThreadHandler * GetThreadHandler()
Definition: TGo4Slave.cxx:137
void SendStatusBuffer()
Definition: TGo4Slave.cxx:143
virtual TGo4TaskStatus * CreateStatus()
Definition: TGo4Slave.cxx:101
virtual void UpdateStatus(TGo4TaskStatus *state)
Definition: TGo4Slave.cxx:108
virtual void TerminateFast()
Definition: TGo4Slave.cxx:95
Bool_t MainIsRunning()
Definition: TGo4Slave.h:92
virtual void ExecuteString(const char *command)
Definition: TGo4Slave.cxx:161
virtual void Start()
Definition: TGo4Slave.cxx:66
virtual void Stop()
Definition: TGo4Slave.cxx:73
Bool_t fbMainIsRunning
Definition: TGo4Slave.h:34
void SendObject(TObject *obj, const char *receiver=0)
Definition: TGo4Slave.cxx:119
virtual void SendStatusMessage(Int_t level, Bool_t printout, const TString &text)
Definition: TGo4Slave.cxx:149
virtual void RestartMain()
Definition: TGo4Slave.cxx:84
void SendStatus(TGo4Status *stat, const char *receiver=0)
Definition: TGo4Slave.cxx:125
void UpdateStatusBuffer()
Definition: TGo4Slave.cxx:156
virtual void KillMain()
Definition: TGo4Slave.cxx:79
virtual ~TGo4Slave()
Definition: TGo4Slave.cxx:60
TGo4Command * NextCommand()
Definition: TGo4Slave.cxx:114