00001
00002
00003
00004
00005 #ifndef __TVMERPV130MODULE_HH
00006 #define __TVMERPV130MODULE_HH
00007
00008 #include "Tglobals.h"
00009 #include "TVmeModule.hh"
00010
00011 class TDataElement;
00012
00013 class TVmeRpv130Module
00014 : public TVmeModule
00015 {
00016
00017 private:
00018 enum
00019 {
00020 LATCH1 = 0x00,
00021 LATCH2 = 0x02,
00022 RSFF = 0x04,
00023 THROUGH = 0x06,
00024 PULSE = 0x08,
00025 LEVEL = 0x0a,
00026 CSR1 = 0x0c,
00027 CSR2 = 0x0e
00028 };
00029
00030 public:
00031 enum
00032 {
00033 tReadoutWithLatch1,
00034 tReadoutWithLatch2,
00035 tReadoutWithRSFF,
00036 tReadoutWithThrough
00037 };
00038
00039 private:
00040 Tint theReadoutMode;
00041 Tint theLevelStatus;
00042
00043 public:
00044
00045 TVmeRpv130Module( Toff_t offset, Tint mapsize = 0x1000, Tint nch = 1 );
00046 TVmeRpv130Module( const TVmeRpv130Module& right );
00047 ~TVmeRpv130Module();
00048
00049 public:
00050 Tint GetReadoutMode() const;
00051 Tvoid SetReadoutMode( Tint readmode );
00052 Tint GetLevelStatus() const;
00053 Tvoid SetLevelStatus( Tint status );
00054
00055 public:
00056 const TVmeRpv130Module& operator=( const TVmeRpv130Module& right );
00057 Tbool operator==( const TVmeRpv130Module& right ) const;
00058 Tbool operator!=( const TVmeRpv130Module& right ) const;
00059
00060 public:
00061 Tint Clear();
00062 Tint Update();
00063 Tint Initialize();
00064 Tvoid FillData( TDataElement& element, Tint channel );
00065
00066 public:
00067 Tvoid Pulse();
00068 Tvoid Pulse( Tint pattern );
00069
00070
00071
00072
00073 Tvoid Level();
00074 Tvoid Level( Tint pattern );
00075 Tvoid LevelUp();
00076 Tvoid LevelUp( Tint channel );
00077 Tvoid LevelDown();
00078 Tvoid LevelDown( Tint channel );
00079 Tvoid Enable();
00080 Tvoid Disable();
00081 TUshort Read();
00082
00083 };
00084
00085 inline Tint TVmeRpv130Module::GetReadoutMode() const
00086 {
00087 return( theReadoutMode );
00088 }
00089
00090 inline Tvoid TVmeRpv130Module::SetReadoutMode( Tint readmode )
00091 {
00092 theReadoutMode = readmode;
00093 return;
00094 }
00095
00096 inline Tint TVmeRpv130Module::GetLevelStatus() const
00097 {
00098 return( theLevelStatus );
00099 }
00100
00101 inline Tvoid TVmeRpv130Module::SetLevelStatus( Tint status )
00102 {
00103 status &= 0x00ff;
00104 theLevelStatus = status;
00105 return;
00106 }
00107
00108 #endif