| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

ReadoutRpcCrate.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 ReadoutEvent_ReadoutRpcCrate_H
00016 #define ReadoutEvent_ReadoutRpcCrate_H 1
00017 
00018 // Include files
00019 #include "Event/Readout.h"
00020 #include "Conventions/Electronics.h"
00021 #include "Event/ReadoutRpcChannel.h"
00022 #include "GaudiKernel/boost_allocator.h"
00023 #include <map>
00024 #include <ostream>
00025 
00026 // Forward declarations
00027 
00028 namespace DayaBay 
00029 {
00030 
00031   // Forward declarations
00032 
00042   class ReadoutRpcCrate: public Readout
00043   {
00044   public:
00045 
00047     typedef std::map<DayaBay::FecChannelId,DayaBay::ReadoutRpcChannel> RpcChannelReadouts;
00048   
00050   ReadoutRpcCrate(const DayaBay::Detector& detector,
00051                     unsigned int triggerNumber,
00052                     const TimeStamp& triggerTime,
00053                     const DayaBay::Trigger::TriggerType_t& triggerType) : Readout(detector,
00054                                                                          triggerNumber,
00055                                                                          triggerTime,
00056                                                                          triggerType) {}
00057   
00059   ReadoutRpcCrate(const DayaBay::ReadoutRpcCrate& rhs);
00060   
00062     ReadoutRpcCrate() : m_channelReadout() {}
00063   
00065     virtual ~ReadoutRpcCrate() {}
00066   
00068     ReadoutRpcCrate& operator=(const DayaBay::ReadoutRpcCrate& rhs);
00069   
00071     void addChannel(const DayaBay::FecChannelId& channelId);
00072   
00074     ReadoutRpcChannel& channel(const DayaBay::FecChannelId& channelId);
00075   
00077     std::ostream& fillStream(std::ostream& s) const;
00078   
00081   const RpcChannelReadouts& channelReadout() const;
00082   
00085   void setChannelReadout(const RpcChannelReadouts& value);
00086   
00087   
00088   #ifndef GOD_NOALLOC
00090     static void* operator new ( size_t size )
00091     {
00092       return ( sizeof(ReadoutRpcCrate) == size ? 
00093                boost::singleton_pool<ReadoutRpcCrate, sizeof(ReadoutRpcCrate)>::malloc() :
00094                ::operator new(size) );
00095     }
00096   
00100     static void* operator new ( size_t size, void* pObj )
00101     {
00102       return ::operator new (size,pObj);
00103     }
00104   
00106     static void operator delete ( void* p )
00107     {
00108       boost::singleton_pool<ReadoutRpcCrate, sizeof(ReadoutRpcCrate)>::is_from(p) ?
00109       boost::singleton_pool<ReadoutRpcCrate, sizeof(ReadoutRpcCrate)>::free(p) :
00110       ::operator delete(p);
00111     }
00112   
00115     static void operator delete ( void* p, void* pObj )
00116     {
00117       ::operator delete (p, pObj);
00118     }
00119   #endif
00120   protected:
00121 
00122   private:
00123 
00124     RpcChannelReadouts m_channelReadout; 
00125   
00126   }; // class ReadoutRpcCrate
00127 
00128   inline std::ostream& operator<< (std::ostream& str, const ReadoutRpcCrate& obj)
00129   {
00130     return obj.fillStream(str);
00131   }
00132   
00133 } // namespace DayaBay;
00134 
00135 // -----------------------------------------------------------------------------
00136 // end of class
00137 // -----------------------------------------------------------------------------
00138 
00139 // Including forward declarations
00140 
00141 inline const DayaBay::ReadoutRpcCrate::RpcChannelReadouts& DayaBay::ReadoutRpcCrate::channelReadout() const 
00142 {
00143   return m_channelReadout;
00144 }
00145 
00146 inline void DayaBay::ReadoutRpcCrate::setChannelReadout(const RpcChannelReadouts& value) 
00147 {
00148   m_channelReadout = value;
00149 }
00150 
00151 inline void DayaBay::ReadoutRpcCrate::addChannel(const DayaBay::FecChannelId& channelId) 
00152 {
00153 
00154           m_channelReadout[channelId] = DayaBay::ReadoutRpcChannel(channelId,
00155                                                                    this);
00156         
00157 }
00158 
00159 inline DayaBay::ReadoutRpcChannel& DayaBay::ReadoutRpcCrate::channel(const DayaBay::FecChannelId& channelId) 
00160 {
00161 return m_channelReadout[channelId];
00162 }
00163 
00164 
00165 #endif 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:24:49 2011 for ReadoutEvent by doxygen 1.4.7