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

#include <FITSTimedTable.h>

Inheritance diagram for casa::FITSTimedTable:
casa::FITSTabular

List of all members.

Public Member Functions

 FITSTimedTable ()
 This is not connected to any data, isValid always returns True, keywords and description return the default versions hasChanged returns False, name returns an empty string pastEnd returns False and next does nothing.
 FITSTimedTable (FITSTabular *originalTable, uInt whichColumnIsTime=0)
 Note, originalTable cannot be destructed, reopened, ...,during the lifetime of this object.
 ~FITSTimedTable ()
virtual Bool isValid () const
 isValid() returns False if this object isn't a valid Tabular data structure.
virtual const TableRecordkeywords () const
 Returns keywords which are associated with the underlying FITS files.
virtual const RecordDescdescription () const
 Returns the description of the underlying FITS table.
virtual const Recordunits () const
 Returns any TUNITnnn associated with a column (the field names are the column names, each field value is the TUNITnnn value for that field).
virtual const RecorddisplayFormats () const
 Returns any TDISPnnn associated with a column (the field names are the column names, each field value is the TDISPnnn value for that field).
virtual const Recordnulls () const
 Returns any TNULLnnn associated with a column (the field names are the column names, each field value is the TNULLnnn value for that field).
virtual Bool hasChanged () const
 Has the description changed since construction, default is False.
virtual void resetChangedFlag ()
 reset the changed flag, default do nothing
virtual const Stringname () const
 return the name
virtual Bool pastEnd () const
 Returns True if we have advanced past the end of data.
