00001 // ===================================================================== 00024 // ===================================================================== 00025 #ifndef CLDAQ__TSOFTWAREFLASHADCMODULE_HH 00026 #define CLDAQ__TSOFTWAREFLASHADCMODULE_HH 00027 00028 #include "Tglobals.h" 00029 #include "TSoftwareModule.hh" 00030 00031 class TDataSegment; 00032 class TDataElement; 00033 00034 00054 class TSoftwareFlashAdcModule 00055 : public TSoftwareModule 00056 { 00057 00058 private: 00059 enum { tDefaultSampling = 62500 }; 00060 enum { tDefaultChannel = 1 }; 00061 00062 private: 00063 Tint theNumberOfSampling; 00064 00065 public: 00066 TSoftwareFlashAdcModule( Tint nchannel = tDefaultChannel, Tint nsampling = tDefaultSampling ); 00067 TSoftwareFlashAdcModule( const TSoftwareFlashAdcModule& right ); 00068 ~TSoftwareFlashAdcModule(); 00069 00070 public: 00071 Tint Clear(); 00072 Tint Update(); 00073 Tint Initialize(); 00074 Tvoid FillData( TDataElement& element, Tint channel ); 00075 00076 public: 00077 const TSoftwareFlashAdcModule& operator=( const TSoftwareFlashAdcModule& right ); 00078 Tbool operator==( const TSoftwareFlashAdcModule& right ) const; 00079 Tbool operator!=( const TSoftwareFlashAdcModule& right ) const; 00080 00081 public: 00082 Tint GetNumberOfSampling() const; 00083 Tvoid SetNumberOfSampling( Tint nsampling ); 00084 00085 protected: 00086 Tvoid setParameters(); 00087 Tvoid fillValue(); 00088 00089 }; 00090 00091 inline Tint TSoftwareFlashAdcModule::GetNumberOfSampling() const 00092 { 00093 return theNumberOfSampling; 00094 } 00095 00096 inline Tvoid TSoftwareFlashAdcModule::SetNumberOfSampling( Tint nsampling ) 00097 { 00098 theNumberOfSampling = nsampling; 00099 return; 00100 } 00101 00102 #endif