00001 #include "Event/SimHitCollection.h" 00002 #include <ostream> 00003 00004 DayaBay::SimHitCollection::~SimHitCollection() 00005 { 00006 m_header = 0; 00007 hit_container::iterator it, done = m_collection.end(); 00008 for (it = m_collection.begin(); it != done; ++it) { 00009 delete *it; 00010 } 00011 m_collection.clear(); 00012 } 00013 00014 DayaBay::SimHitCollection::hit_container& DayaBay::SimHitCollection::collection() 00015 { 00016 return m_collection; 00017 } 00018 00019 std::ostream& DayaBay::SimHitCollection::fillStream(std::ostream& s) const 00020 { 00021 size_t siz = m_collection.size(); 00022 00023 s << "{ " 00024 << siz << " hits : " << std::endl; 00025 00026 hit_container::const_iterator it, done = m_collection.end(); 00027 for (it=m_collection.begin(); it != done; ++it) { 00028 s << *(*it) << std::endl; 00029 } 00030 s << "}"; 00031 return s; 00032 } 00033