GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4TaskOwner.h
Go to the documentation of this file.
1 // $Id: TGo4TaskOwner.h 615 2010-04-14 15:34:12Z adamczew $
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 TGO4TASKOWNER_H
15 #define TGO4TASKOWNER_H
16 
17 #include "TGo4CommandReceiver.h"
18 
19 class TMutex;
20 class TGo4Task;
21 class TGo4ServerTask;
22 
28  friend class TGo4Task;
29  friend class TGo4ServerTask;
30 
31  public:
32 
33  TGo4TaskOwner();
34 
35  TGo4TaskOwner(Bool_t isserver);
36 
37  virtual ~TGo4TaskOwner();
38 
39  Bool_t IsServer() { return fbServerMode; }
40 
41  TGo4Task* GetTask() { return fxTask; }
42 
46  virtual Int_t StartWorkThreads();
47 
51  virtual Int_t StopWorkThreads();
52 
57  virtual void Quit();
58 
59  const char* GetName() const;
60 
61  Bool_t IsConnected();
62 
63  Bool_t IsBeingQuit();
64 
66  TMutex* GetTaskManagerMutex();
67 
68 
69  protected:
70 
71  void SetTask(TGo4Task* task, Bool_t delold=kTRUE);
72 
73  private:
74 
79 
81  Bool_t fbServerMode;
82 };
83 
84 #endif //TGO4TASKOWNER_H
TGo4Task * fxTask
Definition: TGo4TaskOwner.h:78
Bool_t IsConnected()
virtual ~TGo4TaskOwner()
virtual void Quit()
virtual Int_t StopWorkThreads()
Bool_t IsServer()
Definition: TGo4TaskOwner.h:39
TGo4Task * GetTask()
Definition: TGo4TaskOwner.h:41
const char * GetName() const
Bool_t fbServerMode
Definition: TGo4TaskOwner.h:81
TMutex * GetTaskManagerMutex()
void SetTask(TGo4Task *task, Bool_t delold=kTRUE)
Bool_t IsBeingQuit()
virtual Int_t StartWorkThreads()