#include <SamplerRouter.h>
Inheritance diagram for FastShower::SamplerRouter:
Public Methods | |
SamplerRouter (const std::vector< std::pair< double, ISampler * > > &, double floor=0.0, std::string label="") | |
constructor gives the mininum value of indexable quantity, defaults to zero. | |
SamplerRouter (const SamplerRouter &) | |
~SamplerRouter () | |
virtual void | sample (const PolyArgs &, CoreSamples &) const |
virtual double | lastValue (const CoreSamples &) const |
read back last deposit - used by monitoring code. | |
virtual double | indexQ (const ParticleParameters &, const CoreSamples &) const=0 |
void | components (std::vector< const IDebug * > &v) const |
IDebug interface. | |
Private Types | |
typedef std::map< double, ISampler * > | SamplerTable |
the map acts as a histogram - it puts different ISampler pointers in bins of some quantity expressed as double | |
Private Attributes | |
double | m_floor |
minimum level for indexed quantity. max level is obtained from the map. | |
SamplerTable | m_samplers |
|
the map acts as a histogram - it puts different ISampler pointers in bins of some quantity expressed as double
Definition at line 64 of file SamplerRouter.h. |
|
constructor gives the mininum value of indexable quantity, defaults to zero.
Definition at line 11 of file SamplerRouter.cxx. References m_samplers.
00013 : 00014 DebugBase(label), m_floor(x){ 00015 m_samplers.insert(v.begin(), v.end()); 00016 cout<<"Sampler router finishing construction"<<endl; 00017 } // |
|
Definition at line 19 of file SamplerRouter.cxx. References m_floor, and m_samplers.
00019 :ISampler(), DebugBase(){ 00020 SamplerTable::const_iterator iter = c.m_samplers.begin(); 00021 SamplerTable::const_iterator end = c.m_samplers.end(); 00022 00023 for(; iter!=end; ++iter){ 00024 m_samplers[(*iter).first]=(*iter).second->clone(); 00025 } 00026 m_floor = c.m_floor; 00027 cout<<"CopyConstructed SamplersRouter, size "<<m_samplers.size()<<endl; 00028 } |
|
Definition at line 49 of file SamplerRouter.h.
00049 {} |
|
assert we are in range (user requested lower range, in map upper range) Implements FastShower::ISampler. Definition at line 30 of file SamplerRouter.cxx. References indexQ(), m_floor, m_samplers, FastShower::PolyArgs::pp(), and FastShower::ISampler::sample().
00030 { 00031 00032 ParticleParameters pp = *pa.pp(); 00033 double indQ = indexQ(pp, cs); 00035 assert ( indQ >= m_floor); 00036 assert ( m_samplers.upper_bound(indQ) != m_samplers.end()); 00037 00038 ISampler* sampler = m_samplers.upper_bound(indQ)->second; 00039 sampler->sample(pa, cs); 00040 } |
|
read back last deposit - used by monitoring code.
Implements FastShower::ISampler. Reimplemented in FastShower::ANSamplerRouterSNSample, FastShower::C0SamplerRouterADPhiSample, FastShower::C0SamplerRouterEnergySample, FastShower::C0SamplerRouterRandomSample, FastShower::S0SamplerRouterEnergySample, and FastShower::SNSamplerRouterC0Sample. Definition at line 42 of file SamplerRouter.cxx.
00042 {return 0;}
|
|
|
IDebug interface.
Definition at line 44 of file SamplerRouter.cxx. References m_samplers.
00044 { 00045 v.clear(); 00046 std::map<double, ISampler*>::const_iterator iter = m_samplers.begin(); 00047 std::map<double, ISampler*>::const_iterator end = m_samplers.end(); 00048 for(;iter!=end;++iter){ v.push_back( (*iter).second ); } 00049 } |
|
minimum level for indexed quantity. max level is obtained from the map.
Definition at line 61 of file SamplerRouter.h. Referenced by sample(), and SamplerRouter(). |
|
Definition at line 65 of file SamplerRouter.h. Referenced by components(), sample(), and SamplerRouter(). |