00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TCamacSwitchRegisterModule.hh"
00017 #include "TDataSegment.hh"
00018 #include "TDataElement.hh"
00019
00020 TCamacSwitchRegisterModule::TCamacSwitchRegisterModule( TCamacCrateController* cc7x00, Tint slot, Tint nch, Tdata_t datalen )
00021 : TCamacModule( cc7x00, slot, nch, datalen )
00022 {;}
00023
00024 TCamacSwitchRegisterModule::TCamacSwitchRegisterModule( const TCamacSwitchRegisterModule& right )
00025 : TCamacModule( right )
00026 {;}
00027
00028 TCamacSwitchRegisterModule::~TCamacSwitchRegisterModule()
00029 {;}
00030
00031 const TCamacSwitchRegisterModule& TCamacSwitchRegisterModule::operator=( const TCamacSwitchRegisterModule& right )
00032 {
00033 *( (TCamacModule*)this ) = *( (TCamacModule*)(&right) );
00034 return *this;
00035 }
00036
00037 Tbool TCamacSwitchRegisterModule::operator==( const TCamacSwitchRegisterModule& right ) const
00038 {
00039 return *( (TCamacModule*)this ) == *( (TCamacModule*)(&right) );
00040 }
00041
00042 Tbool TCamacSwitchRegisterModule::operator!=( const TCamacSwitchRegisterModule& right ) const
00043 {
00044 return *( (TCamacModule*)this ) != *( (TCamacModule*)(&right) );
00045 }
00046
00047 Tvoid TCamacSwitchRegisterModule::FillData( TDataElement& element, Tint channel )
00048 {
00049 if ( channel < 0 || channel >= theNumberOfChannels ) {
00050 Tcerr << "TCamacSwitchRegisterModule::FillData: invalid ID " << channel << Tendl;
00051 element.FillData( &theStatus, tTypeInt, 1 );
00052 } else {
00053 Read( channel );
00054 element.FillData( &theCamacData, tTypeUnsignedInt, 1 );
00055 }
00056 return;
00057 }
00058
00059 #ifdef __CLDAQ_ROOT_DLL
00060 ClassImp(TCamacSwitchRegisterModule)
00061 #endif