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

In This Package:

DaqPmtCrate.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 DaqEvent_DaqPmtCrate_H
00016 #define DaqEvent_DaqPmtCrate_H 1
00017 
00018 // Include files
00019 #include "Event/DaqCrate.h"
00020 #include "Event/DaqFadcChannel.h"
00021 #include "Event/DaqPmtChannel.h"
00022 #include "FeeReadoutFormat/FeeReadout.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 DaqPmtCrate: public DaqCrate
00043   {
00044   public:
00045 
00047     typedef std::vector<DayaBay::DaqPmtChannel*> PmtChannelPtrList;
00049     typedef std::vector<DayaBay::DaqFadcChannel*> FadcChannelPtrList;
00050   
00052   DaqPmtCrate(const DybDaq::EventReadout* eventReadout);
00053   
00055   DaqPmtCrate(const DayaBay::Detector& detector,
00056                 const unsigned int run,
00057                 const unsigned int event);
00058   
00060   DaqPmtCrate(const DayaBay::DaqPmtCrate& crate);
00061   
00063     DaqPmtCrate() : m_pmtChannelPtrs(0),
00064                     m_pmtIndices(0),
00065                     m_feeReadouts(0),
00066                     m_fadcChannelPtrs(0),
00067                     m_fadcIndices(0),
00068                     m_fadcReadouts(0) {}
00069   
00071   virtual ~DaqPmtCrate();
00072   
00074    virtual std::ostream& fillStream(std::ostream& s) const;
00075   
00077     const DayaBay::DaqLtb& localTriggerBoard() const;
00078   
00080     const PmtChannelPtrList& channelReadouts() const;
00081   
00083     const PmtChannelPtrList& pmtChannelReadouts() const;
00084   
00086     bool hasChannel(const DayaBay::FeeChannelId& channelId) const;
00087   
00089     const DaqPmtChannel& channel(const DayaBay::FeeChannelId& channelId) const;
00090   
00092     DaqPmtChannel& channel(const DayaBay::FeeChannelId& channelId);
00093   
00095     const FadcChannelPtrList& fadcChannelReadouts() const;
00096   
00098     bool hasChannel(const DayaBay::FadcChannelId& channelId) const;
00099   
00101     const DaqFadcChannel& channel(const DayaBay::FadcChannelId& channelId) const;
00102   
00104     DaqFadcChannel& channel(const DayaBay::FadcChannelId& channelId);
00105   
00106   
00107   #ifndef GOD_NOALLOC
00109     static void* operator new ( size_t size )
00110     {
00111       return ( sizeof(DaqPmtCrate) == size ? 
00112                boost::singleton_pool<DaqPmtCrate, sizeof(DaqPmtCrate)>::malloc() :
00113                ::operator new(size) );
00114     }
00115   
00119     static void* operator new ( size_t size, void* pObj )
00120     {
00121       return ::operator new (size,pObj);
00122     }
00123   
00125     static void operator delete ( void* p )
00126     {
00127       boost::singleton_pool<DaqPmtCrate, sizeof(DaqPmtCrate)>::is_from(p) ?
00128       boost::singleton_pool<DaqPmtCrate, sizeof(DaqPmtCrate)>::free(p) :
00129       ::operator delete(p);
00130     }
00131   
00134     static void operator delete ( void* p, void* pObj )
00135     {
00136       ::operator delete (p, pObj);
00137     }
00138   #endif
00139   protected:
00140 
00142     DaqPmtCrate& operator=(const DayaBay::DaqPmtCrate& rhs);
00143   
00144   private:
00145 
00147     bool freshPmtAttributes() const;
00148   
00150     bool freshFadcAttributes() const;
00151   
00153     DaqPmtCrate::PmtChannelPtrList::size_type* pmtIndicesForSlot(const unsigned int) const;
00154   
00156     DaqPmtCrate::FadcChannelPtrList::size_type* fadcIndicesForSlot(const unsigned int) const;
00157   
00159     void flushCache();
00160   
00161     PmtChannelPtrList*              m_pmtChannelPtrs;  
00162     PmtChannelPtrList::size_type**  m_pmtIndices;      
00163     DybDaq::FeeReadout**            m_feeReadouts;     
00164     FadcChannelPtrList*             m_fadcChannelPtrs; 
00165     FadcChannelPtrList::size_type** m_fadcIndices;     
00166     DybDaq::FadcReadout**           m_fadcReadouts;    
00167   
00168   }; // class DaqPmtCrate
00169 
00170   inline std::ostream& operator<< (std::ostream& str, const DaqPmtCrate& obj)
00171   {
00172     return obj.fillStream(str);
00173   }
00174   
00175 } // namespace DayaBay;
00176 
00177 // -----------------------------------------------------------------------------
00178 // end of class
00179 // -----------------------------------------------------------------------------
00180 
00181 // Including forward declarations
00182 
00183 inline std::ostream& DayaBay::DaqPmtCrate::fillStream(std::ostream& s) const
00184 {
00185   DaqCrate::fillStream(s);
00186   s << "{ " << "pmtChannelPtrs :        " << m_pmtChannelPtrs << std::endl
00187             << "pmtIndices :    " << m_pmtIndices << std::endl
00188             << "feeReadouts :   " << m_feeReadouts << std::endl
00189             << "fadcChannelPtrs :       " << m_fadcChannelPtrs << std::endl
00190             << "fadcIndices :   " << m_fadcIndices << std::endl
00191             << "fadcReadouts :  " << m_fadcReadouts << std::endl << " }";
00192   return s;
00193 }
00194 
00195 
00196 
00197 #endif 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:24:28 2011 for DaqEvent by doxygen 1.4.7