00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ElecEvent_ElecPmtPulse_H
00016 #define ElecEvent_ElecPmtPulse_H 1
00017
00018
00019 #include "Conventions/Electronics.h"
00020 #include "Event/ElecPulse.h"
00021 #include "GaudiKernel/boost_allocator.h"
00022 #include <ostream>
00023
00024
00025
00026 namespace DayaBay
00027 {
00028
00029
00030 class ElecPulseCollection;
00031 class SimHit;
00032
00033
00043 class ElecPmtPulse: public ElecPulse
00044 {
00045 public:
00046
00048 ElecPmtPulse() {}
00049
00051 virtual ~ElecPmtPulse() {}
00052
00054 virtual std::ostream& fillStream(std::ostream& s) const;
00055
00056
00057 #ifndef GOD_NOALLOC
00059 static void* operator new ( size_t size )
00060 {
00061 return ( sizeof(ElecPmtPulse) == size ?
00062 boost::singleton_pool<ElecPmtPulse, sizeof(ElecPmtPulse)>::malloc() :
00063 ::operator new(size) );
00064 }
00065
00069 static void* operator new ( size_t size, void* pObj )
00070 {
00071 return ::operator new (size,pObj);
00072 }
00073
00075 static void operator delete ( void* p )
00076 {
00077 boost::singleton_pool<ElecPmtPulse, sizeof(ElecPmtPulse)>::is_from(p) ?
00078 boost::singleton_pool<ElecPmtPulse, sizeof(ElecPmtPulse)>::free(p) :
00079 ::operator delete(p);
00080 }
00081
00084 static void operator delete ( void* p, void* pObj )
00085 {
00086 ::operator delete (p, pObj);
00087 }
00088 #endif
00089 protected:
00090
00091 private:
00092
00093 };
00094
00095 inline std::ostream& operator<< (std::ostream& str, const ElecPmtPulse& obj)
00096 {
00097 return obj.fillStream(str);
00098 }
00099
00100 }
00101
00102
00103
00104
00105
00106
00107 #include "ElecPulseCollection.h"
00108 #include "Event/SimHit.h"
00109
00110
00111 inline std::ostream& DayaBay::ElecPmtPulse::fillStream(std::ostream& s) const
00112 {
00113 ElecPulse::fillStream(s);
00114 return s;
00115 }
00116
00117
00118
00119 #endif