メインページ   モジュール   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ  

TEventManager.hh

解説を見る。
00001 // =====================================================================
00002 //  $Id: TEventManager.hh,v 1.3 2003/07/30 16:18:09 goiwai Exp $
00003 //  $Name: CLDAQ-1-08-01 $
00004 //
00005 //  $Log: TEventManager.hh,v $
00006 //  Revision 1.3  2003/07/30 16:18:09  goiwai
00007 //  ファイルにコミットログをつけることにしました.
00008 //
00009 // =====================================================================
00010 #ifndef __TEVENTMANAGER_HH
00011 #define __TEVENTMANAGER_HH
00012 
00013 #include "Tglobals.h"
00014 #include "TEvent.hh"
00015 //#include "TSystemTimer.hh"
00016 
00017 class TRun;
00018 class TEventAction;
00019 
00020 class TEventManager
00021 {
00022 
00023   private:
00024     static TEventManager* theEventManager;
00025 
00026   public:
00027     enum { tDefaultStackSize = 100 };
00028 
00029   private:
00030     Tstatus_t theStatus;
00031     Tint theStackSize;
00032     Tint theNumberOfEvents;
00033     TEventAction* theEventAction;
00034     TEvent theEvent;
00035     //TSystemTimer theEventTimer;
00036 
00037   public:
00038     TEventManager( Tint stacksize = tDefaultStackSize );
00039     virtual ~TEventManager();
00040 
00041   public:
00042     Tint GetStackSize() const;
00043     Tint GetNumberOfEvents() const;
00044     const TEvent& GetEvent() const;
00045     TEvent& GetEvent();
00046     TEventAction* GetEventAction() const;
00047     Tvoid SetStackSize( Tint stacksize );
00048     Tvoid SetNumberOfEvents( Tint nevents );
00049     Tvoid SetEvent( const TEvent& event );
00050     Tvoid SetEventAction( TEventAction* action );
00051     Tstatus_t GetStatus() const;
00052     Tvoid SetStatus( Tstatus_t status );
00053     //const TSystemTimer& GetEventTimer() const;
00054     //TSystemTimer& GetEventTimer();
00055     //Tvoid SetEventTimer( const TSystemTimer& timer );
00056 
00057   public:
00058     virtual const TRun& RecordEvent();
00059     virtual const TEvent& TakeEvent();
00060     virtual Tvoid ShowStatus() const;
00061     virtual Tvoid Clear();
00062 
00063   public:
00064     static TEventManager* GetEventManager();
00065 
00066 };
00067 
00068 inline TEventManager* TEventManager::GetEventManager()
00069 {
00070   return( theEventManager );
00071 }
00072 
00073 inline Tint TEventManager::GetStackSize() const
00074 {
00075   return( theStackSize );
00076 }
00077 
00078 inline Tint TEventManager::GetNumberOfEvents() const
00079 {
00080   return( theNumberOfEvents );
00081 }
00082 
00083 inline const TEvent& TEventManager::GetEvent() const
00084 {
00085   return( theEvent );
00086 }
00087 
00088 inline TEvent& TEventManager::GetEvent()
00089 {
00090   return( theEvent );
00091 }
00092 
00093 inline TEventAction* TEventManager::GetEventAction() const
00094 {
00095   return( theEventAction );
00096 }
00097 
00098 inline Tvoid TEventManager::SetNumberOfEvents( Tint nevents )
00099 {
00100   theNumberOfEvents = nevents;
00101   return;
00102 }
00103 
00104 inline Tvoid TEventManager::SetEvent( const TEvent& event )
00105 {
00106   theEvent = event;
00107   return;
00108 }
00109 
00110 inline Tstatus_t TEventManager::GetStatus() const
00111 {
00112   return( theStatus );
00113 }
00114 
00115 inline Tvoid TEventManager::SetStatus( Tstatus_t status )
00116 {
00117   theStatus = status;
00118   return;
00119 }
00120 
00121 // inline const TSystemTimer& TEventManager::GetEventTimer() const
00122 // {
00123 //   return( theEventTimer );
00124 // }
00125 
00126 // inline TSystemTimer& TEventManager::GetEventTimer()
00127 // {
00128 //   return( theEventTimer );
00129 // }
00130 
00131 // inline Tvoid TEventManager::SetEventTimer( const TSystemTimer& timer )
00132 // {
00133 //   theEventTimer = timer;
00134 //   return;
00135 // }
00136 
00137 #endif

CLDAQ - a Class Library for Data AcQuisition (Version 1.8.1)
Go IWAI <goiwai@users.sourceforge.jp>