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

ROCTIter: Read-only iterating interface to New Calibration tables. More...

#include <CTIter.h>

Inheritance diagram for casa::ROCTIter:
casa::CTIter

List of all members.

Public Member Functions

 ROCTIter (NewCalTable tab, const Block< String > &sortcol)
 Constructor/Destructor.
virtual ~ROCTIter ()
void reset ()
 Iteration operators.
Bool pastEnd ()
void next ()
void next0 ()
NewCalTable table () const
 Return the current table iteration.
Int nrow () const
Double thisTime () const
 Column accessors Those methods that return scalars for data coordinates (e.g., thisTime(), thisField(), etc.) return the first element of the corresponding vector of values in the current iteration.
Vector< Doubletime () const
void time (Vector< Double > &v) const
Int thisField () const
Vector< Intfield () const
void field (Vector< Int > &v) const
Int thisSpw () const
Vector< Intspw () const
void spw (Vector< Int > &v) const
Int thisScan () const
Vector< Intscan () const
void scan (Vector< Int > &v) const
Int thisObs () const
Vector< Intobs () const
void obs (Vector< Int > &v) const
Int thisAntenna1 () const
Vector< Intantenna1 () const
void antenna1 (Vector< Int > &v) const
Int thisAntenna2 () const
Vector< Intantenna2 () const
void antenna2 (Vector< Int > &v) const
Cube< Complex > cparam () const
void cparam (Cube< Complex > &c) const
Cube< Floatfparam () const
void fparam (Cube< Float > &c) const
Cube< Floatcasfparam (String what="") const
void casfparam (Cube< Float > &casf, String what="") const
Cube< FloatparamErr () const
void paramErr (Cube< Float > &c) const
Cube< Floatsnr () const
void snr (Cube< Float > &c) const
Cube< Floatwt () const
void wt (Cube< Float > &c) const
Cube< Boolflag () const
void flag (Cube< Bool > &c) const
Int nchan () const
Vector< Intchan () const
void chan (Vector< Int > &v) const
Vector< Doublefreq () const
void freq (Vector< Double > &v) const

Protected Member Functions

virtual void attach ()
 Attach accessors.

Private Member Functions

 ROCTIter (const ROCTIter &other)
 Prohibit public use of copy, assignment.
ROCTIteroperator= (const ROCTIter &other)

Private Attributes

Vector< StringsortCols_
 Data:
Bool singleSpw_
 If true, spw is unique per iteration, and it is safe to access channel axis info.
NewCalTable parentNCT_
 The parent NewCalTable (Table) object (stays in scope for the life of the CTIter)
ROCTColumns calCol_
 Access to subtables (e.g., for frequencies)
TableIteratorti_
 The underlying TableIterator.
NewCalTableinct_
 Per-iteration table.
ROCTMainColumnsiROCTMainCols_
 Per-iteration columns.

Detailed Description

ROCTIter: Read-only iterating interface to New Calibration tables.

Prerequisite

Etymology

From "calibration", "table", and "iteration".

Synopsis

The ROCTIter class provide basic iterated access to the contents of a NewCalTable. The iteration is initialized according to sort columns specified in the constructor, and access to the contents of each iteration is provided via a NewCalTable object (referencing the iterated subset of the original NewCalTable) or methods that return Vectors or Arrays of the contents of specific columns. For the latter, the Vectors/Arrays are generated only on-demand.

Example

Motivation

This class is used by calibration table clients to access calibration tables in a piecemeal fashion, e.g., for plotting, interpolation, etc.

Definition at line 76 of file CTIter.h.


Constructor & Destructor Documentation

casa::ROCTIter::ROCTIter ( NewCalTable  tab,
const Block< String > &  sortcol 
)

Constructor/Destructor.

virtual casa::ROCTIter::~ROCTIter ( ) [virtual]
casa::ROCTIter::ROCTIter ( const ROCTIter other) [private]

Prohibit public use of copy, assignment.


Member Function Documentation

void casa::ROCTIter::antenna1 ( Vector< Int > &  v) const
void casa::ROCTIter::antenna2 ( Vector< Int > &  v) const
virtual void casa::ROCTIter::attach ( ) [protected, virtual]

Attach accessors.

Reimplemented in casa::CTIter.

Referenced by reset().

Cube<Float> casa::ROCTIter::casfparam ( String  what = "") const
void casa::ROCTIter::casfparam ( Cube< Float > &  casf,
String  what = "" 
) const
void casa::ROCTIter::chan ( Vector< Int > &  v) const
Cube<Complex> casa::ROCTIter::cparam ( ) const
void casa::ROCTIter::cparam ( Cube< Complex > &  c) const
void casa::ROCTIter::field ( Vector< Int > &  v) const
void casa::ROCTIter::flag ( Cube< Bool > &  c) const
void casa::ROCTIter::fparam ( Cube< Float > &  c) const
void casa::ROCTIter::freq ( Vector< Double > &  v) const
Int casa::ROCTIter::nrow ( ) const [inline]

Definition at line 92 of file CTIter.h.

References casa::Table::nrow(), casa::TableIterator::table(), and ti_.

void casa::ROCTIter::obs ( Vector< Int > &  v) const
ROCTIter& casa::ROCTIter::operator= ( const ROCTIter other) [private]
void casa::ROCTIter::paramErr ( Cube< Float > &  c) const

Definition at line 85 of file CTIter.h.

References casa::TableIterator::pastEnd(), and ti_.

void casa::ROCTIter::reset ( ) [inline]

Iteration operators.

Definition at line 84 of file CTIter.h.

References attach(), casa::TableIterator::reset(), and ti_.

void casa::ROCTIter::scan ( Vector< Int > &  v) const
void casa::ROCTIter::snr ( Cube< Float > &  c) const
void casa::ROCTIter::spw ( Vector< Int > &  v) const
NewCalTable casa::ROCTIter::table ( ) const [inline]

Return the current table iteration.

Definition at line 90 of file CTIter.h.

References casa::TableIterator::table(), and ti_.

Column accessors Those methods that return scalars for data coordinates (e.g., thisTime(), thisField(), etc.) return the first element of the corresponding vector of values in the current iteration.

This makes the most sense when the corresponding column is a sort column in the iteration, such that the contents of the vector is in fact a unique value. (TBD: return -1 from scalar methods when column is not unique?)

void casa::ROCTIter::time ( Vector< Double > &  v) const
void casa::ROCTIter::wt ( Cube< Float > &  c) const

Member Data Documentation

Access to subtables (e.g., for frequencies)

Definition at line 183 of file CTIter.h.

Per-iteration table.

Definition at line 189 of file CTIter.h.

Per-iteration columns.

Definition at line 192 of file CTIter.h.

The parent NewCalTable (Table) object (stays in scope for the life of the CTIter)

Definition at line 180 of file CTIter.h.

If true, spw is unique per iteration, and it is safe to access channel axis info.

Definition at line 176 of file CTIter.h.

Data:

Remember the sort columns...

Definition at line 172 of file CTIter.h.

The underlying TableIterator.

Definition at line 186 of file CTIter.h.

Referenced by nrow(), pastEnd(), reset(), and table().


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