00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TagEvent_TagMuon_H
00016 #define TagEvent_TagMuon_H 1
00017
00018
00019 #include "Event/TagData.h"
00020 #include "Event/TagHeader.h"
00021 #include "GaudiKernel/boost_allocator.h"
00022 #include <vector>
00023 #include <ostream>
00024
00025
00026
00027 namespace DayaBay
00028 {
00029
00030
00031
00041 class TagMuon: public TagData
00042 {
00043 public:
00044
00046 TagMuon() {}
00047
00049 virtual ~TagMuon() {}
00050
00052 virtual std::ostream& fillStream(std::ostream& s) const;
00053
00055 std::vector<const DayaBay::TagHeader*> fragments() const;
00056
00057
00058 #ifndef GOD_NOALLOC
00060 static void* operator new ( size_t size )
00061 {
00062 return ( sizeof(TagMuon) == size ?
00063 boost::singleton_pool<TagMuon, sizeof(TagMuon)>::malloc() :
00064 ::operator new(size) );
00065 }
00066
00070 static void* operator new ( size_t size, void* pObj )
00071 {
00072 return ::operator new (size,pObj);
00073 }
00074
00076 static void operator delete ( void* p )
00077 {
00078 boost::singleton_pool<TagMuon, sizeof(TagMuon)>::is_from(p) ?
00079 boost::singleton_pool<TagMuon, sizeof(TagMuon)>::free(p) :
00080 ::operator delete(p);
00081 }
00082
00085 static void operator delete ( void* p, void* pObj )
00086 {
00087 ::operator delete (p, pObj);
00088 }
00089 #endif
00090 protected:
00091
00092 private:
00093
00094 };
00095
00096 inline std::ostream& operator<< (std::ostream& str, const TagMuon& obj)
00097 {
00098 return obj.fillStream(str);
00099 }
00100
00101 }
00102
00103
00104
00105
00106
00107
00108
00109 inline std::ostream& DayaBay::TagMuon::fillStream(std::ostream& s) const
00110 {
00111 TagData::fillStream(s);
00112 return s;
00113 }
00114
00115
00116 inline std::vector<const DayaBay::TagHeader*> DayaBay::TagMuon::fragments() const
00117 {
00118 return this->header()->taggedHeaders(DayaBay::TagHeader::MuonFragment);
00119 }
00120
00121
00122 #endif