00001 #include "Event/SimHeader.h" 00002 #include "Event/SimHitHeader.h" 00003 #include "Event/SimParticleHistory.h" 00004 #include "Event/SimUnobservableStatisticsHeader.h" 00005 00006 #include <iostream> 00007 DayaBay::SimHeader::~SimHeader() 00008 { 00009 if (m_unobservableStatistics) { 00010 delete m_unobservableStatistics; 00011 m_unobservableStatistics = 0; 00012 } 00013 00014 if (m_particleHistory) { 00015 delete m_particleHistory; 00016 m_particleHistory = 0; 00017 } 00018 00019 if (m_hits) { 00020 delete m_hits; 00021 m_hits = 0; 00022 } 00023 } 00024 00025 std::ostream& DayaBay::SimHeader::fillStream(std::ostream& s) const 00026 { 00027 HeaderObject::fillStream(s); 00028 s << "{ "; 00029 00030 s << "hits : "; 00031 if (m_hits) m_hits->fillStream(s); 00032 else s << "NULL"; 00033 s << std::endl; 00034 00035 s<< "particleHistory : "; 00036 if (m_particleHistory) m_particleHistory->fillStream(s); 00037 else s << "NULL"; 00038 s << std::endl; 00039 00040 s << "unobservableStatistics : "; 00041 if (m_unobservableStatistics) m_unobservableStatistics->fillStream(s); 00042 else s << "NULL"; 00043 s << std::endl; 00044 00045 s << " }"; 00046 return s; 00047 }