GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4TaskOwner.h
Go to the documentation of this file.
1// $Id$
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 TGO4TASKOWNER_H
15#define TGO4TASKOWNER_H
16
17#include "TGo4CommandReceiver.h"
18#include "RtypesCore.h"
19
20class TMutex;
21class TGo4Task;
22class TGo4ServerTask;
23
29
31 friend class TGo4Task;
32 friend class TGo4ServerTask;
33
34 public:
35
37
38 TGo4TaskOwner(Bool_t isserver);
39
40 virtual ~TGo4TaskOwner();
41
42 Bool_t IsServer() const { return fbServerMode; }
43
44 TGo4Task* GetTask() const { return fxTask; }
45
49 virtual Int_t StartWorkThreads();
50
54 virtual Int_t StopWorkThreads();
55
60 virtual void Quit();
61
62 const char *GetName() const;
63
64 Bool_t IsConnected();
65
66 Bool_t IsBeingQuit();
67
69 TMutex *GetTaskManagerMutex();
70
71
72 protected:
73
74 void SetTask(TGo4Task* task, Bool_t delold = kTRUE);
75
76 private:
77
81 TGo4Task* fxTask{nullptr};
82
84 Bool_t fbServerMode{kFALSE};
85};
86
87#endif //TGO4TASKOWNER_H
Server task.
virtual Int_t StartWorkThreads()
Start the working threads of the task owner implementation; this method is used after the current con...
Bool_t IsServer() const
virtual Int_t StopWorkThreads()
stop the working threads of the task owne implementation; this method is used before the current conn...
virtual void Quit()
Quit this instance and the owned task; method to be called from command object, may be overridden in ...
TGo4Task * GetTask() const
Bool_t fbServerMode
Flag if master uses servertask or client task connection.
friend class TGo4Task
friend class TGo4ServerTask
void SetTask(TGo4Task *task, Bool_t delold=kTRUE)
virtual ~TGo4TaskOwner()
Bool_t IsConnected()
Bool_t IsBeingQuit()
TGo4Task * fxTask
aggregation 1 1
TMutex * GetTaskManagerMutex()
Access to taskmanager mutex; to be locked outside main mutex.
const char * GetName() const
Go4 Task.
Definition TGo4Task.h:39