00001 #include "FastShowerUtils/ShowererPtr.h"
00002 #include "FastShowerUtils/Pinger/IPinger.h"
00003 #include "FastShowerUtils/Gridlet.h"
00004 #include "FastShowerUtils/ParticleParameters.h"
00005 #include <numeric>
00006
00007 namespace FastShower{
00008 ShowererPtr::ShowererPtr(IShowerer* s, std::string t):
00009 IShowerer(), DebugBase(t), m_pointee(s),
00010 m_esums("Esums"), m_hsums("Hsums"){}
00011
00012 ShowererPtr::~ShowererPtr(){}
00013
00014 void ShowererPtr::shower(ParticleParameters& pp, Gridlet* g,
00015 Normalisations& eNs, Normalisations& hNs) const{
00016
00017 pp.fromIDebug(this);
00018
00019 m_pointee->shower(pp, g, eNs, hNs);
00020
00021 m_esums.bumpStats(g->eSumE(), &pp);
00022 m_esums.bumpStats(g->hSumE(), &pp);
00023
00024 bumpStats(0., &pp);
00025 }
00026
00027 void ShowererPtr::normalise(const ParticleParameters& pp,
00028 Normalisations& eNs, Normalisations& hNs) const{
00029 m_pointee->normalise(pp, eNs, hNs);
00030 bumpStats(0., &pp);
00031 }
00032
00033 void ShowererPtr::ping(IPinger& p) const{DebugBase::ping(p);}
00034
00035 std::string ShowererPtr::name() const{return m_pointee->name();}
00036
00037 void ShowererPtr::components(IDebug::Cpts& v)const{
00038 v.push_back(&m_esums);
00039 v.push_back(&m_hsums);
00040 m_pointee->components(v);
00041 }
00042
00043 }
00044
00045
00046