Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

SimpleTailDistribution.h

Go to the documentation of this file.
00001 #ifndef FASTSHOWER_SIMPLETAILDIST_H
00002 #define FASTSHOWER_SIMPLETAILDIST_H
00003 
00004 #ifndef FASTSHOWER_ITAILDISTRIBUTION_H
00005 #include "FastShowerUtils/ITailDistribution.h"
00006 #endif
00007 
00008 #ifndef FASTSHOWER_DEBUGBASE_H
00009 #include "FastShowerUtils/DebugBase.h"
00010 #endif
00011 
00012 #ifndef FASTSHOWER_SP_H
00013 #include "FastShowerUtils/SP.h"
00014 #endif
00015 
00016 #ifndef FASTSHOWER_LINEARPROCESSOR_H
00017 #include "FastShowerUtils/LinearProcessor.h"
00018 #endif
00019 
00020 #ifndef FASTSHOWER_PROCESSEDNORMAL_H
00021 #include "FastShowerUtils/ProcessedNormal.h"
00022 #endif
00023 
00024 #ifndef STD_VECTOR_H
00025 #define STD_VECTOR_H
00026 #include <vector>
00027 #endif
00028 
00029 #ifndef STD_PAIR_H
00030 #define STD_PAIR_H
00031 #include <pair.h>
00032 #endif
00033 
00034 namespace FastShower{
00042   template<class Processor>
00043   class SimpleTailDist: 
00044     virtual public ITailDistribution, private DebugBase{
00045   public:
00046     SimpleTailDist(Processor*);
00047     ~SimpleTailDist(){};
00048     virtual ITailDistribution* clone() const;
00049 
00050 
00053     virtual double sample() const 
00054     private:
00056     const SP<ProcessedFlat> m_flat;
00058     const SP<Processor> m_processor;
00059   };
00060 
00061   template<Processor>
00062     inline SimpleTailDist<Processor>::SimpleTailDist(Processor* p):
00063     m_flat(new ProcessedFlat),m_processor(p){}
00064   //
00065   template<Processor>
00066     inline
00067     double SimpleTailDist<Processor>::sample() const {
00068     
00069     double value  = m_flat->sample(m_processor);
00070     return value;
00071   }
00072   //
00073   template<Processor>
00074     inline
00075     ITailDistribution<Processor>* SimpleTailDist<Processor>::clone() const{
00076     ITailDistribution<Porcessor>* ntd= new SimpleTailDist<Processor>(*this);
00077     return ntd;
00078   }
00079 }//namespace
00080 #endif
00081 
00082 
00083 
00084 
00085 

Generated on Tue Mar 18 11:50:05 2003 for FastShowerUtils by doxygen1.3-rc1