/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 00002 // ************************************************************************** 00003 // * * 00004 // * ! ! ! A T T E N T I O N ! ! ! * 00005 // * * 00006 // * This file was created automatically by GaudiObjDesc, please do not * 00007 // * delete it or edit it by hand. * 00008 // * * 00009 // * If you want to change this file, first change the corresponding * 00010 // * xml-file and rerun the tools from GaudiObjDesc (or run make if you * 00011 // * are using it from inside a Gaudi-package). * 00012 // * * 00013 // ************************************************************************** 00014 00015 #ifndef ReadoutEvent_ReadoutRpcChannel_H 00016 #define ReadoutEvent_ReadoutRpcChannel_H 1 00017 00018 // Include files 00019 #include "Conventions/Electronics.h" 00020 #include "GaudiKernel/boost_allocator.h" 00021 #include <ostream> 00022 00023 // Forward declarations 00024 00025 namespace DayaBay 00026 { 00027 00028 // Forward declarations 00029 class ReadoutFecBoard; 00030 00031 00041 class ReadoutRpcChannel 00042 { 00043 public: 00044 00046 ReadoutRpcChannel(const DayaBay::FecChannelId& channelId, 00047 DayaBay::ReadoutFecBoard* readoutBoard); 00048 00050 ReadoutRpcChannel() : m_channelId(0), 00051 m_hit(), 00052 m_readoutBoard(0) {} 00053 00055 virtual ~ReadoutRpcChannel() {} 00056 00058 virtual std::ostream& fillStream(std::ostream& s) const; 00059 00062 const DayaBay::FecChannelId& channelId() const; 00063 00066 void setChannelId(const DayaBay::FecChannelId& value); 00067 00070 bool hit() const; 00071 00074 void setHit(bool value); 00075 00078 const DayaBay::ReadoutFecBoard* readoutBoard() const; 00079 00082 void setReadoutBoard(DayaBay::ReadoutFecBoard* value); 00083 00084 00085 #ifndef GOD_NOALLOC 00086 00087 static void* operator new ( size_t size ) 00088 { 00089 return ( sizeof(ReadoutRpcChannel) == size ? 00090 boost::singleton_pool<ReadoutRpcChannel, sizeof(ReadoutRpcChannel)>::malloc() : 00091 ::operator new(size) ); 00092 } 00093 00097 static void* operator new ( size_t size, void* pObj ) 00098 { 00099 return ::operator new (size,pObj); 00100 } 00101 00103 static void operator delete ( void* p ) 00104 { 00105 boost::singleton_pool<ReadoutRpcChannel, sizeof(ReadoutRpcChannel)>::is_from(p) ? 00106 boost::singleton_pool<ReadoutRpcChannel, sizeof(ReadoutRpcChannel)>::free(p) : 00107 ::operator delete(p); 00108 } 00109 00112 static void operator delete ( void* p, void* pObj ) 00113 { 00114 ::operator delete (p, pObj); 00115 } 00116 #endif 00117 protected: 00118 00119 private: 00120 00121 DayaBay::FecChannelId m_channelId; 00122 bool m_hit; 00123 DayaBay::ReadoutFecBoard* m_readoutBoard; 00124 00125 }; // class ReadoutRpcChannel 00126 00127 inline std::ostream& operator<< (std::ostream& str, const ReadoutRpcChannel& obj) 00128 { 00129 return obj.fillStream(str); 00130 } 00131 00132 } // namespace DayaBay; 00133 00134 // ----------------------------------------------------------------------------- 00135 // end of class 00136 // ----------------------------------------------------------------------------- 00137 00138 // Including forward declarations 00139 #include "ReadoutFecBoard.h" 00140 00141 00142 inline DayaBay::ReadoutRpcChannel::ReadoutRpcChannel(const DayaBay::FecChannelId& channelId, 00143 DayaBay::ReadoutFecBoard* readoutBoard) 00144 { 00145 00146 setChannelId(channelId); 00147 setReadoutBoard(readoutBoard); 00148 00149 } 00150 00151 inline std::ostream& DayaBay::ReadoutRpcChannel::fillStream(std::ostream& s) const 00152 { 00153 char l_hit = (m_hit) ? 'T' : 'F'; 00154 s << "{ " << "channelId : " << m_channelId << std::endl 00155 << "hit : " << l_hit << std::endl 00156 << "readoutBoard : " << m_readoutBoard << std::endl << " }"; 00157 return s; 00158 } 00159 00160 00161 inline const DayaBay::FecChannelId& DayaBay::ReadoutRpcChannel::channelId() const 00162 { 00163 return m_channelId; 00164 } 00165 00166 inline void DayaBay::ReadoutRpcChannel::setChannelId(const DayaBay::FecChannelId& value) 00167 { 00168 m_channelId = value; 00169 } 00170 00171 inline bool DayaBay::ReadoutRpcChannel::hit() const 00172 { 00173 return m_hit; 00174 } 00175 00176 inline void DayaBay::ReadoutRpcChannel::setHit(bool value) 00177 { 00178 m_hit = value; 00179 } 00180 00181 inline const DayaBay::ReadoutFecBoard* DayaBay::ReadoutRpcChannel::readoutBoard() const 00182 { 00183 return m_readoutBoard; 00184 } 00185 00186 inline void DayaBay::ReadoutRpcChannel::setReadoutBoard(DayaBay::ReadoutFecBoard* value) 00187 { 00188 m_readoutBoard = value; 00189 } 00190 00191 00192 #endif ///ReadoutEvent_ReadoutRpcChannel_H