casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
casa::SofaTest Class Reference

Wrapping of IAU SOFA Fortran routines and test class. More...

#include <SofaTest.h>

List of all members.

Public Member Functions

 SofaTest ()
 Constructors Create an empty SofaTest class, ready for accumulation.
 SofaTest (const SofaTest &other)
 Copy.
 ~SofaTest ()
 Destructor.
SofaTestoperator= (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.
Inthisto_p
 Histogram.

Static Private Attributes

static const uInt HISTO_WIDTH
 Histogram resolution.

Detailed Description

Wrapping of IAU SOFA Fortran routines and test class.

Intended use:

Public interface

Review Status

Reviewed By:
wbrouw
Date Reviewed:
2003/09/08
Test programs:
tIAU2000

Synopsis

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.

Example

    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.
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |-*
     |-*
     |---*
     |---*
     |-----*
     |---------*
     |---------------------*
     _--------------------------------------------------------*
     |---------------------------------------------------------*
     |----------------------*
     |------------*
     |------*
     |----*
     |--*
     |-*
     |-*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*
     |*

Motivation

To enable in-line testing of the aips++ Measures conversion routines.

Definition at line 134 of file SofaTest.h.


Constructor & Destructor Documentation

Constructors Create an empty SofaTest class, ready for accumulation.

casa::SofaTest::SofaTest ( const SofaTest other)

Copy.

Destructor.


Member Function Documentation

Methods Clear the test class.

void casa::SofaTest::copy ( const SofaTest other) [private]

Methods Copy object.

SofaTest& casa::SofaTest::operator= ( const SofaTest other)

Operators Assign.

void casa::SofaTest::put ( const Double  in)

Accumulate statistics.

void casa::SofaTest::show ( ostream &  os)

Show statistics.

void casa::SofaTest::showHisto ( ostream &  os)

Member Data Documentation

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.

Histogram size (really (n-1)/2)

Definition at line 178 of file SofaTest.h.

Step in histogram.

Definition at line 176 of file SofaTest.h.

Histogram width.

Definition at line 180 of file SofaTest.h.

Max found.

Definition at line 172 of file SofaTest.h.

Min found.

Definition at line 174 of file SofaTest.h.

Data Count.

Definition at line 166 of file SofaTest.h.

Sum squared.

Definition at line 170 of file SofaTest.h.

Sum values.

Definition at line 168 of file SofaTest.h.


The documentation for this class was generated from the following file: