00001
00024
00025 #ifndef CLDAQ__TVMERPV130MODULE_HH
00026 #define CLDAQ__TVMERPV130MODULE_HH
00027
00028 #include "Tglobals.h"
00029 #include "TVmeModule.hh"
00030
00031 class TDataElement;
00032
00033
00053 class TVmeRpv130Module
00054 : public TVmeModule
00055 {
00056
00057 private:
00058 enum
00059 {
00060 LATCH1 = 0x00,
00061 LATCH2 = 0x02,
00062 RSFF = 0x04,
00063 THROUGH = 0x06,
00064 PULSE = 0x08,
00065 LEVEL = 0x0a,
00066 CSR1 = 0x0c,
00067 CSR2 = 0x0e
00068 };
00069
00070 public:
00071 enum
00072 {
00073 tReadoutWithLatch1,
00074 tReadoutWithLatch2,
00075 tReadoutWithRSFF,
00076 tReadoutWithThrough
00077 };
00078
00079 private:
00080 Tint theReadoutMode;
00081 Tint theLevelStatus;
00082
00083 public:
00084
00085 TVmeRpv130Module( Toff_t offset, Tint mapsize = 0x1000, Tint nch = 1 );
00086 TVmeRpv130Module( const TVmeRpv130Module& right );
00087 ~TVmeRpv130Module();
00088
00089 public:
00090 Tint GetReadoutMode() const;
00091 Tvoid SetReadoutMode( Tint readmode );
00092 Tint GetLevelStatus() const;
00093 Tvoid SetLevelStatus( Tint status );
00094
00095 public:
00096 const TVmeRpv130Module& operator=( const TVmeRpv130Module& right );
00097 Tbool operator==( const TVmeRpv130Module& right ) const;
00098 Tbool operator!=( const TVmeRpv130Module& right ) const;
00099
00100 public:
00101 Tint Clear();
00102 Tint Update();
00103 Tint Initialize();
00104 Tvoid FillData( TDataElement& element, Tint channel );
00105
00106 public:
00107 Tvoid Pulse();
00108 Tvoid Pulse( Tint pattern );
00109
00110
00111
00112
00113 Tvoid Level();
00114 Tvoid Level( Tint pattern );
00115 Tvoid LevelUp();
00116 Tvoid LevelUp( Tint channel );
00117 Tvoid LevelDown();
00118 Tvoid LevelDown( Tint channel );
00119 Tvoid Enable();
00120 Tvoid Disable();
00121 TUshort Read();
00122
00123 };
00124
00125 inline Tint TVmeRpv130Module::GetReadoutMode() const
00126 {
00127 return theReadoutMode;
00128 }
00129
00130 inline Tvoid TVmeRpv130Module::SetReadoutMode( Tint readmode )
00131 {
00132 theReadoutMode = readmode;
00133 return;
00134 }
00135
00136 inline Tint TVmeRpv130Module::GetLevelStatus() const
00137 {
00138 return theLevelStatus;
00139 }
00140
00141 inline Tvoid TVmeRpv130Module::SetLevelStatus( Tint status )
00142 {
00143 status &= 0x00ff;
00144 theLevelStatus = status;
00145 return;
00146 }
00147
00148 #endif