#include <ProcessedFlatTester.h>
Inheritance diagram for FastShower::ProcessedFlatTester:
Public Methods | |
ProcessedFlatTester (bool verbose) | |
~ProcessedFlatTester () | |
virtual TestStat | test () |
virtual void | results () const |
Private Methods | |
TestStat | test1 () |
Private Attributes | |
TestStat | m_ts |
bool | m_verbose |
|
Definition at line 26 of file ProcessedFlatTester.h. References m_verbose.
00026 :m_verbose(verbose){} |
|
Definition at line 27 of file ProcessedFlatTester.h.
00027 {} |
|
Implements FastShower::ITester. Definition at line 13 of file ProcessedFlatTester.cxx.
|
|
Implements FastShower::ITester. Definition at line 65 of file ProcessedFlatTester.cxx. References m_ts.
|
|
Definition at line 18 of file ProcessedFlatTester.cxx. References FastShower::TestStat::incFail(), FastShower::TestStat::incPass(), and FastShower::ProcessedFlat::sample(). Referenced by test().
00018 { 00019 TestStat ts; 00020 const IDistProcessor* lp1 = new LinearProcessor(1., 0.); 00021 const IDistProcessor* lp2 = new LinearProcessor(2., 0.); 00022 const IDistProcessor* lp3 = new LinearProcessor(1., 1.); 00023 ProcessedFlat pf; 00024 00025 bool pass = true; 00026 const int maxtry = 1000; 00027 00028 int i = maxtry; 00029 while(i!=0 && pass){ 00030 --i; 00031 double samp=pf.sample(lp1); 00032 // cout<<"[0,1) "<<samp<<endl; 00033 if (samp <0. || samp>=1.) pass = false; 00034 } 00035 pass ? ts.incPass():ts.incFail(); 00036 00037 00038 pass = true; 00039 i = maxtry; 00040 00041 while(i!=0 && pass){ 00042 --i; 00043 double samp=pf.sample(lp2); 00044 // cout<<"[0,2) "<<samp<<endl; 00045 if (samp <0. || samp>=2.) pass = false; 00046 } 00047 pass ? ts.incPass():ts.incFail(); 00048 00049 00050 pass = true; 00051 i = maxtry; 00052 00053 while(i!=0 && pass){ 00054 --i; 00055 double samp=pf.sample(lp3); 00056 // cout<<"[1,2) "<<samp<<endl; 00057 if (samp <1. || samp>=2.) pass = false; 00058 } 00059 00060 pass ? ts.incPass():ts.incFail(); 00061 00062 return ts; 00063 } |
|
Definition at line 34 of file ProcessedFlatTester.h. |
|
Definition at line 35 of file ProcessedFlatTester.h. Referenced by ProcessedFlatTester(). |