GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4AppControlTimer.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 TGo4AppControlTimer_h
15 #define TGo4AppControlTimer_h
16 
17 #include "TTimer.h"
18 
19 class TGo4ThreadManager;
20 class TCondition;
21 
39 class TGo4AppControlTimer : public TTimer {
40 
41  public:
42  TGo4AppControlTimer() = delete;
43 
44 
45  TGo4AppControlTimer(TGo4ThreadManager *manager, Long_t msperiod = 3000, Bool_t mode = kTRUE);
46 
47  virtual ~TGo4AppControlTimer();
48 
50  void SetManager(TGo4ThreadManager *parent) { fxManager = parent; }
51 
53  Bool_t Notify() override;
54 
59  const TCondition *GetCondition() const { return fxCondition;}
60 
67  void SetApplicationRun(Bool_t flag = kTRUE) { fbApplicationRun=flag; }
68 
72  Bool_t GetApplicationRun() const { return fbApplicationRun; }
73 
74  protected:
82  static UInt_t fguTERMWAIT;
83 
90  static Int_t fgiTERMWAITCYCLES;
91 
98 
99  private:
100 
101  Bool_t fbApplicationRun{kFALSE};
102 
103  TCondition *fxCondition{nullptr};
104 
105 };
106 
107 #endif
Bool_t GetApplicationRun() const
void SetManager(TGo4ThreadManager *parent)
TGo4AppControlTimer()=delete
static Int_t fgiTERMWAITCYCLES
const TCondition * GetCondition() const
TGo4ThreadManager * fxManager
void SetApplicationRun(Bool_t flag=kTRUE)
Bool_t Notify() override