GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4Slave.h
Go to the documentation of this file.
1 // $Id: TGo4Slave.h 1001 2013-07-25 15:10:31Z 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 für 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:132
virtual void Terminate(Bool_t termapp=kTRUE)
Definition: TGo4Slave.cxx:90
TGo4ThreadHandler * GetThreadHandler()
Definition: TGo4Slave.cxx:138
void SendStatusBuffer()
Definition: TGo4Slave.cxx:144
virtual TGo4TaskStatus * CreateStatus()
Definition: TGo4Slave.cxx:102
virtual void UpdateStatus(TGo4TaskStatus *state)
Definition: TGo4Slave.cxx:109
virtual void TerminateFast()
Definition: TGo4Slave.cxx:96
Bool_t MainIsRunning()
Definition: TGo4Slave.h:92
virtual void ExecuteString(const char *command)
Definition: TGo4Slave.cxx:162
virtual void Start()
Definition: TGo4Slave.cxx:67
virtual void Stop()
Definition: TGo4Slave.cxx:74
Bool_t fbMainIsRunning
Definition: TGo4Slave.h:34
void SendObject(TObject *obj, const char *receiver=0)
Definition: TGo4Slave.cxx:120
virtual void SendStatusMessage(Int_t level, Bool_t printout, const TString &text)
Definition: TGo4Slave.cxx:150
virtual void RestartMain()
Definition: TGo4Slave.cxx:85
void SendStatus(TGo4Status *stat, const char *receiver=0)
Definition: TGo4Slave.cxx:126
void UpdateStatusBuffer()
Definition: TGo4Slave.cxx:157
virtual void KillMain()
Definition: TGo4Slave.cxx:80
virtual ~TGo4Slave()
Definition: TGo4Slave.cxx:61
TGo4Command * NextCommand()
Definition: TGo4Slave.cxx:115