GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
20class TCondition;
21
39
40class TGo4AppControlTimer : public TTimer {
41
42 public:
44
45
46 TGo4AppControlTimer(TGo4ThreadManager *manager, Long_t msperiod = 3000, Bool_t mode = kTRUE);
47
48 virtual ~TGo4AppControlTimer();
49
51 void SetManager(TGo4ThreadManager *parent) { fxManager = parent; }
52
54 Bool_t Notify() override;
55
60 const TCondition *GetCondition() const { return fxCondition;}
61
68 void SetApplicationRun(Bool_t flag = kTRUE) { fbApplicationRun=flag; }
69
73 Bool_t GetApplicationRun() const { return fbApplicationRun; }
74
75 protected:
83 static UInt_t fguTERMWAIT;
91 static Int_t fgiTERMWAITCYCLES;
92
99
100 private:
101
102 Bool_t fbApplicationRun{kFALSE};
103
104 TCondition *fxCondition{nullptr};
105
106};
107
108#endif
const TCondition * GetCondition() const
Returns handle for internal condition which is used to block the gSystem.
void SetManager(TGo4ThreadManager *parent)
Sets reference to new thread manager.
Bool_t Notify() override
Routine called from TTimer on timeout.
TGo4ThreadManager * fxManager
Backlink to threadmanager who owns this timer.
static UInt_t fguTERMWAIT
time in ms to wait for all Runnables being stopped before Termination; after this time,...
TGo4AppControlTimer()=delete
Bool_t GetApplicationRun() const
Status of the application run flag.
void SetApplicationRun(Bool_t flag=kTRUE)
Switches between blocking and non blocking mode of the timer.
static Int_t fgiTERMWAITCYCLES
On Termination, Notify will test fgiTERMWAITCYCLES times if Runnables are stopped,...
Go4 thread manager.