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

FastShower::UpdatingGaussianTester Class Reference

#include <UpdatingGaussianTester.h>

Inheritance diagram for FastShower::UpdatingGaussianTester:

Inheritance graph
[legend]
Collaboration diagram for FastShower::UpdatingGaussianTester:

Collaboration graph
[legend]
List of all members.

Public Methods

 UpdatingGaussianTester (bool verbose)
 ~UpdatingGaussianTester ()
virtual TestStat test ()
virtual void results () const

Private Attributes

TestStat m_ts
bool m_verbose

Constructor & Destructor Documentation

FastShower::UpdatingGaussianTester::UpdatingGaussianTester bool    verbose [inline]
 

Definition at line 21 of file UpdatingGaussianTester.h.

References m_ts, and m_verbose.

00021 : m_ts(), m_verbose(verbose){};

FastShower::UpdatingGaussianTester::~UpdatingGaussianTester   [inline]
 

Definition at line 22 of file UpdatingGaussianTester.h.

00022 {};

Member Function Documentation

TestStat FastShower::UpdatingGaussianTester::test   [virtual]
 

Implements FastShower::ITester.

Definition at line 17 of file UpdatingGaussianTester.cxx.

References FastShower::TestStat::incFail(), FastShower::TestStat::incPass(), m_ts, and FastShower::UpdatingGaussian::parameters().

00017                                        {
00018     
00019     //create an updating gaussian with mean 0, sigma 1
00020     Dummy0* d0 = new Dummy0();    
00021     Dummy1* d1 = new Dummy1();
00022     IProcessedDist* normal = new ProcessedNormal();
00023     UpdatingGaussian gu(d0, d1, normal);
00024     
00025     //dummy particle parameters
00026 
00027     ParticleParameters pp;
00028     CoreSamples cs;
00029 
00030     PolyArgs pa(pp, cs); 
00031     //check the correct mean and sigma are returned
00032     std::pair<double, double> params = gu.parameters(pa);
00033     (params.first == 0. && params.second == 1.) ? m_ts.incPass():m_ts.incFail();
00034     return m_ts;
00035   }

void FastShower::UpdatingGaussianTester::results   const [virtual]
 

Implements FastShower::ITester.

Definition at line 37 of file UpdatingGaussianTester.cxx.

References m_ts.

00037                                             {
00038     cout<<"UpdatingGaussianTester: "<<m_ts;
00039     if(!m_ts) cout<<" Failures! ";
00040     cout<<endl;
00041   }

Member Data Documentation

TestStat FastShower::UpdatingGaussianTester::m_ts [private]
 

Definition at line 28 of file UpdatingGaussianTester.h.

Referenced by results(), test(), and UpdatingGaussianTester().

bool FastShower::UpdatingGaussianTester::m_verbose [private]
 

Definition at line 29 of file UpdatingGaussianTester.h.

Referenced by UpdatingGaussianTester().


The documentation for this class was generated from the following files:
Generated on Tue Mar 18 11:58:40 2003 for FastShowerUtils by doxygen1.3-rc1