00001 // ===================================================================== 00028 // ===================================================================== 00029 #ifndef CLDAQ__TREADOUTELEMENT_HH 00030 #define CLDAQ__TREADOUTELEMENT_HH 00031 00032 #include "Tglobals.h" 00033 #include "TReadoutIdentification.hh" 00034 00035 class TModule; 00036 class TDataElement; 00037 00038 00058 class TReadoutElement 00059 : public TReadoutIdentification 00060 { 00061 00062 private: 00063 TModule* theModule; 00064 Tint theChannelNumber; 00065 00066 public: 00067 TReadoutElement( TModule* module, const Tstring& id = TunknownID, Tint ch = -1 ); 00068 TReadoutElement( TModule* module, Tint ch, const Tstring& id = TunknownID ); 00069 TReadoutElement( const TReadoutElement& right ); 00070 ~TReadoutElement(); 00071 00072 public: 00073 const TReadoutElement& operator=( const TReadoutElement& right ); 00074 Tbool operator==( const TReadoutElement& right ) const; 00075 Tbool operator!=( const TReadoutElement& right ) const; 00076 00077 public: 00078 TDataElement Read(); 00079 TDataElement Read( Tint ch ); 00080 00081 public: 00082 TModule* GetModule() const; 00083 Tvoid SetModule( TModule* module ); 00084 Tint GetChannelNumber() const; 00085 Tvoid SetChannelNumber( Tint ch ); 00086 00087 #ifdef __CLDAQ_ROOT_DLL 00088 ClassDef(TReadoutElement,0) 00089 #endif 00090 00091 }; 00092 00093 inline TModule* TReadoutElement::GetModule() const 00094 { 00095 return theModule; 00096 } 00097 00098 inline Tvoid TReadoutElement::SetModule( TModule* module ) 00099 { 00100 theModule = module; 00101 return; 00102 } 00103 00104 inline Tint TReadoutElement::GetChannelNumber() const 00105 { 00106 return theChannelNumber; 00107 } 00108 00109 inline Tvoid TReadoutElement::SetChannelNumber( Tint ch ) 00110 { 00111 theChannelNumber = ch; 00112 return; 00113 } 00114 00115 #endif