00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef SimEvent_SimHeader_H
00016 #define SimEvent_SimHeader_H 1
00017
00018
00019 #include "Event/HeaderObject.h"
00020 #include "GaudiKernel/boost_allocator.h"
00021 #include <ostream>
00022
00023
00024
00025 namespace DayaBay
00026 {
00027
00028
00029 class SimHitHeader;
00030 class SimParticleHistory;
00031 class SimUnobservableStatisticsHeader;
00032
00033
00034
00035 static const CLID CLID_SimHeader = 51301;
00036
00037
00038 namespace SimHeaderLocation {
00039 static const std::string& Default = "/Event/Sim/SimHeader";
00040 }
00041
00042
00052 class SimHeader: public HeaderObject
00053 {
00054 public:
00055
00057 static const std::string& defaultLocation() { return SimHeaderLocation::Default; }
00058 virtual const std::string& defLoc() const { return SimHeaderLocation::Default; }
00059
00061 SimHeader() : m_hits(0),
00062 m_particleHistory(0),
00063 m_unobservableStatistics(0) {}
00064
00066 ~SimHeader();
00067
00068
00069 virtual const CLID& clID() const;
00070 static const CLID& classID();
00071
00073 std::ostream& fillStream(std::ostream& s) const;
00074
00077 const DayaBay::SimHitHeader* hits() const;
00078
00081 void setHits(DayaBay::SimHitHeader* value);
00082
00085 const DayaBay::SimParticleHistory* particleHistory() const;
00086
00089 void setParticleHistory(DayaBay::SimParticleHistory* value);
00090
00093 const DayaBay::SimUnobservableStatisticsHeader* unobservableStatistics() const;
00094
00097 void setUnobservableStatistics(DayaBay::SimUnobservableStatisticsHeader* value);
00098
00099
00100 #ifndef GOD_NOALLOC
00102 static void* operator new ( size_t size )
00103 {
00104 return ( sizeof(SimHeader) == size ?
00105 boost::singleton_pool<SimHeader, sizeof(SimHeader)>::malloc() :
00106 ::operator new(size) );
00107 }
00108
00112 static void* operator new ( size_t size, void* pObj )
00113 {
00114 return ::operator new (size,pObj);
00115 }
00116
00118 static void operator delete ( void* p )
00119 {
00120 boost::singleton_pool<SimHeader, sizeof(SimHeader)>::is_from(p) ?
00121 boost::singleton_pool<SimHeader, sizeof(SimHeader)>::free(p) :
00122 ::operator delete(p);
00123 }
00124
00127 static void operator delete ( void* p, void* pObj )
00128 {
00129 ::operator delete (p, pObj);
00130 }
00131 #endif
00132 protected:
00133
00134 private:
00135
00136 DayaBay::SimHitHeader* m_hits;
00137 DayaBay::SimParticleHistory* m_particleHistory;
00138 DayaBay::SimUnobservableStatisticsHeader* m_unobservableStatistics;
00139
00140 };
00141
00142 inline std::ostream& operator<< (std::ostream& str, const SimHeader& obj)
00143 {
00144 return obj.fillStream(str);
00145 }
00146
00147 }
00148
00149
00150
00151
00152
00153
00154 #include "SimHitHeader.h"
00155 #include "SimParticleHistory.h"
00156 #include "SimUnobservableStatisticsHeader.h"
00157
00158
00159 inline const CLID& DayaBay::SimHeader::clID() const
00160 {
00161 return DayaBay::SimHeader::classID();
00162 }
00163
00164 inline const CLID& DayaBay::SimHeader::classID()
00165 {
00166 return CLID_SimHeader;
00167 }
00168
00169 inline const DayaBay::SimHitHeader* DayaBay::SimHeader::hits() const
00170 {
00171 return m_hits;
00172 }
00173
00174 inline void DayaBay::SimHeader::setHits(DayaBay::SimHitHeader* value)
00175 {
00176 m_hits = value;
00177 }
00178
00179 inline const DayaBay::SimParticleHistory* DayaBay::SimHeader::particleHistory() const
00180 {
00181 return m_particleHistory;
00182 }
00183
00184 inline void DayaBay::SimHeader::setParticleHistory(DayaBay::SimParticleHistory* value)
00185 {
00186 m_particleHistory = value;
00187 }
00188
00189 inline const DayaBay::SimUnobservableStatisticsHeader* DayaBay::SimHeader::unobservableStatistics() const
00190 {
00191 return m_unobservableStatistics;
00192 }
00193
00194 inline void DayaBay::SimHeader::setUnobservableStatistics(DayaBay::SimUnobservableStatisticsHeader* value)
00195 {
00196 m_unobservableStatistics = value;
00197 }
00198
00199
00200 #endif