casa
$Rev:20696$
|
Wrapping of IAU SOFA Fortran routines and test class. More...
#include <SofaTest.h>
Public Member Functions | |
SofaTest () | |
Constructors Create an empty SofaTest class, ready for accumulation. | |
SofaTest (const SofaTest &other) | |
Copy. | |
~SofaTest () | |
Destructor. | |
SofaTest & | operator= (const SofaTest &other) |
Operators Assign. | |
void | clear () |
Methods Clear the test class. | |
void | put (const Double in) |
Accumulate statistics. | |
void | show (ostream &os) |
Show statistics. | |
void | showHisto (ostream &os) |
Private Member Functions | |
void | copy (const SofaTest &other) |
Methods Copy object. | |
Private Attributes | |
uInt | n_p |
Data Count. | |
Double | sum_p |
Sum values. | |
Double | sq_p |
Sum squared. | |
Double | max_p |
Max found. | |
Double | min_p |
Min found. | |
Double | hstep_p |
Step in histogram. | |
uInt | hsize_p |
Histogram size (really (n-1)/2) | |
uInt | hwidth_p |
Histogram width. | |
Int * | histo_p |
Histogram. | |
Static Private Attributes | |
static const uInt | HISTO_WIDTH |
Histogram resolution. |
Wrapping of IAU SOFA Fortran routines and test class.
Public interface
The definition in this file enable the use of the IAU SOFA Fortran routines in the C++ test routines. By using the provided macro IAUR care is taken of SOFA prefixes and probable extra underscores given by some compilers.
For information on SOFA see the SOFA page at IAU or at the currenthome of SOFA at Rutherford
The SofaTest class can be used to provide histogram of test data. The resolution is defaulted to 500 steps, compressed to 40 in the output.
SofaTest dpsi; // Create an histogram class // Loop over the following two statements to fill histogram // Calculate a Double dpsival dpsi.put(dpsival); // Show the result cout.precision(4); cout << "aips++ dpsi(mas):" << endl; dpsi.show(cout); dpsi.showHisto(cout);
The result will look like:
aips++ dpsi (mas): 5001 points were accumulated with max = 1.529e-09, and min = -1.61e-09 and an average of 5.066e-12 and a standard deviation of 2.42e-10 23 counts per step; 0.0004 value. |* |* |* |* |* |* |* |* |* |* |* |* |* |* |* |* |-* |-* |---* |---* |-----* |---------* |---------------------* _--------------------------------------------------------* |---------------------------------------------------------* |----------------------* |------------* |------* |----* |--* |-* |-* |* |* |* |* |* |* |* |* |* |* |* |* |*
To enable in-line testing of the aips++ Measures conversion routines.
Definition at line 134 of file SofaTest.h.
Constructors Create an empty SofaTest class, ready for accumulation.
casa::SofaTest::SofaTest | ( | const SofaTest & | other | ) |
Copy.
Destructor.
void casa::SofaTest::clear | ( | ) |
Methods Clear the test class.
void casa::SofaTest::copy | ( | const SofaTest & | other | ) | [private] |
Methods Copy object.
void casa::SofaTest::put | ( | const Double | in | ) |
Accumulate statistics.
void casa::SofaTest::show | ( | ostream & | os | ) |
Show statistics.
void casa::SofaTest::showHisto | ( | ostream & | os | ) |
Int* casa::SofaTest::histo_p [private] |
Histogram.
Definition at line 182 of file SofaTest.h.
const uInt casa::SofaTest::HISTO_WIDTH [static, private] |
Histogram resolution.
Definition at line 163 of file SofaTest.h.
uInt casa::SofaTest::hsize_p [private] |
Histogram size (really (n-1)/2)
Definition at line 178 of file SofaTest.h.
Double casa::SofaTest::hstep_p [private] |
Step in histogram.
Definition at line 176 of file SofaTest.h.
uInt casa::SofaTest::hwidth_p [private] |
Histogram width.
Definition at line 180 of file SofaTest.h.
Double casa::SofaTest::max_p [private] |
Max found.
Definition at line 172 of file SofaTest.h.
Double casa::SofaTest::min_p [private] |
Min found.
Definition at line 174 of file SofaTest.h.
uInt casa::SofaTest::n_p [private] |
Data Count.
Definition at line 166 of file SofaTest.h.
Double casa::SofaTest::sq_p [private] |
Sum squared.
Definition at line 170 of file SofaTest.h.
Double casa::SofaTest::sum_p [private] |
Sum values.
Definition at line 168 of file SofaTest.h.