/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_ReadoutFecBoard_H 00016 #define ReadoutEvent_ReadoutFecBoard_H 1 00017 00018 // Include files 00019 #include "Conventions/Electronics.h" 00020 #include "Event/ReadoutRpcChannel.h" 00021 #include "GaudiKernel/boost_allocator.h" 00022 #include <map> 00023 #include <ostream> 00024 00025 // Forward declarations 00026 00027 namespace DayaBay 00028 { 00029 00030 // Forward declarations 00031 class ReadoutRpcCrate; 00032 00033 00043 class ReadoutFecBoard 00044 { 00045 public: 00046 00048 typedef unsigned int FecHitmap; 00049 00051 ReadoutFecBoard(const DayaBay::FecChannelId& boardId, 00052 DayaBay::ReadoutRpcCrate* readout); 00053 00055 ReadoutFecBoard() : m_hitMap(0), 00056 m_boardId(0), 00057 m_readout(0), 00058 m_flag3of4(false), 00059 m_flag2of4(false) {} 00060 00062 ReadoutFecBoard(const ReadoutFecBoard & rh); 00063 00065 ReadoutFecBoard & operator=(const ReadoutFecBoard & rh); 00066 00068 virtual ~ReadoutFecBoard() {} 00069 00071 std::ostream& fillStream(std::ostream& s) const; 00072 00075 const FecHitmap& hitMap() const; 00076 00079 void setHitMap(const FecHitmap& value); 00080 00083 const DayaBay::FecChannelId& boardId() const; 00084 00087 void setBoardId(const DayaBay::FecChannelId& value); 00088 00091 const DayaBay::ReadoutRpcCrate* readout() const; 00092 00095 void setReadout(DayaBay::ReadoutRpcCrate* value); 00096 00099 bool flag3of4() const; 00100 00103 void setFlag3of4(bool value); 00104 00107 bool flag2of4() const; 00108 00111 void setFlag2of4(bool value); 00112 00113 00114 #ifndef GOD_NOALLOC 00115 00116 static void* operator new ( size_t size ) 00117 { 00118 return ( sizeof(ReadoutFecBoard) == size ? 00119 boost::singleton_pool<ReadoutFecBoard, sizeof(ReadoutFecBoard)>::malloc() : 00120 ::operator new(size) ); 00121 } 00122 00126 static void* operator new ( size_t size, void* pObj ) 00127 { 00128 return ::operator new (size,pObj); 00129 } 00130 00132 static void operator delete ( void* p ) 00133 { 00134 boost::singleton_pool<ReadoutFecBoard, sizeof(ReadoutFecBoard)>::is_from(p) ? 00135 boost::singleton_pool<ReadoutFecBoard, sizeof(ReadoutFecBoard)>::free(p) : 00136 ::operator delete(p); 00137 } 00138 00141 static void operator delete ( void* p, void* pObj ) 00142 { 00143 ::operator delete (p, pObj); 00144 } 00145 #endif 00146 protected: 00147 00148 private: 00149 00150 FecHitmap m_hitMap; 00151 DayaBay::FecChannelId m_boardId; 00152 DayaBay::ReadoutRpcCrate* m_readout; 00153 bool m_flag3of4; 00154 bool m_flag2of4; 00155 00156 }; // class ReadoutFecBoard 00157 00158 inline std::ostream& operator<< (std::ostream& str, const ReadoutFecBoard& obj) 00159 { 00160 return obj.fillStream(str); 00161 } 00162 00163 } // namespace DayaBay; 00164 00165 // ----------------------------------------------------------------------------- 00166 // end of class 00167 // ----------------------------------------------------------------------------- 00168 00169 // Including forward declarations 00170 #include "ReadoutRpcCrate.h" 00171 00172 00173 inline DayaBay::ReadoutFecBoard::ReadoutFecBoard(const DayaBay::FecChannelId& boardId, 00174 DayaBay::ReadoutRpcCrate* readout) : m_hitMap(0), 00175 m_boardId(0), 00176 m_readout(0), 00177 m_flag3of4(false), 00178 m_flag2of4(false) 00179 { 00180 00181 setBoardId(boardId); 00182 setReadout(readout); 00183 00184 } 00185 00186 inline DayaBay::ReadoutFecBoard::ReadoutFecBoard(const DayaBay::ReadoutFecBoard & rh) : 00187 m_hitMap( rh.m_hitMap ), 00188 m_boardId( rh.m_boardId ), 00189 m_readout( rh.m_readout ), 00190 m_flag3of4( rh.m_flag3of4 ), 00191 m_flag2of4( rh.m_flag2of4 ) 00192 {} 00193 00194 inline DayaBay::ReadoutFecBoard & DayaBay::ReadoutFecBoard::operator=(const DayaBay::ReadoutFecBoard & rh) { 00195 if ( this != &rh ) { 00196 m_hitMap = rh.m_hitMap; 00197 m_boardId = rh.m_boardId; 00198 m_readout = rh.m_readout; 00199 m_flag3of4 = rh.m_flag3of4; 00200 m_flag2of4 = rh.m_flag2of4; 00201 } 00202 return *this; 00203 } 00204 00205 inline const DayaBay::ReadoutFecBoard::FecHitmap& DayaBay::ReadoutFecBoard::hitMap() const 00206 { 00207 return m_hitMap; 00208 } 00209 00210 inline void DayaBay::ReadoutFecBoard::setHitMap(const FecHitmap& value) 00211 { 00212 m_hitMap = value; 00213 } 00214 00215 inline const DayaBay::FecChannelId& DayaBay::ReadoutFecBoard::boardId() const 00216 { 00217 return m_boardId; 00218 } 00219 00220 inline void DayaBay::ReadoutFecBoard::setBoardId(const DayaBay::FecChannelId& value) 00221 { 00222 m_boardId = value; 00223 } 00224 00225 inline const DayaBay::ReadoutRpcCrate* DayaBay::ReadoutFecBoard::readout() const 00226 { 00227 return m_readout; 00228 } 00229 00230 inline void DayaBay::ReadoutFecBoard::setReadout(DayaBay::ReadoutRpcCrate* value) 00231 { 00232 m_readout = value; 00233 } 00234 00235 inline bool DayaBay::ReadoutFecBoard::flag3of4() const 00236 { 00237 return m_flag3of4; 00238 } 00239 00240 inline void DayaBay::ReadoutFecBoard::setFlag3of4(bool value) 00241 { 00242 m_flag3of4 = value; 00243 } 00244 00245 inline bool DayaBay::ReadoutFecBoard::flag2of4() const 00246 { 00247 return m_flag2of4; 00248 } 00249 00250 inline void DayaBay::ReadoutFecBoard::setFlag2of4(bool value) 00251 { 00252 m_flag2of4 = value; 00253 } 00254 00255 00256 #endif ///ReadoutEvent_ReadoutFecBoard_H