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


More...

#include <CFCache.h>

List of all members.

Public Types

typedef Vector< CFStoreCFStoreCacheType
typedef vector< CFCacheTableCFCacheTableType

Public Member Functions

 CFCache (const char *cfDir="CF")
CFCacheoperator= (const CFCache &other)
 ~CFCache ()
void setCacheDir (const char *dir)
 Method to set the disk cache directory name.
String getCacheDir ()
void initCache ()
 Method to initialize the internal memory cache.
void initCache2 ()
Long size ()
 Compute the size of the memory cache in bytes.
void setPAChangeDetector (const ParAngleChangeDetector &paCD)
 Method to set the class to caluclate the differential Parallactic Angle.
void cacheConvFunction (CFStore &cfs, String nameQualifier="", Bool savePA=True)
 Methods to cache the convolution function.
void cacheConvFunction (const Quantity pa, CFStore &cfs, String nameQualifier="", Bool savePA=True)
 
One level lower - the Parallactic angle can be separately provided.
void cacheConvFunction (const Float pa, CFStore &cfs, String nameQualifier="", Bool savePA=True)
 
The Parallactic angle as a floating point number in radians.
Int cacheConvFunction (Int which, const Float &pa, CFType &cf, CoordinateSystem &coords, CoordinateSystem &ftcoords, Int &convSize, Vector< Int > &xConvSupport, Vector< Int > &yConvSupport, Float convSampling, String nameQualifier="", Bool savePA=True)
 
Lowest level - all information about CFStore is explicitly provided as basic types
Bool searchConvFunction (Int &which, const Quantity pa, const Quantity dPA)
 
Methods to sarch for a convolution function in the caches (disk or memory) for the give Parallactic Angle value.
Bool searchConvFunction (Int &which, const Float pa, const Float dPA)
Int loadFromDisk (Int where, Float pa, Float dPA, Int Nx, CFStoreCacheType &convFuncCache, CFStore &cfs, String nameQualifier="")
 Lower level method to load a convolution function from the disk.
Int locateConvFunction (CFStore &cfs, CFStore &cftws, const Int Nw, const Quantity pa, const Quantity dPA, const Int mosXPos=0, const Int mosYPos=0)
 Method to locate a convolution function for the given w-term index and PA value.
Int locateConvFunction (CFStore &cfs, const Int Nw, const Quantity pa, const Quantity dPA, const String &nameQualifier="", const Int mosXPos=0, const Int mosYPos=0)
Int locateConvFunction (CFStore &cfs, CFStore &cfwts, const Int Nw, const Float pa, const Float dPA, const Int mosXPos=0, const Int mosYPos=0)
Int locateConvFunction (CFStore &cfs, const Int Nw, const Float pa, const Float dPA, const String &nameQualifier="", const Int mosXPos=0, const Int mosYPos=0)
void flush ()
 Methods to write the auxillary information from the memory cache to the disk cache.
void flush (ImageInterface< Float > &avgPB, String qualifier=String(""))
Int loadAvgPB (ImageInterface< Float > &avgPB, String qualifier=String(""))
Int loadAvgPB (CountedPtr< ImageInterface< Float > > &avgPB, String qualifier=String(""))
Bool avgPBReady (const String &qualifier=String(""))

Private Member Functions

void makeFTCoordSys (const CoordinateSystem &coords, const Int &convSize, const Vector< Double > &ftRef, CoordinateSystem &ftCoords)
 Internal method to convert the direction co-ordinates of the given CoordinateSystem to its Fourier conjuguate co-ordinates.
Int addToMemCache (CFStoreCacheType &cfCache, Float pa, CFType *cf, CoordinateSystem &coords, Vector< Int > &xConvSupport, Vector< Int > &yConvSupport, Float convSampling)
 Internal method to add the given convolution function to the memory cache.
CFStoreCacheTypegetMEMCacheObj (const String &nameQualifier)

Private Attributes

CFStoreCacheType memCache_p
CFStoreCacheType memCacheWt_p
CFCacheTableType cfCacheTable_p
Matrix< IntXSup
Matrix< IntYSup
Vector< FloatpaList
Vector< FloatSampling
vector< FloatpaList_p
Matrix< Floatkey2IndexMap
String Dir
String cfPrefix
String aux
ParAngleChangeDetector paCD_p
Bool avgPBReady_p
String avgPBReadyQualifier_p

Detailed Description


Definition at line 140 of file CFCache.h.


Member Typedef Documentation

Definition at line 144 of file CFCache.h.

Definition at line 143 of file CFCache.h.


Constructor & Destructor Documentation

casa::CFCache::CFCache ( const char *  cfDir = "CF") [inline]

Definition at line 145 of file CFCache.h.


Member Function Documentation

Int casa::CFCache::addToMemCache ( CFStoreCacheType cfCache,
Float  pa,
CFType cf,
CoordinateSystem coords,
Vector< Int > &  xConvSupport,
Vector< Int > &  yConvSupport,
Float  convSampling 
) [private]

Internal method to add the given convolution function to the memory cache.

Bool casa::CFCache::avgPBReady ( const String qualifier = String("")) [inline]

Definition at line 254 of file CFCache.h.

void casa::CFCache::cacheConvFunction ( CFStore cfs,
String  nameQualifier = "",
Bool  savePA = True 
) [inline]

Methods to cache the convolution function.

Top level method interfacing with the CFStore object

Definition at line 178 of file CFCache.h.

References cacheConvFunction(), and casa::CFStore::pa.

Referenced by cacheConvFunction().

void casa::CFCache::cacheConvFunction ( const Quantity  pa,
CFStore cfs,
String  nameQualifier = "",
Bool  savePA = True 
) [inline]


