/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 DaqEvent_DaqRpcPanel_H 00016 #define DaqEvent_DaqRpcPanel_H 1 00017 00018 // Include files 00019 #include "Conventions/Electronics.h" 00020 #include "FecReadoutFormat/FecData.h" 00021 #include "FecReadoutFormat/FecReadout.h" 00022 #include "Event/DaqRpcStrip.h" 00023 #include "GaudiKernel/boost_allocator.h" 00024 #include <ostream> 00025 00026 // Forward declarations 00027 00028 namespace DayaBay 00029 { 00030 00031 // Forward declarations 00032 00042 class DaqRpcPanel 00043 { 00044 public: 00045 00047 typedef std::vector<DayaBay::DaqRpcStrip*> RpcStripPtrList; 00048 00050 DaqRpcPanel(const DybDaq::FecData& fecData, 00051 const DayaBay::FecChannelId& channelId); 00052 00054 DaqRpcPanel(const DayaBay::FecChannelId& channelId, 00055 DybDaq::FecReadout& fecReadout); 00056 00058 DaqRpcPanel() : m_fecData(0), 00059 m_fecReadout(0), 00060 m_daqRpcStripList(0), 00061 m_channelId(), 00062 m_firedLayerNum(0), 00063 m_fromRot(false) {} 00064 00066 virtual ~DaqRpcPanel(); 00067 00069 virtual std::ostream& fillStream(std::ostream& s) const; 00070 00072 int location() const; 00073 00075 const RpcStripPtrList& daqRpcStripList() const; 00076 00078 unsigned int hitMap() const; 00079 00081 unsigned int rpcCFId() const; 00082 00084 unsigned int rpcFecId() const; 00085 00087 virtual bool forceTrigger() const; 00088 00090 virtual int row() const; 00091 00093 virtual int col() const; 00094 00096 int firedLayerNum() const; 00097 00099 void addFecData(const unsigned int trigType, 00100 const unsigned int second, 00101 const unsigned int nanoSecond, 00102 const unsigned int hitMap); 00103 00106 const DayaBay::FecChannelId& channelId() const; 00107 00110 bool fromRot() const; 00111 00114 void setFromRot(bool value); 00115 00116 00117 #ifndef GOD_NOALLOC 00118 00119 static void* operator new ( size_t size ) 00120 { 00121 return ( sizeof(DaqRpcPanel) == size ? 00122 boost::singleton_pool<DaqRpcPanel, sizeof(DaqRpcPanel)>::malloc() : 00123 ::operator new(size) ); 00124 } 00125 00129 static void* operator new ( size_t size, void* pObj ) 00130 { 00131 return ::operator new (size,pObj); 00132 } 00133 00135 static void operator delete ( void* p ) 00136 { 00137 boost::singleton_pool<DaqRpcPanel, sizeof(DaqRpcPanel)>::is_from(p) ? 00138 boost::singleton_pool<DaqRpcPanel, sizeof(DaqRpcPanel)>::free(p) : 00139 ::operator delete(p); 00140 } 00141 00144 static void operator delete ( void* p, void* pObj ) 00145 { 00146 ::operator delete (p, pObj); 00147 } 00148 #endif 00149 protected: 00150 00151 private: 00152 00153 const DybDaq::FecData* m_fecData; 00154 DybDaq::FecReadout* m_fecReadout; 00155 RpcStripPtrList* m_daqRpcStripList; 00156 DayaBay::FecChannelId m_channelId; 00157 mutable int m_firedLayerNum; 00158 bool m_fromRot; 00159 00160 }; // class DaqRpcPanel 00161 00162 inline std::ostream& operator<< (std::ostream& str, const DaqRpcPanel& obj) 00163 { 00164 return obj.fillStream(str); 00165 } 00166 00167 } // namespace DayaBay; 00168 00169 // ----------------------------------------------------------------------------- 00170 // end of class 00171 // ----------------------------------------------------------------------------- 00172 00173 // Including forward declarations 00174 00175 inline std::ostream& DayaBay::DaqRpcPanel::fillStream(std::ostream& s) const 00176 { 00177 char l_fromRot = (m_fromRot) ? 'T' : 'F'; 00178 s << "{ " << "fecData : " << m_fecData << std::endl 00179 << "fecReadout : " << m_fecReadout << std::endl 00180 << "daqRpcStripList : " << m_daqRpcStripList << std::endl 00181 << "channelId : " << m_channelId << std::endl 00182 << "firedLayerNum : " << m_firedLayerNum << std::endl 00183 << "fromRot : " << l_fromRot << std::endl << " }"; 00184 return s; 00185 } 00186 00187 00188 inline const DayaBay::FecChannelId& DayaBay::DaqRpcPanel::channelId() const 00189 { 00190 return m_channelId; 00191 } 00192 00193 inline bool DayaBay::DaqRpcPanel::fromRot() const 00194 { 00195 return m_fromRot; 00196 } 00197 00198 inline void DayaBay::DaqRpcPanel::setFromRot(bool value) 00199 { 00200 m_fromRot = value; 00201 } 00202 00203 00204 #endif ///DaqEvent_DaqRpcPanel_H