casacore
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::MSTableIndex Class Reference

More...

#include <MSTableIndex.h>

Public Member Functions

 MSTableIndex ()
 no index attached, use the attach function or assignment operator to change that
 
 MSTableIndex (const Table &subTable, const Vector< String > &indexCols, ColumnsIndex::Compare *compareFunction=0)
 construct one using the indicated subtable which is part of the parent MS using the indicated index columns.
 
 MSTableIndex (const MSTableIndex &other)
 construct one from another
 
virtual ~MSTableIndex ()
 
MSTableIndexoperator= (const MSTableIndex &other)
 assignment operator, refernce semantics
 
void attach (const Table &subTable, const Vector< String > &indexCols, ColumnsIndex::Compare *compareFunction=0)
 attach this to a subtable using indexCols
 
virtual void setChanged ()
 Call this when an index in an existing row has changed.
 
virtual RecordaccessKey ()
 access the record of index (integer) keys
 
virtual Doubletime ()
 access the TIME to use in the search (seconds)
 
virtual Doubleinterval ()
 access the INTERVAL to use in the search (seconds), must be >= 0
 
virtual RowNumbers getRowNumbers ()
 get all of the rows in the subTable which have data during the indicated time and interval values.
 
virtual Int64 getNearestRow (Bool &found)
 get the row number which falls in the interval and has the time nearest to the center of the interval (time()).
 
virtual Bool isNull ()
 is this attached to a null table
 
virtual Tabletable ()
 return the subtable being indexed
 

Private Member Functions

void clear ()
 
void makeKeys ()
 
Bool keysChanged ()
 
void getInternals ()
 
void nearestTime ()
 

Private Attributes

Table tab_p
 the subtable
 
ScalarColumn< DoubletimeColumn_p
 
ScalarColumn< DoubleintervalColumn_p
 
Vector< DoubletimeVec_p
 
Vector< DoubleintervalVec_p
 
const DoubletimeVals_p
 
const DoubleintervalVals_p
 
Bool deleteItTime_p
 
Bool deleteItInterval_p
 
Recordkey_p
 Internal keys - set by user.
 
Block< RecordFieldPtr< Int > > intKeys_p
 
Double time_p
 
Double interval_p
 
Vector< IntlastKeys_p
 last known integer key values
 
Double lastTime_p
 last known time and interval
 
Double lastInterval_p
 
RowNumbers lastSearch_p
 last search result - matching integer keys
 
Int64 lastNearest_p
 last nearest
 
Bool nearestFound_p
 
Bool nearestReady_p
 
rownr_t nrows_p
 last known sub-table size
 
Bool hasChanged_p
 
ColumnsIndexindex_p
 
Block< RecordFieldPtr< Int > > indexKeys_p
 
Bool hasTime_p
 
Bool hasInterval_p
 

Detailed Description

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Thrown Exceptions

To Do

Definition at line 79 of file MSTableIndex.h.

Constructor & Destructor Documentation

◆ MSTableIndex() [1/3]

casacore::MSTableIndex::MSTableIndex ( )

no index attached, use the attach function or assignment operator to change that

◆ MSTableIndex() [2/3]

casacore::MSTableIndex::MSTableIndex ( const Table subTable,
const Vector< String > &  indexCols,
ColumnsIndex::Compare compareFunction = 0 
)

construct one using the indicated subtable which is part of the parent MS using the indicated index columns.

All index columns must be scalar integer columns. TIME and INTERVAL will be used when present. A compare function can be provided to over-ride literal matching of column values.

◆ MSTableIndex() [3/3]

casacore::MSTableIndex::MSTableIndex ( const MSTableIndex other)

construct one from another

◆ ~MSTableIndex()

virtual casacore::MSTableIndex::~MSTableIndex ( )
virtual

Member Function Documentation

◆ accessKey()

virtual Record & casacore::MSTableIndex::accessKey ( )
inlinevirtual

access the record of index (integer) keys

Definition at line 109 of file MSTableIndex.h.

References key_p.

◆ attach()

void casacore::MSTableIndex::attach ( const Table subTable,
const Vector< String > &  indexCols,
ColumnsIndex::Compare compareFunction = 0 
)

attach this to a subtable using indexCols

◆ clear()

void casacore::MSTableIndex::clear ( )
private

◆ getInternals()

void casacore::MSTableIndex::getInternals ( )
private

◆ getNearestRow()

virtual Int64 casacore::MSTableIndex::getNearestRow ( Bool found)
virtual

get the row number which falls in the interval and has the time nearest to the center of the interval (time()).

This also has the same problem as the previous function.

◆ getRowNumbers()

virtual RowNumbers casacore::MSTableIndex::getRowNumbers ( )
virtual

get all of the rows in the subTable which have data during the indicated time and interval values.

For now, this code will miss the case where the subtable has interval = -1 and the start time is outside of the time range implied by the time and interval. If the table has changed and the time is >

◆ interval()

virtual Double & casacore::MSTableIndex::interval ( )
inlinevirtual

access the INTERVAL to use in the search (seconds), must be >= 0

Definition at line 115 of file MSTableIndex.h.

References interval_p.

◆ isNull()

