|
casacore
|
#include <MeasTableMul.h>
Public Member Functions | |
| MeasTableMul () | |
| virtual | ~MeasTableMul () |
| void | clear () |
| std::shared_ptr< 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< Int64 > | itsUsed |
| std::vector< Double > | itsTimes |
| std::vector< std::shared_ptr< Matrix< Double > > > | itsArrays |
| Matrix< Double > | itsDefArray |
MeasTableMul provides thread-safe access to time-dependent multiplier matrices
Internal
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 std::shared_ptr<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 std::shared_ptr is compiled thread-safe.
The class provides two virtual functions.
Class MeasTable shows how it is used.
Definition at line 88 of file MeasTableMul.h.
| casacore::MeasTableMul::MeasTableMul | ( | ) |
|
inlinevirtual |
Definition at line 92 of file MeasTableMul.h.
Implemented in casacore::MeasTableMulAber1950, casacore::MeasTableMulAber, casacore::MeasTableMulPosEarthXY, casacore::MeasTableMulPosEarthZ, casacore::MeasTableMulPosSunXY, casacore::MeasTableMulPosSunZ, casacore::MeasTableMulSC1950, casacore::MeasTableMulSC2000A, casacore::MeasTableMulSC2000B, and casacore::MeasTableMulSC.
References casacore::time().
| void casacore::MeasTableMul::clear | ( | ) |
| std::shared_ptr< Matrix< Double > > casacore::MeasTableMul::getArray | ( | Double | time, |
| Double | epsilon ) |
References casacore::time().
|
pure virtual |
Implemented in casacore::MeasTableMulAber1950, casacore::MeasTableMulAber, casacore::MeasTableMulPosEarthXY, casacore::MeasTableMulPosEarthZ, casacore::MeasTableMulPosSunXY, casacore::MeasTableMulPosSunZ, casacore::MeasTableMulSC1950, casacore::MeasTableMulSC2000A, casacore::MeasTableMulSC2000B, and casacore::MeasTableMulSC.
Definition at line 102 of file MeasTableMul.h.
Definition at line 103 of file MeasTableMul.h.
|
protected |
Definition at line 99 of file MeasTableMul.h.
|
protected |
Definition at line 98 of file MeasTableMul.h.
|
protected |
Definition at line 101 of file MeasTableMul.h.
|
protected |
Definition at line 100 of file MeasTableMul.h.