casacore
Public Member Functions | Protected Attributes | List of all members

More...

#include <MeasTableMul.h>

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

std::mutex itsMutex
 
Int64 itsLastUsed
 
std::vector< Int64itsUsed
 
std::vector< DoubleitsTimes
 
std::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 91 of file MeasTableMul.h.

Constructor & Destructor Documentation

◆ MeasTableMul()

casacore::MeasTableMul::MeasTableMul ( )

◆ ~MeasTableMul()

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

Definition at line 95 of file MeasTableMul.h.

Member Function Documentation

◆ calc()

virtual void casacore::MeasTableMul::calc ( Matrix< Double > &  ,
Double  time 
)
pure virtual

◆ clear()

void casacore::MeasTableMul::clear ( )

◆ getArray()

CountedPtr<Matrix<Double> > casacore::MeasTableMul::getArray ( Double  time,
Double  epsilon 
)

◆ init()

virtual void casacore::MeasTableMul::init ( )
pure virtual

Member Data Documentation

◆ itsArrays

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

Definition at line 105 of file MeasTableMul.h.

◆ itsDefArray

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

Definition at line 106 of file MeasTableMul.h.

◆ itsLastUsed

Int64 casacore::MeasTableMul::itsLastUsed
protected

Definition at line 102 of file MeasTableMul.h.

◆ itsMutex

std::mutex casacore::MeasTableMul::itsMutex
protected

Definition at line 101 of file MeasTableMul.h.

◆ itsTimes

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

Definition at line 104 of file MeasTableMul.h.

◆ itsUsed

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

Definition at line 103 of file MeasTableMul.h.


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