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

In This Package:

DaqLtb.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_DaqLtb_H
00016 #define DaqEvent_DaqLtb_H 1
00017 
00018 // Include files
00019 #include "Conventions/Detectors.h"
00020 #include "Event/DaqLtbFrame.h"
00021 #include "LtbReadoutFormat/LtbReadout.h"
00022 #include "GaudiKernel/boost_allocator.h"
00023 #include <ostream>
00024 
00025 // Forward declarations
00026 
00027 namespace DayaBay 
00028 {
00029 
00030   // Forward declarations
00031 
00041   class DaqLtb
00042   {
00043   public:
00044 
00046     typedef std::vector<DayaBay::DaqLtbFrame*> LtbFramePtrList;
00047   
00049   DaqLtb(const DybDaq::LtbReadout& ltbReadout,
00050            const DayaBay::Detector& detector);
00051   
00053   DaqLtb(const unsigned int localTriggerNumber,
00054            const unsigned int rawTriggerTotal,
00055            const unsigned int ltbStatus,
00056            const DayaBay::Detector& detector);
00057   
00059     DaqLtb() : m_ltbReadout(0),
00060                m_detector(0),
00061                m_framePtrs(0) {}
00062   
00064   virtual ~DaqLtb();
00065   
00067    virtual std::ostream& fillStream(std::ostream& s) const;
00068   
00070     const LtbFramePtrList& frames() const;
00071   
00073     const DaqLtbFrame& firstFrame() const;
00074   
00076     unsigned int localTriggerNumber() const;
00077   
00079     const DybDaq::LtbReadout* ltbReadout() const;
00080   
00082     bool addFrame(DaqLtbFrame* frame);
00083   
00084   
00085   #ifndef GOD_NOALLOC
00087     static void* operator new ( size_t size )
00088     {
00089       return ( sizeof(DaqLtb) == size ? 
00090                boost::singleton_pool<DaqLtb, sizeof(DaqLtb)>::malloc() :
00091                ::operator new(size) );
00092     }
00093   
00097     static void* operator new ( size_t size, void* pObj )
00098     {
00099       return ::operator new (size,pObj);
00100     }
00101   
00103     static void operator delete ( void* p )
00104     {
00105       boost::singleton_pool<DaqLtb, sizeof(DaqLtb)>::is_from(p) ?
00106       boost::singleton_pool<DaqLtb, sizeof(DaqLtb)>::free(p) :
00107       ::operator delete(p);
00108     }
00109   
00112     static void operator delete ( void* p, void* pObj )
00113     {
00114       ::operator delete (p, pObj);
00115     }
00116   #endif
00117   protected:
00118 
00119   private:
00120 
00121     DybDaq::LtbReadout*      m_ltbReadout; 
00122     const DayaBay::Detector* m_detector;   
00123     LtbFramePtrList*         m_framePtrs;  
00124   
00125   }; // class DaqLtb
00126 
00127   inline std::ostream& operator<< (std::ostream& str, const DaqLtb& obj)
00128   {
00129     return obj.fillStream(str);
00130   }
00131   
00132 } // namespace DayaBay;
00133 
00134 // -----------------------------------------------------------------------------
00135 // end of class
00136 // -----------------------------------------------------------------------------
00137 
00138 // Including forward declarations
00139 
00140 inline std::ostream& DayaBay::DaqLtb::fillStream(std::ostream& s) const
00141 {
00142   s << "{ " << "ltbReadout :    " << m_ltbReadout << std::endl
00143             << "detector :      " << m_detector << std::endl
00144             << "framePtrs :     " << m_framePtrs << std::endl << " }";
00145   return s;
00146 }
00147 
00148 
00149 
00150 #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