/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

ElecFecBoard.h
Go to the documentation of this file.
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 ElecEvent_ElecFecBoard_H
00016 #define ElecEvent_ElecFecBoard_H 1
00017 
00018 // Include files
00019 #include "Conventions/Electronics.h"
00020 #include "Event/ElecFecChannel.h"
00021 #include "GaudiKernel/boost_allocator.h"
00022 #include <ostream>
00023 
00024 // Forward declarations
00025 
00026 namespace DayaBay 
00027 {
00028 
00029   // Forward declarations
00030 
00040   class ElecFecBoard
00041   {
00042   public:
00043 
00045     typedef std::map<DayaBay::FecChannelId,DayaBay::ElecFecChannel> ChannelMap;
00046   
00048     ElecFecBoard() : m_channels(),
00049                      m_boardId() {}
00050   
00052     virtual ~ElecFecBoard() {}
00053   
00055    virtual std::ostream& fillStream(std::ostream& s) const;
00056   
00058     void addChannel(const DayaBay::FecChannelId& channelId);
00059   
00061     ElecFecChannel& channel(const DayaBay::FecChannelId& channelId);
00062   
00065   const ChannelMap& channels() const;
00066   
00069   void setChannels(const ChannelMap& value);
00070   
00073   const DayaBay::FecChannelId& boardId() const;
00074   
00077   void setBoardId(const DayaBay::FecChannelId& value);
00078   
00079   
00080   #ifndef GOD_NOALLOC
00081 
00082     static void* operator new ( size_t size )
00083     {
00084       return ( sizeof(ElecFecBoard) == size ? 
00085                boost::singleton_pool<ElecFecBoard, sizeof(ElecFecBoard)>::malloc() :
00086                ::operator new(size) );
00087     }
00088   
00092     static void* operator new ( size_t size, void* pObj )
00093     {
00094       return ::operator new (size,pObj);
00095     }
00096   
00098     static void operator delete ( void* p )
00099     {
00100       boost::singleton_pool<ElecFecBoard, sizeof(ElecFecBoard)>::is_from(p) ?
00101       boost::singleton_pool<ElecFecBoard, sizeof(ElecFecBoard)>::free(p) :
00102       ::operator delete(p);
00103     }
00104   
00107     static void operator delete ( void* p, void* pObj )
00108     {
00109       ::operator delete (p, pObj);
00110     }
00111   #endif
00112   protected:
00113 
00114   private:
00115 
00116     ChannelMap            m_channels; 
00117     DayaBay::FecChannelId m_boardId;  
00118   
00119   }; // class ElecFecBoard
00120 
00121   inline std::ostream& operator<< (std::ostream& str, const ElecFecBoard& obj)
00122   {
00123     return obj.fillStream(str);
00124   }
00125   
00126 } // namespace DayaBay;
00127 
00128 // -----------------------------------------------------------------------------
00129 // end of class
00130 // -----------------------------------------------------------------------------
00131 
00132 // Including forward declarations
00133 
00134 inline std::ostream& DayaBay::ElecFecBoard::fillStream(std::ostream& s) const
00135 {
00136   s << "{ " << "channels :      " << m_channels << std::endl
00137             << "boardId :       " << m_boardId << std::endl << " }";
00138   return s;
00139 }
00140 
00141 
00142 inline const DayaBay::ElecFecBoard::ChannelMap& DayaBay::ElecFecBoard::channels() const 
00143 {
00144   return m_channels;
00145 }
00146 
00147 inline void DayaBay::ElecFecBoard::setChannels(const ChannelMap& value) 
00148 {
00149   m_channels = value;
00150 }
00151 
00152 inline const DayaBay::FecChannelId& DayaBay::ElecFecBoard::boardId() const 
00153 {
00154   return m_boardId;
00155 }
00156 
00157 inline void DayaBay::ElecFecBoard::setBoardId(const DayaBay::FecChannelId& value) 
00158 {
00159   m_boardId = value;
00160 }
00161 
00162 inline void DayaBay::ElecFecBoard::addChannel(const DayaBay::FecChannelId& channelId) 
00163 {
00164 
00165             m_channels[channelId].setChannelId(channelId);
00166         
00167 }
00168 
00169 inline DayaBay::ElecFecChannel& DayaBay::ElecFecBoard::channel(const DayaBay::FecChannelId& channelId) 
00170 {
00171 return m_channels[channelId];
00172 }
00173 
00174 
00175 #endif ///ElecEvent_ElecFecBoard_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:05:49 for ElecEvent by doxygen 1.7.4