/search.css" rel="stylesheet" type="text/css"/> /search.js">
| 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/ReadoutFecBoard.h"
00022 #include "Event/DaqRpcCrate.h"
00023 #include "GaudiKernel/boost_allocator.h"
00024 #include <map>
00025 #include <ostream>
00026 
00027 // Forward declarations
00028 
00029 namespace DayaBay 
00030 {
00031 
00032   // Forward declarations
00033   class ReadoutTriggerDataPkg;
00034   
00035 
00045   class ReadoutRpcCrate: public Readout
00046   {
00047   public:
00048 
00050     typedef std::map<DayaBay::FecChannelId,DayaBay::ReadoutFecBoard> FecReadouts;
00051   
00053   ReadoutRpcCrate(const DayaBay::Detector& detector,
00054                     unsigned int triggerNumber,
00055                     const TimeStamp& triggerTime,
00056                     const DayaBay::Trigger::TriggerType_t& triggerType) : Readout(detector,
00057                                                                          triggerNumber,
00058                                                                          triggerTime,
00059                                                                          triggerType),
00060                                                                                           m_triggerDataPkg(0) {}
00061   
00063   ReadoutRpcCrate(const DayaBay::ReadoutRpcCrate& rhs);
00064   
00066     ReadoutRpcCrate() : m_fecReadouts(),
00067                         m_triggerDataPkg(0) {}
00068   
00070     virtual ~ReadoutRpcCrate() {}
00071   
00073     ReadoutRpcCrate& operator=(const DayaBay::ReadoutRpcCrate& rhs);
00074   
00076     void addReadout(const DayaBay::FecChannelId& boardId);
00077   
00079     ReadoutFecBoard& board(const DayaBay::FecChannelId& boardId);
00080   
00082     const DayaBay::DaqCrate* daqCrate(const unsigned int run,
00083                                       const unsigned int event,
00084                                       const unsigned int ltbSlot) const;
00085   
00087     const DayaBay::DaqRtm* dummyRtm() const;
00088   
00090     std::ostream& fillStream(std::ostream& s) const;
00091   
00094   const FecReadouts& fecReadouts() const;
00095   
00098   void setFecReadouts(const FecReadouts& value);
00099   
00102   const DayaBay::ReadoutTriggerDataPkg* triggerDataPkg() const;
00103   
00106   void setTriggerDataPkg(DayaBay::ReadoutTriggerDataPkg* value);
00107   
00108   
00109   #ifndef GOD_NOALLOC
00110 
00111     static void* operator new ( size_t size )
00112     {
00113       return ( sizeof(ReadoutRpcCrate) == size ? 
00114                boost::singleton_pool<ReadoutRpcCrate, sizeof(ReadoutRpcCrate)>::malloc() :
00115                ::operator new(size) );
00116     }
00117   
00121     static void* operator new ( size_t size, void* pObj )
00122     {
00123       return ::operator new (size,pObj);
00124     }
00125   
00127     static void operator delete ( void* p )
00128     {
00129       boost::singleton_pool<ReadoutRpcCrate, sizeof(ReadoutRpcCrate)>::is_from(p) ?
00130       boost::singleton_pool<ReadoutRpcCrate, sizeof(ReadoutRpcCrate)>::free(p) :
00131       ::operator delete(p);
00132     }
00133   
00136     static void operator delete ( void* p, void* pObj )
00137     {
00138       ::operator delete (p, pObj);
00139     }
00140   #endif
00141   protected:
00142 
00143   private:
00144 
00145     FecReadouts                     m_fecReadouts;    
00146     DayaBay::ReadoutTriggerDataPkg* m_triggerDataPkg; 
00147   
00148   }; // class ReadoutRpcCrate
00149 
00150   inline std::ostream& operator<< (std::ostream& str, const ReadoutRpcCrate& obj)
00151   {
00152     return obj.fillStream(str);
00153   }
00154   
00155 } // namespace DayaBay;
00156 
00157 // -----------------------------------------------------------------------------
00158 // end of class
00159 // -----------------------------------------------------------------------------
00160 
00161 // Including forward declarations
00162 #include "ReadoutTriggerDataPkg.h"
00163 
00164 
00165 inline const DayaBay::ReadoutRpcCrate::FecReadouts& DayaBay::ReadoutRpcCrate::fecReadouts() const 
00166 {
00167   return m_fecReadouts;
00168 }
00169 
00170 inline void DayaBay::ReadoutRpcCrate::setFecReadouts(const FecReadouts& value) 
00171 {
00172   m_fecReadouts = value;
00173 }
00174 
00175 inline const DayaBay::ReadoutTriggerDataPkg* DayaBay::ReadoutRpcCrate::triggerDataPkg() const 
00176 {
00177   return m_triggerDataPkg;
00178 }
00179 
00180 inline void DayaBay::ReadoutRpcCrate::setTriggerDataPkg(DayaBay::ReadoutTriggerDataPkg* value) 
00181 {
00182   m_triggerDataPkg = value;
00183 }
00184 
00185 inline void DayaBay::ReadoutRpcCrate::addReadout(const DayaBay::FecChannelId& boardId) 
00186 {
00187 
00188             m_fecReadouts[boardId] = DayaBay::ReadoutFecBoard(boardId,
00189                                                                    this);
00190         
00191 }
00192 
00193 inline DayaBay::ReadoutFecBoard& DayaBay::ReadoutRpcCrate::board(const DayaBay::FecChannelId& boardId) 
00194 {
00195 return m_fecReadouts[boardId];
00196 }
00197 
00198 
00199 #endif ///ReadoutEvent_ReadoutRpcCrate_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:01:16 for ReadoutEvent by doxygen 1.7.4