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

FnOfParticleParameters2Ptr.h

Go to the documentation of this file.
00001 #ifndef FASTSHOWER_FNOF2PTR_H
00002 #define FASTSHOWER_FNOF2PTR_H
00003 
00004 #ifndef FASTSHOWER_DEBUGBASE_H
00005 #include "FastShowerUtils/DebugBase.h"
00006 #endif
00007 
00008 #ifndef FASTSHOWER_SP_H
00009 #include "FastShowerUtils/SP.h"
00010 #endif
00011 
00012 #ifndef FASTSHOWER_IFNOFPARTICLEPARAMETERS2_H
00013 #include "FastShowerUtils/IFnOfParticleParameters2.h"
00014 #endif
00015 
00016 #ifndef FASTSHOWER_PARTICLEPARAMETERS_H
00017 #include "FastShowerUtils/ParticleParameters.h"
00018 #endif
00019 
00020 #ifndef STD_STRING_H
00021 #define STD_STRING_H
00022 #include <string>
00023 #endif
00024 
00025 #include <pair.h>
00026 #include <iostream>
00027 #include <string>
00028 
00029 namespace FastShower{
00034   class FnOfParticleParameters2Ptr: 
00035     public IFnOfParticleParameters2, private DebugBase{
00036     public:
00037   //
00038     FnOfParticleParameters2Ptr(IFnOfParticleParameters2*, std::string s="");
00039     FnOfParticleParameters2Ptr(const FnOfParticleParameters2Ptr&);
00040     FnOfParticleParameters2Ptr& operator=(const FnOfParticleParameters2Ptr& );
00041     ~FnOfParticleParameters2Ptr(){};
00042     //IFnOfParticleParameters2 interface
00043     virtual std::pair<double, double> 
00044       value(const ParticleParameters& pp) const;
00045     virtual IFnOfParticleParameters2* clone() const;
00046     //
00047     private:
00048     SP<IFnOfParticleParameters2> m_pointee;
00049   };
00050   //
00051   inline
00052     FnOfParticleParameters2Ptr::FnOfParticleParameters2Ptr
00053     (IFnOfParticleParameters2* f, std::string s):
00054     DebugBase(s),m_pointee(f){}
00055   //
00056   inline
00057     FnOfParticleParameters2Ptr::FnOfParticleParameters2Ptr
00058     (const FnOfParticleParameters2Ptr& f):
00059     IFnOfParticleParameters2(f),DebugBase(f), m_pointee(f.m_pointee){
00060   }
00061   //
00062   inline
00063     FnOfParticleParameters2Ptr& 
00064     FnOfParticleParameters2Ptr::operator=
00065     (const FnOfParticleParameters2Ptr& rhs){
00066     
00067     if (this  == &rhs ) return *this;
00068     
00069     DebugBase::operator=(rhs);
00070     m_pointee = rhs.m_pointee;
00071     
00072     return *this;
00073   }
00074   //
00075   inline
00076     std::pair<double, double> 
00077     FnOfParticleParameters2Ptr::value(const ParticleParameters& arg)const{
00078     std::pair<double, double> x = m_pointee->value(arg);
00079     this->bumpStats(x.first, &arg);
00080     this->bumpStats(x.second, &arg);
00081     //    cout.precision(3);
00082     //    cout<<text()<<"  "<<x<<endl;
00083     return x;
00084   }
00085   //
00086   inline
00087     IFnOfParticleParameters2* FnOfParticleParameters2Ptr::clone() const {
00088     IFnOfParticleParameters2* nptr = new FnOfParticleParameters2Ptr(*this);
00089     return nptr;
00090   }
00091   //
00092 }
00093 #endif
00094 
00095   
00096 
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 

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