00001 // $Id: TGo4AppControlTimer.h 478 2009-10-29 12:26:09Z 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 00040 class TGo4AppControlTimer : public TTimer { 00041 00042 public: 00043 TGo4AppControlTimer (TGo4ThreadManager* manager, Long_t msperiod = 3000, Bool_t mode = kTRUE); 00044 00045 virtual ~TGo4AppControlTimer(); 00046 00048 void SetManager (TGo4ThreadManager* parent) { fxManager=parent; } 00049 00051 virtual Bool_t Notify (); 00052 00057 const TCondition* GetCondition () const { return fxCondition;} 00058 00065 void SetApplicationRun (Bool_t flag = kTRUE) { fbApplicationRun=flag; } 00066 00070 Bool_t GetApplicationRun(); 00071 00072 protected: 00080 static UInt_t fguTERMWAIT; 00081 00088 static Int_t fgiTERMWAITCYCLES; 00089 00095 TGo4ThreadManager *fxManager; 00096 00097 private: 00098 00099 Bool_t fbApplicationRun; 00100 00101 TCondition *fxCondition; 00102 00103 TGo4AppControlTimer(); 00104 }; 00105 00106 #endif