virtual Bool pastEnd ()
virtual void next ()
 Advance the row if possible (guaranteed harmless if pastEnd() is True.
virtual void setTime (Double time)
 interpolate to the desired time which must be >= the currentTime() This uses a linear interpolation between adjacent floating point values.
virtual const RecordcurrentRow () const
 Return the currentRow.
virtual RecordcurrentRow ()
Double currentTime () const
 What is the time of the current row?
Bool ok () const
 this is True if the last setTime() finished as expected It is False only if the requested time is before the current time and the timed table as just been opened
Double nextTime ()
 What will the time of the next row be? Returns a very large number if it is past the end of the table.

Private Member Functions

void initNowRecord (const RecordDesc &desc)
void initNextRecord (const RecordDesc &desc)

Private Attributes

Bool atStart_p
Bool ok_p
Bool hasChanged_p
Bool changePending_p
FITSTabulartable_p
Recordrow_now_p
Recordrow_next_p
RORecordFieldPtr< Doubletime_now_p
RORecordFieldPtr< Doubletime_next_p
RecordDesc rowDesc_p
Int how_past_end_p
uInt timeColumn_p
TableRecord dummyKeywords
Record dummyUnits
Record dummyDisps
Record dummyNulls

Detailed Description

Intended use:

Public interface

 <h3>Review Status</h3><dl><dt>Date Reviewed:<dd>yyyy/mm/dd</dl> 

Prerequisite

Etymology

Synopsis

FITSTimedTable is used to look at FITS tables which have a time column. In particular, it peeks ahead, and knows the time of the currentRow and of the nextRow.

It is constructed with a pointer to any FITSTabular. Presently, no memory management is imposed to ensure that the pointer remains valid.

Example

Motivation

To Do

Definition at line 73 of file FITSTimedTable.h.


Constructor & Destructor Documentation

This is not connected to any data, isValid always returns True, keywords and description return the default versions hasChanged returns False, name returns an empty string pastEnd returns False and next does nothing.

setTime does nothing, currentRow returns an empty record and currentTime returns 0.0 and ok returns True and nextTime returns 0.0

casa::FITSTimedTable::FITSTimedTable ( FITSTabular originalTable,
uInt  whichColumnIsTime = 0 
)

Note, originalTable cannot be destructed, reopened, ...,during the lifetime of this object.


Member Function Documentation

virtual const Record& casa::FITSTimedTable::currentRow ( ) const [virtual]

Return the currentRow.

This is guaranteed to be valid so long as only member functions of this base class are called (so you can safely attach RecordFieldPtr objects to it. The result is undefined if pastEnd() is True.

Implements casa::FITSTabular.

virtual Record& casa::FITSTimedTable::currentRow ( ) [virtual]

What is the time of the current row?

virtual const RecordDesc& casa::FITSTimedTable::description ( ) const [virtual]

Returns the description of the underlying FITS table.

Implements casa::FITSTabular.

virtual const Record& casa::FITSTimedTable::displayFormats ( ) const [virtual]

Returns any TDISPnnn associated with a column (the field names are the column names, each field value is the TDISPnnn value for that field).

Note that only those columns with a non-empty TDISPnnn have an entry in the displayFormats() Record.

Implements casa::FITSTabular.

virtual Bool casa::FITSTimedTable::hasChanged ( ) const [inline, virtual]

Has the description changed since construction, default is False.

Reimplemented from casa::FITSTabular.

Definition at line 96 of file FITSTimedTable.h.

References hasChanged_p.

void casa::FITSTimedTable::initNextRecord ( const RecordDesc desc) [private]
void casa::FITSTimedTable::initNowRecord ( const RecordDesc desc) [private]
virtual Bool casa::FITSTimedTable::isValid ( ) const [virtual]

isValid() returns False if this object isn't a valid Tabular data structure.

Implements casa::FITSTabular.

virtual const TableRecord& casa::FITSTimedTable::keywords ( ) const [virtual]

Returns keywords which are associated with the underlying FITS files.

Implements casa::FITSTabular.

virtual const String& casa::FITSTimedTable::name ( ) const [inline, virtual]

return the name

Implements casa::FITSTabular.

Definition at line 98 of file FITSTimedTable.h.

References casa::FITSTabular::name(), and table_p.

virtual void casa::FITSTimedTable::next ( ) [virtual]

Advance the row if possible (guaranteed harmless if pastEnd() is True.

Implements casa::FITSTabular.

What will the time of the next row be? Returns a very large number if it is past the end of the table.

virtual const Record& casa::FITSTimedTable::nulls ( ) const [virtual]

Returns any TNULLnnn associated with a column (the field names are the column names, each field value is the TNULLnnn value for that field).

Note that only those columns with a specific entry for TNULLnnn and which have not been promoted to doubles due TSCAL and TZERO values will have an entry in the nulls() Record. The meaning of TNULL is only defined for integer and byte columns. When a column is promoted to a double because of scaling, any TNULL values will be assigned a value of NaN.

Implements casa::FITSTabular.

Bool casa::FITSTimedTable::ok ( ) const [inline]

this is True if the last setTime() finished as expected It is False only if the requested time is before the current time and the timed table as just been opened

Definition at line 117 of file FITSTimedTable.h.

References ok_p.

virtual Bool casa::FITSTimedTable::pastEnd ( ) const [virtual]

Returns True if we have advanced past the end of data.

Implements casa::FITSTabular.

virtual Bool casa::FITSTimedTable::pastEnd ( ) [virtual]
virtual void casa::FITSTimedTable::resetChangedFlag ( ) [inline, virtual]

reset the changed flag, default do nothing

Reimplemented from casa::FITSTabular.

Definition at line 97 of file FITSTimedTable.h.

References casa::False, and hasChanged_p.

virtual void casa::FITSTimedTable::setTime ( Double  time) [virtual]

interpolate to the desired time which must be >= the currentTime() This uses a linear interpolation between adjacent floating point values.

Non-floating point values are NOT interpolated but have the value of the most recent actual row. On the last row of the table, not interpolation is done.

virtual const Record& casa::FITSTimedTable::units ( ) const [virtual]

Returns any TUNITnnn associated with a column (the field names are the column names, each field value is the TUNITnnn value for that field).

Note that only those columns with a non-empty TUNITnnn have an entry in the units() Record.

Implements casa::FITSTabular.


Member Data Documentation

Definition at line 123 of file FITSTimedTable.h.

Definition at line 126 of file FITSTimedTable.h.

Definition at line 137 of file FITSTimedTable.h.

Definition at line 135 of file FITSTimedTable.h.

Definition at line 138 of file FITSTimedTable.h.

Definition at line 136 of file FITSTimedTable.h.

Definition at line 125 of file FITSTimedTable.h.

Referenced by hasChanged(), and resetChangedFlag().

Definition at line 133 of file FITSTimedTable.h.

Definition at line 124 of file FITSTimedTable.h.

Referenced by ok().

Definition at line 129 of file FITSTimedTable.h.

Definition at line 128 of file FITSTimedTable.h.

Definition at line 132 of file FITSTimedTable.h.

Definition at line 127 of file FITSTimedTable.h.

Referenced by name().

Definition at line 131 of file FITSTimedTable.h.

Definition at line 130 of file FITSTimedTable.h.

Definition at line 134 of file FITSTimedTable.h.


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