00001 #ifndef FASTSHOWER_CORESAMPLES_H
00002 #define FASTSHOWER_CORESAMPLES_H
00003
00004 #ifndef FASTSHOWER_SP_H
00005 #include "FastShowerUtils/SP.h"
00006 #endif
00007
00008 #ifndef BOOST_ARRAY_HPP
00009 #include <boost/array.hpp>
00010 #endif
00011
00012 class ostream;
00013 namespace FastShower{
00022 class ISlice0;
00023 class ICell0;
00024 class ICellSN;
00025 class ICellAN;
00026
00027 class CoreSamples{
00028 enum Position{s0, c0, sn, an};
00029 public:
00030 CoreSamples(){}
00031 void fill(const ISlice0*, double v){m_samples[s0]=v;}
00032 void fill(const ICell0*, double v){m_samples[c0]=v;}
00033 void fill(const ICellSN*, double v){m_samples[sn]=v;}
00034 void fill(const ICellAN*, double v){m_samples[an]=v;}
00035
00036 double give(const ISlice0*) const {return m_samples[s0];}
00037 double give(const ICell0*) const {return m_samples[c0];}
00038 double give(const ICellSN*) const {return m_samples[sn];}
00039 double give(const ICellAN*) const {return m_samples[an];}
00040
00041 double slice0() const {return m_samples[s0];}
00042 double cell0() const {return m_samples[c0];}
00043 double cellSN() const {return m_samples[sn];}
00044 double cellAN() const {return m_samples[an];}
00045 void reset(){m_samples.assign(0.);}
00046 private:
00047 static const unsigned int s_nsamplers(4);
00048 boost::array<double, s_nsamplers> m_samples;
00049 };
00050 std::ostream& operator<<(std::ostream&, const CoreSamples&);
00051 std::ostream& operator<<(std::ostream&, const CoreSamples*);
00052 }
00053 #endif
00054
00055
00056