casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
casacore::MeasTableMul Class Referenceabstract

MeasTableMul provides thread-safe access to time-dependent multiplier matrices. More...

#include <MeasTableMul.h>

Inheritance diagram for casacore::MeasTableMul:
casacore::MeasTableMulAber casacore::MeasTableMulAber1950 casacore::MeasTableMulPosEarthXY casacore::MeasTableMulPosEarthZ casacore::MeasTableMulPosSunXY casacore::MeasTableMulPosSunZ casacore::MeasTableMulSC2000Base casacore::MeasTableMulSCBase

Public Member Functions

 MeasTableMul ()
 
virtual ~MeasTableMul ()
 
void clear ()
 
CountedPtr< Matrix< Double > > getArray (Double time, Double epsilon)
 
virtual void init ()=0
 
virtual void calc (Matrix< Double > &, Double time)=0
 

Protected Attributes

Mutex itsMutex
 
Int64 itsLastUsed
 
vector< Int64itsUsed
 
vector< DoubleitsTimes
 
vector< CountedPtr< Matrix
< Double > > > 
itsArrays
 
Matrix< DoubleitsDefArray
 

Detailed Description

MeasTableMul provides thread-safe access to time-dependent multiplier matrices.

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tMeasMath

Synopsis

MeasTableMul is a helper class for MeasTable to provide thread-safe access to the various multiplier matrices for nutation, aberration, and solar position. These matrices are dependent on the epoch.

It is an abstract base class for specific derived classes dealing with the various effects. This base class provides a cache to keep the matrices for various epochs alive. The idea is that a program will process epochs in order, where multiple threads can handle different epochs.
When the cache is full, the least recently used entry is replaced by the new matrix.

The cache does not hold Matrix objects themselves, but a CountedPtr<Matrix> to avoid that in one thread a Matrix is removed from the cache, while another thread is still using that Matrix. This assumes that CountedPtr is compiled thread-safe.

The class provides two virtual functions.

Example

Class MeasTable shows how it is used.

Definition at line 89 of file MeasTableMul.h.

Constructor & Destructor Documentation

casacore::MeasTableMul::MeasTableMul ( )
virtual casacore::MeasTableMul::~MeasTableMul ( )
inlinevirtual

Definition at line 93 of file MeasTableMul.h.

Member Function Documentation

virtual void casacore::MeasTableMul::calc ( Matrix< Double > &  ,
Double  time 
)
pure virtual
void casacore::MeasTableMul::clear ( )
CountedPtr<Matrix<Double> > casacore::MeasTableMul::getArray ( Double  time,
Double  epsilon 
)
virtual void casacore::MeasTableMul::init ( )
pure virtual

Member Data Documentation

vector<CountedPtr<Matrix<Double> > > casacore::MeasTableMul::itsArrays
protected

Definition at line 103 of file MeasTableMul.h.

Matrix<Double> casacore::MeasTableMul::itsDefArray
protected

Definition at line 104 of file MeasTableMul.h.

Int64 casacore::MeasTableMul::itsLastUsed
protected

Definition at line 100 of file MeasTableMul.h.

Mutex casacore::MeasTableMul::itsMutex
protected

Definition at line 99 of file MeasTableMul.h.

vector<Double> casacore::MeasTableMul::itsTimes
protected

Definition at line 102 of file MeasTableMul.h.

vector<Int64> casacore::MeasTableMul::itsUsed
protected

Definition at line 101 of file MeasTableMul.h.


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