00001 // $Id: TGo4AppControlTimer.h 1196 2014-04-10 14:06:24Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #ifndef TGo4AppControlTimer_h 00015 #define TGo4AppControlTimer_h 00016 00017 #include "TTimer.h" 00018 00019 class TGo4ThreadManager; 00020 class TCondition; 00021 00039 class TGo4AppControlTimer : public TTimer { 00040 00041 public: 00042 TGo4AppControlTimer (TGo4ThreadManager* manager, Long_t msperiod = 3000, Bool_t mode = kTRUE); 00043 00044 virtual ~TGo4AppControlTimer(); 00045 00047 void SetManager (TGo4ThreadManager* parent) { fxManager=parent; } 00048 00050 virtual Bool_t Notify (); 00051 00056 const TCondition* GetCondition () const { return fxCondition;} 00057 00064 void SetApplicationRun (Bool_t flag = kTRUE) { fbApplicationRun=flag; } 00065 00069 Bool_t GetApplicationRun(); 00070 00071 protected: 00079 static UInt_t fguTERMWAIT; 00080 00087 static Int_t fgiTERMWAITCYCLES; 00088 00094 TGo4ThreadManager *fxManager; 00095 00096 private: 00097 00098 Bool_t fbApplicationRun; 00099 00100 TCondition *fxCondition; 00101 00102 TGo4AppControlTimer(); 00103 }; 00104 00105 #endif