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

In This Package:

ElecPulseCollection.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_ElecPulseCollection_H
00016 #define ElecEvent_ElecPulseCollection_H 1
00017 
00018 // Include files
00019 #include "Event/ElecPulse.h"
00020 #include "GaudiKernel/boost_allocator.h"
00021 #include <vector>
00022 #include <ostream>
00023 
00024 // Forward declarations
00025 
00026 namespace DayaBay 
00027 {
00028 
00029   // Forward declarations
00030   class ElecPulseHeader;
00031   
00032 
00043   class ElecPulseCollection
00044   {
00045   public:
00046 
00048     typedef std::vector<DayaBay::ElecPulse*> PulseContainer;
00049   
00051   ElecPulseCollection(DayaBay::ElecPulseHeader* header,
00052                         const DayaBay::Detector& det) : m_header(header),
00053                                                            m_detector(det) {}
00054   
00056     ElecPulseCollection() : m_header(0),
00057                             m_detector(),
00058                             m_pulses() {}
00059   
00061   ~ElecPulseCollection();
00062   
00064     std::ostream& fillStream(std::ostream& s) const;
00065   
00068   const DayaBay::ElecPulseHeader* header() const;
00069   
00072   void setHeader(DayaBay::ElecPulseHeader* value);
00073   
00076   const DayaBay::Detector& detector() const;
00077   
00080   void setDetector(const DayaBay::Detector& value);
00081   
00084   const PulseContainer& pulses() const;
00085   
00088   PulseContainer& pulses();
00089   
00092   void setPulses(const PulseContainer& value);
00093   
00094   
00095   #ifndef GOD_NOALLOC
00097     static void* operator new ( size_t size )
00098     {
00099       return ( sizeof(ElecPulseCollection) == size ? 
00100                boost::singleton_pool<ElecPulseCollection, sizeof(ElecPulseCollection)>::malloc() :
00101                ::operator new(size) );
00102     }
00103   
00107     static void* operator new ( size_t size, void* pObj )
00108     {
00109       return ::operator new (size,pObj);
00110     }
00111   
00113     static void operator delete ( void* p )
00114     {
00115       boost::singleton_pool<ElecPulseCollection, sizeof(ElecPulseCollection)>::is_from(p) ?
00116       boost::singleton_pool<ElecPulseCollection, sizeof(ElecPulseCollection)>::free(p) :
00117       ::operator delete(p);
00118     }
00119   
00122     static void operator delete ( void* p, void* pObj )
00123     {
00124       ::operator delete (p, pObj);
00125     }
00126   #endif
00127   protected:
00128 
00129   private:
00130 
00131     DayaBay::ElecPulseHeader* m_header;   
00132     DayaBay::Detector         m_detector; 
00133     PulseContainer            m_pulses;   
00134   
00135   }; // class ElecPulseCollection
00136 
00137   inline std::ostream& operator<< (std::ostream& str, const ElecPulseCollection& obj)
00138   {
00139     return obj.fillStream(str);
00140   }
00141   
00142 } // namespace DayaBay;
00143 
00144 // -----------------------------------------------------------------------------
00145 // end of class
00146 // -----------------------------------------------------------------------------
00147 
00148 // Including forward declarations
00149 #include "ElecPulseHeader.h"
00150 
00151 
00152 inline DayaBay::ElecPulseCollection::~ElecPulseCollection() 
00153 {
00154 
00155            DayaBay::ElecPulseCollection::PulseContainer::iterator pcIter = m_pulses.begin();
00156            for(;pcIter != m_pulses.end(); pcIter++) delete *(pcIter);
00157          
00158 }
00159 
00160 inline const DayaBay::ElecPulseHeader* DayaBay::ElecPulseCollection::header() const 
00161 {
00162   return m_header;
00163 }
00164 
00165 inline void DayaBay::ElecPulseCollection::setHeader(DayaBay::ElecPulseHeader* value) 
00166 {
00167   m_header = value;
00168 }
00169 
00170 inline const DayaBay::Detector& DayaBay::ElecPulseCollection::detector() const 
00171 {
00172   return m_detector;
00173 }
00174 
00175 inline void DayaBay::ElecPulseCollection::setDetector(const DayaBay::Detector& value) 
00176 {
00177   m_detector = value;
00178 }
00179 
00180 inline const DayaBay::ElecPulseCollection::PulseContainer& DayaBay::ElecPulseCollection::pulses() const 
00181 {
00182   return m_pulses;
00183 }
00184 
00185 inline DayaBay::ElecPulseCollection::PulseContainer& DayaBay::ElecPulseCollection::pulses() 
00186 {
00187   return m_pulses;
00188 }
00189 
00190 inline void DayaBay::ElecPulseCollection::setPulses(const PulseContainer& value) 
00191 {
00192   m_pulses = value;
00193 }
00194 
00195 
00196 #endif 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:32:32 2011 for ElecEvent by doxygen 1.4.7