casa  $Rev:20696$
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
casa::PlotMSCacheIndexer Class Reference

#include <PlotMSCacheIndexer.h>

List of all members.

Public Member Functions

 PlotMSCacheIndexer (PlotMSCache *plotmscache)
 Constructor which takes parent PlotMS.
 ~PlotMSCacheIndexer ()
 Destructor.
void setUpPlot (PMS::Axis xAxis, PMS::Axis yAxis)
 Set up indexing for the plot.
Int nPoints () const
 Report the total number of points currently arranged for plotting (TBD: this is incorrect unless ALL cache spaces are full!!)
Matrix< Int > & chunkShapes ()
 CAche shapes:
Bool indexerReady () const
 Return if the indexer is ready (setUpPlot has been run)
void getRanges (Double &minX, Double &maxX, Double &minY, Double &maxY)
 Get X and Y limits TBD: flagged/unflagged.
Double getX (Int i)
 Get single values for x-y plotting by global index.
Double getY (Int i)
void getXY (Int i, Double &x, Double &y)
Bool getFlagMask (Int i)
Double getX (Int ch, Int irel)
 Get single values by chunk and relative index (implicitly requires that get?FromCache_ method pointers are set)
Double getY (Int ch, Int irel)
PlotLogMessagelocateRange (const Vector< PlotRegion > &regions)
 Locate datum nearest to specified x,y (amp vs freq hardwired versions)
PlotLogMessageflagRange (const PlotMSFlagging &flagging, const Vector< PlotRegion > &regions, Bool flag=True)
void reportMeta (Double x, Double y, stringstream &ss)
 Report meta info for current value of currChunk_/irel_.
void flagInCache (const PlotMSFlagging &flagging, Bool flag)
 Set flags in the cache.
void setPlotMask (Int chunk)
 Sets the plot mask for a single chunk.
void deleteMask ()
 Clean up the plot mask.
void flagInVisSet (const PlotMSFlagging &flagging, Vector< Int > &chunks, Vector< Int > &relids, Bool flag)
 Set flags in the MS.

Static Public Attributes

static const String CLASS_NAME
 Convenient access to class name.

Private Member Functions

 PlotMSCacheIndexer (const PlotMSCacheIndexer &mc)
 Forbid copy for now.
void getAxesMask (PMS::Axis axis, Vector< Bool > &axismask)
void setMethod (PlotMSCacheMemPtr &getmethod, PMS::Axis axis)
void setIndexer (IndexerMethodPtr &indexmethod, PMS::Axis axis)
void setCollapser (CollapseMethodPtr &collmethod, PMS::Axis axis)
Int getIndex0000 (Int ch, Int irel)
 Directly implemented index calculators (generic index methods point to one of these depending upon axis choice)