One level lower - the Parallactic angle can be separately provided.

Definition at line 184 of file CFCache.h.

References cacheConvFunction(), and casa::Quantum< Qtype >::getValue().

Referenced by cacheConvFunction().

void casa::CFCache::cacheConvFunction ( const Float  pa,
CFStore cfs,
String  nameQualifier = "",
Bool  savePA = True 
)


The Parallactic angle as a floating point number in radians.

Int casa::CFCache::cacheConvFunction ( Int  which,
const Float pa,
CFType cf,
CoordinateSystem coords,
CoordinateSystem ftcoords,
Int convSize,
Vector< Int > &  xConvSupport,
Vector< Int > &  yConvSupport,
Float  convSampling,
String  nameQualifier = "",
Bool  savePA = True 
)


Lowest level - all information about CFStore is explicitly provided as basic types

Methods to write the auxillary information from the memory cache to the disk cache.

Without this call, the disk cache might not be complete. It is safe to call this method at anytime during the life of this object.

void casa::CFCache::flush ( ImageInterface< Float > &  avgPB,
String  qualifier = String("") 
)

Definition at line 157 of file CFCache.h.

CFStoreCacheType& casa::CFCache::getMEMCacheObj ( const String nameQualifier) [private]

Method to initialize the internal memory cache.

Int casa::CFCache::loadAvgPB ( ImageInterface< Float > &  avgPB,
String  qualifier = String("") 
)
Int casa::CFCache::loadAvgPB ( CountedPtr< ImageInterface< Float > > &  avgPB,
String  qualifier = String("") 
) [inline]

Definition at line 251 of file CFCache.h.

References loadAvgPB().

Referenced by loadAvgPB().

Int casa::CFCache::loadFromDisk ( Int  where,
Float  pa,
Float  dPA,
Int  Nx,
CFStoreCacheType convFuncCache,
CFStore cfs,
String  nameQualifier = "" 
)

Lower level method to load a convolution function from the disk.

Int casa::CFCache::locateConvFunction ( CFStore cfs,
CFStore cftws,
const Int  Nw,
const Quantity  pa,
const Quantity  dPA,
const Int  mosXPos = 0,
const Int  mosYPos = 0 
) [inline]

Method to locate a convolution function for the given w-term index and PA value.

This is the top level function that must be used by the clients. This uses searchConvFunction() and loadFromDisk() methods and the private methods to return a convolution function.

Returns CFDefs::NOTCACHED if the convolution function was not found in the cache, CFDefs::MEMCACHE or CFDefs::DISKCACHE if the function was found in memory or disk cache respectively.

Definition at line 224 of file CFCache.h.

References casa::Quantum< Qtype >::getValue(), and locateConvFunction().

Referenced by locateConvFunction().

Int casa::CFCache::locateConvFunction ( CFStore cfs,
const Int  Nw,
const Quantity  pa,
const Quantity  dPA,
const String nameQualifier = "",
const Int  mosXPos = 0,
const Int  mosYPos = 0 
) [inline]

Definition at line 229 of file CFCache.h.

References casa::Quantum< Qtype >::getValue(), and locateConvFunction().

Referenced by locateConvFunction().

Int casa::CFCache::locateConvFunction ( CFStore cfs,
CFStore cfwts,
const Int  Nw,
const Float  pa,
const Float  dPA,
const Int  mosXPos = 0,
const Int  mosYPos = 0 
)
Int casa::CFCache::locateConvFunction ( CFStore cfs,
const Int  Nw,
const Float  pa,
const Float  dPA,
const String nameQualifier = "",
const Int  mosXPos = 0,
const Int  mosYPos = 0 
)
void casa::CFCache::makeFTCoordSys ( const CoordinateSystem coords,
const Int convSize,
const Vector< Double > &  ftRef,
CoordinateSystem ftCoords 
) [private]

Internal method to convert the direction co-ordinates of the given CoordinateSystem to its Fourier conjuguate co-ordinates.

CFCache& casa::CFCache::operator= ( const CFCache other)
Bool casa::CFCache::searchConvFunction ( Int which,
const Quantity  pa,
const Quantity  dPA 
) [inline]


Methods to sarch for a convolution function in the caches (disk or memory) for the give Parallactic Angle value.

Definition at line 203 of file CFCache.h.

References casa::Quantum< Qtype >::getValue(), and searchConvFunction().

Referenced by searchConvFunction().

Bool casa::CFCache::searchConvFunction ( Int which,
const Float  pa,
const Float  dPA 
)
void casa::CFCache::setCacheDir ( const char *  dir) [inline]

Method to set the disk cache directory name.

Definition at line 156 of file CFCache.h.

Method to set the class to caluclate the differential Parallactic Angle.

The ParAngleChangeDetector also holds the delta PA value (user defined).

Definition at line 172 of file CFCache.h.

Compute the size of the memory cache in bytes.


Member Data Documentation

Definition at line 265 of file CFCache.h.

Definition at line 286 of file CFCache.h.

Definition at line 287 of file CFCache.h.

Definition at line 259 of file CFCache.h.

Definition at line 265 of file CFCache.h.

Definition at line 265 of file CFCache.h.

Definition at line 264 of file CFCache.h.

Definition at line 255 of file CFCache.h.

Definition at line 255 of file CFCache.h.

Definition at line 266 of file CFCache.h.

Definition at line 262 of file CFCache.h.

vector<Float> casa::CFCache::paList_p [private]

Definition at line 263 of file CFCache.h.

Definition at line 262 of file CFCache.h.

Definition at line 261 of file CFCache.h.

Definition at line 261 of file CFCache.h.


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