virtual Bool casacore::MSTableIndex::isNull ( )
inlinevirtual

is this attached to a null table

Definition at line 128 of file MSTableIndex.h.

References casacore::Table::isNull(), and tab_p.

◆ keysChanged()

Bool casacore::MSTableIndex::keysChanged ( )
private

◆ makeKeys()

void casacore::MSTableIndex::makeKeys ( )
private

◆ nearestTime()

void casacore::MSTableIndex::nearestTime ( )
private

◆ operator=()

MSTableIndex & casacore::MSTableIndex::operator= ( const MSTableIndex other)

assignment operator, refernce semantics

◆ setChanged()

virtual void casacore::MSTableIndex::setChanged ( )
virtual

Call this when an index in an existing row has changed.

There is no need to call this when new rows are added to the table

◆ table()

virtual Table & casacore::MSTableIndex::table ( )
inlinevirtual

return the subtable being indexed

Definition at line 131 of file MSTableIndex.h.

References tab_p.

◆ time()

virtual Double & casacore::MSTableIndex::time ( )
inlinevirtual

access the TIME to use in the search (seconds)

Definition at line 112 of file MSTableIndex.h.

References time_p.

Member Data Documentation

◆ deleteItInterval_p

Bool casacore::MSTableIndex::deleteItInterval_p
private

Definition at line 139 of file MSTableIndex.h.

◆ deleteItTime_p

Bool casacore::MSTableIndex::deleteItTime_p
private

Definition at line 139 of file MSTableIndex.h.

◆ hasChanged_p

Bool casacore::MSTableIndex::hasChanged_p
private

Definition at line 161 of file MSTableIndex.h.

◆ hasInterval_p

Bool casacore::MSTableIndex::hasInterval_p
private

Definition at line 165 of file MSTableIndex.h.

◆ hasTime_p

Bool casacore::MSTableIndex::hasTime_p
private

Definition at line 165 of file MSTableIndex.h.

◆ index_p

ColumnsIndex* casacore::MSTableIndex::index_p
private

Definition at line 163 of file MSTableIndex.h.

◆ indexKeys_p

Block<RecordFieldPtr<Int> > casacore::MSTableIndex::indexKeys_p
private

Definition at line 164 of file MSTableIndex.h.

◆ interval_p

Double casacore::MSTableIndex::interval_p
private

Definition at line 144 of file MSTableIndex.h.

Referenced by interval().

◆ intervalColumn_p

ScalarColumn<Double> casacore::MSTableIndex::intervalColumn_p
private

Definition at line 136 of file MSTableIndex.h.

◆ intervalVals_p

const Double * casacore::MSTableIndex::intervalVals_p
private

Definition at line 138 of file MSTableIndex.h.

◆ intervalVec_p

Vector<Double> casacore::MSTableIndex::intervalVec_p
private

Definition at line 137 of file MSTableIndex.h.

◆ intKeys_p

Block<RecordFieldPtr<Int> > casacore::MSTableIndex::intKeys_p
private

Definition at line 143 of file MSTableIndex.h.

◆ key_p

Record* casacore::MSTableIndex::key_p
private

Internal keys - set by user.

Definition at line 142 of file MSTableIndex.h.

Referenced by accessKey().

◆ lastInterval_p

Double casacore::MSTableIndex::lastInterval_p
private

Definition at line 149 of file MSTableIndex.h.

◆ lastKeys_p

Vector<Int> casacore::MSTableIndex::lastKeys_p
private

last known integer key values

Definition at line 147 of file MSTableIndex.h.

◆ lastNearest_p

Int64 casacore::MSTableIndex::lastNearest_p
private

last nearest

Definition at line 155 of file MSTableIndex.h.

◆ lastSearch_p

RowNumbers casacore::MSTableIndex::lastSearch_p
private

last search result - matching integer keys

Definition at line 152 of file MSTableIndex.h.

◆ lastTime_p

Double casacore::MSTableIndex::lastTime_p
private

last known time and interval

Definition at line 149 of file MSTableIndex.h.

◆ nearestFound_p

Bool casacore::MSTableIndex::nearestFound_p
private

Definition at line 156 of file MSTableIndex.h.

◆ nearestReady_p

Bool casacore::MSTableIndex::nearestReady_p
private

Definition at line 156 of file MSTableIndex.h.

◆ nrows_p

rownr_t casacore::MSTableIndex::nrows_p
private

last known sub-table size

Definition at line 159 of file MSTableIndex.h.

◆ tab_p

Table casacore::MSTableIndex::tab_p
private

the subtable

Definition at line 134 of file MSTableIndex.h.

Referenced by isNull(), and table().

◆ time_p

Double casacore::MSTableIndex::time_p
private

Definition at line 144 of file MSTableIndex.h.

Referenced by time().

◆ timeColumn_p

ScalarColumn<Double> casacore::MSTableIndex::timeColumn_p
private

Definition at line 136 of file MSTableIndex.h.

◆ timeVals_p

const Double* casacore::MSTableIndex::timeVals_p
private

Definition at line 138 of file MSTableIndex.h.

◆ timeVec_p

Vector<Double> casacore::MSTableIndex::timeVec_p
private

Definition at line 137 of file MSTableIndex.h.


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