Int getIndex1000 (Int ch, Int irel)
Int getIndex0100 (Int ch, Int irel)
Int getIndex0010 (Int ch, Int irel)
Int getIndex0110 (Int ch, Int irel)
Int getIndex1110 (Int ch, Int irel)
Int getIndex0001 (Int ch, Int irel)
void collapseMask0000 (Int ch, Array< Bool > &collmask)
 TBD: corr/bsln-dep (e.g., WEIGHT) inline Int getIndex1010(Int ch,Int irel) { return.
void collapseMask1000 (Int ch, Array< Bool > &collmask)
void collapseMask0100 (Int ch, Array< Bool > &collmask)
void collapseMask0010 (Int ch, Array< Bool > &collmask)
void collapseMask0110 (Int ch, Array< Bool > &collmask)
void collapseMask1110 (Int ch, Array< Bool > &collmask)
void collapseMask0001 (Int ch, Array< Bool > &collmask)
Int nChunk () const
 void collapseMask1010(Int ch,Array<Bool>& collmask);
Double refTime ()
 Report the reference time for this cache (in seconds)
void setChunk (Int i)
 Set currChunk_ according to a supplied index.
void computeRanges ()
 Computes the X and Y limits for the currently set axes.
unsigned int nPointsForAxis (PMS::Axis axis) const
 Returns the number of points loaded for the given axis or 0 if not loaded.
void logInfo (const String &method, const String &message)
 Convenience methods that call log() with the given method name and the appropriate event type.
void logDebug (const String &method, const String &message)
void logWarn (const String &method, const String &message)
void logError (const String &method, const String &message)
void log (const String &method, const String &message, int eventType)
 Logs the given message from the given method name as the given event type (see PlotLogger).

Private Attributes

PlotMSCacheplotmscache_
 Private data.
PlotMSCacheMemPtr getXFromCache_
 Pointers to methods for axis flexibility.
PlotMSCacheMemPtr getYFromCache_
IndexerMethodPtr XIndexer_
IndexerMethodPtr YIndexer_
CollapseMethodPtr collapseXMask_
CollapseMethodPtr collapseYMask_
Int currChunk_
 The in-focus chunk and relative index offset.
Int irel_
Int lasti_
Vector< IntnPoints_
 The cumulative running total of points.
PMS::Axis currentX_
 Current setup/state.
PMS::Axis currentY_
bool indexerReady_
Vector< BoolnetAxesMask_
 Axes mask.
Vector< Inticorrmax_
 Indexing parameters.
Vector< Intichanmax_
Vector< Intibslnmax_
Vector< Intidatamax_
Vector< Intnperchan_
Vector< Intnperbsln_
Vector< Intnperant_
Vector< Intichanbslnmax_
Vector< Intiantmax_
PtrBlock< Array< Bool > * > plmask_
 collapsed flag mask for plotting
Double xmin_
 Nominal axes limits.
Double ymin_
Double xflmin_
Double yflmin_
Double xmax_
Double ymax_
Double xflmax_
Double yflmax_

Detailed Description

Definition at line 47 of file PlotMSCacheIndexer.h.


Constructor & Destructor Documentation

casa::PlotMSCacheIndexer::PlotMSCacheIndexer ( PlotMSCache plotmscache)

Constructor which takes parent PlotMS.

casa::PlotMSCacheIndexer::~PlotMSCacheIndexer ( )

Destructor.

casa::PlotMSCacheIndexer::PlotMSCacheIndexer ( const PlotMSCacheIndexer mc) [private]

Forbid copy for now.


Member Function Documentation

Matrix<Int>& casa::PlotMSCacheIndexer::chunkShapes ( ) [inline]

CAche shapes:

Definition at line 67 of file PlotMSCacheIndexer.h.

References casa::PlotMSCache::chunkShapes(), and plotmscache_.

void casa::PlotMSCacheIndexer::collapseMask0000 ( Int  ch,
Array< Bool > &  collmask 
) [private]

TBD: corr/bsln-dep (e.g., WEIGHT) inline Int getIndex1010(Int ch,Int irel) { return.

Generate collapsed versions of the plmask

void casa::PlotMSCacheIndexer::collapseMask0001 ( Int  ch,
Array< Bool > &  collmask 
) [private]
void casa::PlotMSCacheIndexer::collapseMask0010 ( Int  ch,
Array< Bool > &  collmask 
) [private]
void casa::PlotMSCacheIndexer::collapseMask0100 ( Int  ch,
Array< Bool > &  collmask 
) [private]
void casa::PlotMSCacheIndexer::collapseMask0110 ( Int  ch,
Array< Bool > &  collmask 
) [private]
void casa::PlotMSCacheIndexer::collapseMask1000 ( Int  ch,
Array< Bool > &  collmask 
) [private]
void casa::PlotMSCacheIndexer::collapseMask1110 ( Int  ch,
Array< Bool > &  collmask 
) [private]
void casa::PlotMSCacheIndexer::computeRanges ( ) [private]

Computes the X and Y limits for the currently set axes.

In the future we may want to cache ALL ranges for all loaded values to avoid recomputation.

void casa::PlotMSCacheIndexer::deleteMask ( )

Clean up the plot mask.

void casa::PlotMSCacheIndexer::flagInCache ( const PlotMSFlagging flagging,
Bool  flag 
)

Set flags in the cache.

void casa::PlotMSCacheIndexer::flagInVisSet ( const PlotMSFlagging flagging,
Vector< Int > &  chunks,
Vector< Int > &  relids,
Bool  flag 
)

Set flags in the MS.

PlotLogMessage* casa::PlotMSCacheIndexer::flagRange ( const PlotMSFlagging flagging,
const Vector< PlotRegion > &  regions,
Bool  flag = True 
)
void casa::PlotMSCacheIndexer::getAxesMask ( PMS::Axis  axis,
Vector< Bool > &  axismask 
) [private]
Bool casa::PlotMSCacheIndexer::getFlagMask ( Int  i)
Int casa::PlotMSCacheIndexer::getIndex0000 ( Int  ch,
Int  irel 
) [inline, private]

Directly implemented index calculators (generic index methods point to one of these depending upon axis choice)

Definition at line 122 of file PlotMSCacheIndexer.h.

Int casa::PlotMSCacheIndexer::getIndex0001 ( Int  ch,
Int  irel 
) [inline, private]

Definition at line 128 of file PlotMSCacheIndexer.h.

References iantmax_, and nperant_.

Int casa::PlotMSCacheIndexer::getIndex0010 ( Int  ch,
Int  irel 
) [inline, private]

Definition at line 125 of file PlotMSCacheIndexer.h.

References ibslnmax_, and nperbsln_.

Int casa::PlotMSCacheIndexer::getIndex0100 ( Int  ch,
Int  irel 
) [inline, private]

Definition at line 124 of file PlotMSCacheIndexer.h.

References ichanmax_, and nperchan_.

Int casa::PlotMSCacheIndexer::getIndex0110 ( Int  ch,
Int  irel 
) [inline, private]

Definition at line 126 of file PlotMSCacheIndexer.h.

References ichanbslnmax_, and nperchan_.

Int casa::PlotMSCacheIndexer::getIndex1000 ( Int  ch,
Int  irel 
) [inline, private]

Definition at line 123 of file PlotMSCacheIndexer.h.

References icorrmax_.

Int casa::PlotMSCacheIndexer::getIndex1110 ( Int  ch,
Int  irel 
) [inline, private]

Definition at line 127 of file PlotMSCacheIndexer.h.

References idatamax_.

void casa::PlotMSCacheIndexer::getRanges ( Double minX,
Double maxX,
Double minY,
Double maxY 
)

Get X and Y limits TBD: flagged/unflagged.

Double casa::PlotMSCacheIndexer::getX ( Int  i)

Get single values for x-y plotting by global index.

Double casa::PlotMSCacheIndexer::getX ( Int  ch,
Int  irel 
) [inline]

Get single values by chunk and relative index (implicitly requires that get?FromCache_ method pointers are set)

Definition at line 84 of file PlotMSCacheIndexer.h.

References getXFromCache_.

void casa::PlotMSCacheIndexer::getXY ( Int  i,
Double x,
Double y 
)
Double casa::PlotMSCacheIndexer::getY ( Int  i)
Double casa::PlotMSCacheIndexer::getY ( Int  ch,
Int  irel 
) [inline]

Definition at line 85 of file PlotMSCacheIndexer.h.

References getYFromCache_.

Bool casa::PlotMSCacheIndexer::indexerReady ( ) const [inline]

Return if the indexer is ready (setUpPlot has been run)

Definition at line 70 of file PlotMSCacheIndexer.h.

References indexerReady_.

PlotLogMessage* casa::PlotMSCacheIndexer::locateRange ( const Vector< PlotRegion > &  regions)

Locate datum nearest to specified x,y (amp vs freq hardwired versions)

void casa::PlotMSCacheIndexer::log ( const String method,
const String message,
int  eventType 
) [private]

Logs the given message from the given method name as the given event type (see PlotLogger).

Referenced by logDebug(), logError(), logInfo(), and logWarn().

void casa::PlotMSCacheIndexer::logDebug ( const String method,
const String message 
) [inline, private]

Definition at line 163 of file PlotMSCacheIndexer.h.

References log(), and casa::PlotLogger::MSG_DEBUG.

void casa::PlotMSCacheIndexer::logError ( const String method,
const String message 
) [inline, private]

Definition at line 167 of file PlotMSCacheIndexer.h.

References log(), and casa::PlotLogger::MSG_ERROR.

void casa::PlotMSCacheIndexer::logInfo ( const String method,
const String message 
) [inline, private]

Convenience methods that call log() with the given method name and the appropriate event type.

Definition at line 161 of file PlotMSCacheIndexer.h.

References log(), and casa::PlotLogger::MSG_INFO.

void casa::PlotMSCacheIndexer::logWarn ( const String method,
const String message 
) [inline, private]

Definition at line 165 of file PlotMSCacheIndexer.h.

References log(), and casa::PlotLogger::MSG_WARN.

Int casa::PlotMSCacheIndexer::nChunk ( ) const [inline, private]

void collapseMask1010(Int ch,Array<Bool>& collmask);

Report the number of chunks

Definition at line 143 of file PlotMSCacheIndexer.h.

References casa::PlotMSCache::nChunk(), and plotmscache_.

Referenced by nPoints().

Int casa::PlotMSCacheIndexer::nPoints ( ) const [inline]

Report the total number of points currently arranged for plotting (TBD: this is incorrect unless ALL cache spaces are full!!)

Definition at line 64 of file PlotMSCacheIndexer.h.

References nChunk(), casa::ArrayBase::nelements(), and nPoints_.

unsigned int casa::PlotMSCacheIndexer::nPointsForAxis ( PMS::Axis  axis) const [private]

Returns the number of points loaded for the given axis or 0 if not loaded.

Double casa::PlotMSCacheIndexer::refTime ( ) [inline, private]

Report the reference time for this cache (in seconds)

Definition at line 146 of file PlotMSCacheIndexer.h.

References plotmscache_, and casa::PlotMSCache::refTime().

void casa::PlotMSCacheIndexer::reportMeta ( Double  x,
Double  y,
stringstream &  ss 
)

Report meta info for current value of currChunk_/irel_.

void casa::PlotMSCacheIndexer::setChunk ( Int  i) [private]

Set currChunk_ according to a supplied index.

void casa::PlotMSCacheIndexer::setCollapser ( CollapseMethodPtr collmethod,
PMS::Axis  axis 
) [private]
void casa::PlotMSCacheIndexer::setIndexer ( IndexerMethodPtr indexmethod,
PMS::Axis  axis 
) [private]
void casa::PlotMSCacheIndexer::setMethod ( PlotMSCacheMemPtr getmethod,
PMS::Axis  axis 
) [private]
void casa::PlotMSCacheIndexer::setPlotMask ( Int  chunk)

Sets the plot mask for a single chunk.

void casa::PlotMSCacheIndexer::setUpPlot ( PMS::Axis  xAxis,
PMS::Axis  yAxis 
)

Set up indexing for the plot.


Member Data Documentation

Convenient access to class name.

Definition at line 51 of file PlotMSCacheIndexer.h.

Definition at line 183 of file PlotMSCacheIndexer.h.

Definition at line 183 of file PlotMSCacheIndexer.h.

The in-focus chunk and relative index offset.

Definition at line 186 of file PlotMSCacheIndexer.h.

Current setup/state.

Definition at line 192 of file PlotMSCacheIndexer.h.

Definition at line 192 of file PlotMSCacheIndexer.h.

Pointers to methods for axis flexibility.

Definition at line 181 of file PlotMSCacheIndexer.h.

Referenced by getX().

Definition at line 181 of file PlotMSCacheIndexer.h.

Referenced by getY().

Definition at line 202 of file PlotMSCacheIndexer.h.

Referenced by getIndex0001().

Definition at line 199 of file PlotMSCacheIndexer.h.

Referenced by getIndex0010().

Definition at line 201 of file PlotMSCacheIndexer.h.

Referenced by getIndex0110().

Definition at line 199 of file PlotMSCacheIndexer.h.

Referenced by getIndex0100().

Indexing parameters.

Definition at line 199 of file PlotMSCacheIndexer.h.

Referenced by getIndex1000().

Definition at line 199 of file PlotMSCacheIndexer.h.

Referenced by getIndex1110().

Definition at line 193 of file PlotMSCacheIndexer.h.

Referenced by indexerReady().

Definition at line 186 of file PlotMSCacheIndexer.h.

Definition at line 186 of file PlotMSCacheIndexer.h.

Axes mask.

Definition at line 196 of file PlotMSCacheIndexer.h.

Definition at line 200 of file PlotMSCacheIndexer.h.

Referenced by getIndex0001().

Definition at line 200 of file PlotMSCacheIndexer.h.

Referenced by getIndex0010().

Definition at line 200 of file PlotMSCacheIndexer.h.

Referenced by getIndex0100(), and getIndex0110().

The cumulative running total of points.

Definition at line 189 of file PlotMSCacheIndexer.h.

Referenced by nPoints().

collapsed flag mask for plotting

Definition at line 205 of file PlotMSCacheIndexer.h.

Private data.

Parent plotms.

Definition at line 178 of file PlotMSCacheIndexer.h.

Referenced by chunkShapes(), nChunk(), and refTime().

Definition at line 208 of file PlotMSCacheIndexer.h.

Definition at line 208 of file PlotMSCacheIndexer.h.

Definition at line 182 of file PlotMSCacheIndexer.h.

Definition at line 208 of file PlotMSCacheIndexer.h.

Nominal axes limits.

Definition at line 208 of file PlotMSCacheIndexer.h.

Definition at line 208 of file PlotMSCacheIndexer.h.

Definition at line 208 of file PlotMSCacheIndexer.h.

Definition at line 182 of file PlotMSCacheIndexer.h.

Definition at line 208 of file PlotMSCacheIndexer.h.

Definition at line 208 of file PlotMSCacheIndexer.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines