00001 // ===================================================================== 00002 // $Id: TReadoutElement.hh,v 1.2 2003/07/05 23:53:49 goiwai Exp $ 00003 // $Name: CLDAQ-1-06-00 $ 00004 // ===================================================================== 00005 #ifndef __TREADOUTELEMENT_HH 00006 #define __TREADOUTELEMENT_HH 00007 00008 #include "Tglobals.h" 00009 #include "TReadoutIdentification.hh" 00010 00011 class TModule; 00012 class TDataElement; 00013 00014 class TReadoutElement 00015 : public TReadoutIdentification 00016 { 00017 00018 private: 00019 TModule* theModule; 00020 Tint theChannelNumber; 00021 00022 public: 00023 TReadoutElement( TModule* module, const Tstring& id = TunknownID, Tint ch = -1 ); 00024 TReadoutElement( TModule* module, Tint ch, const Tstring& id = TunknownID ); 00025 TReadoutElement( const TReadoutElement& right ); 00026 ~TReadoutElement(); 00027 00028 public: 00029 const TReadoutElement& operator=( const TReadoutElement& right ); 00030 Tbool operator==( const TReadoutElement& right ) const; 00031 Tbool operator!=( const TReadoutElement& right ) const; 00032 00033 public: 00034 TDataElement Read(); 00035 TDataElement Read( Tint ch ); 00036 00037 public: 00038 TModule* GetModule() const; 00039 Tvoid SetModule( TModule* module ); 00040 Tint GetChannelNumber() const; 00041 Tvoid SetChannelNumber( Tint ch ); 00042 00043 }; 00044 00045 inline TModule* TReadoutElement::GetModule() const 00046 { 00047 return( theModule ); 00048 } 00049 00050 inline Tvoid TReadoutElement::SetModule( TModule* module ) 00051 { 00052 theModule = module; 00053 return; 00054 } 00055 00056 inline Tint TReadoutElement::GetChannelNumber() const 00057 { 00058 return( theChannelNumber ); 00059 } 00060 00061 inline Tvoid TReadoutElement::SetChannelNumber( Tint ch ) 00062 { 00063 theChannelNumber = ch; 00064 return; 00065 } 00066 00067 #endif