00001 #include "FastShowerUtils/DepositorPtr.h" 00002 #include "FastShowerUtils/ParticleParameters.h" 00003 #include "FastShowerUtils/Normalisations.h" 00004 #include "FastShowerUtils/Pinger/IPinger.h" 00005 00006 namespace FastShower{ 00007 DepositorPtr::DepositorPtr(IDepositor* d, std::string s): 00008 DebugBase(s), m_pointee(d){ 00009 } 00010 // 00011 DepositorPtr::DepositorPtr(const DepositorPtr & rhs): 00012 IDepositor(),DebugBase(rhs){ 00013 m_pointee = rhs.m_pointee; 00014 } 00015 // 00016 DepositorPtr& DepositorPtr::operator=(const DepositorPtr& rhs){ 00017 00018 if (this == &rhs ) return *this; 00019 00020 IDepositor::operator=(rhs); 00021 DebugBase::operator=(rhs); 00022 m_pointee = rhs.m_pointee; 00023 00024 return *this; 00025 } 00026 // 00027 void DepositorPtr::deposit(const ParticleParameters& p, 00028 const Normalisations& ns, IDeposits& d){ 00029 p.fromIDebug(this); 00030 m_pointee->deposit(p,ns,d); 00031 bumpStats(0., &p); 00032 } 00033 // void DepositorPtr::acceptNormalisations(const Normalisations& ns){ 00034 // m_pointee->acceptNormalisations(ns); 00035 // bumpStats(ns.core()); 00036 // } 00037 IDepositor* DepositorPtr::clone() const{ 00038 return new DepositorPtr(*this); 00039 } 00040 void DepositorPtr::ping(IPinger& p) const{ 00041 DebugBase::ping(p); 00042 } 00043 std::string DepositorPtr::name() const{ 00044 std::string s = DebugBase::name()+" "+m_pointee->name(); 00045 return s; 00046 } 00047 void DepositorPtr::components(std::vector<const IDebug*>& v)const{ 00048 m_pointee->components(v); 00049 } 00050 }