casacore
|
#include <MSTableIndex.h>
Public Member Functions | |
MSTableIndex () | |
no index attached, use the attach function or assignment operator to change that More... | |
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. More... | |
MSTableIndex (const MSTableIndex &other) | |
construct one from another More... | |
virtual | ~MSTableIndex () |
MSTableIndex & | operator= (const MSTableIndex &other) |
assignment operator, refernce semantics More... | |
void | attach (const Table &subTable, const Vector< String > &indexCols, ColumnsIndex::Compare *compareFunction=0) |
attach this to a subtable using indexCols More... | |
virtual void | setChanged () |
Call this when an index in an existing row has changed. More... | |
virtual Record & | accessKey () |
access the record of index (integer) keys More... | |
virtual Double & | time () |
access the TIME to use in the search (seconds) More... | |
virtual Double & | interval () |
access the INTERVAL to use in the search (seconds), must be >= 0 More... | |
virtual RowNumbers | getRowNumbers () |
get all of the rows in the subTable which have data during the indicated time and interval values. More... | |
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()). More... | |
virtual Bool | isNull () |
is this attached to a null table More... | |
virtual Table & | table () |
return the subtable being indexed More... | |
Private Member Functions | |
void | clear () |
void | makeKeys () |
Bool | keysChanged () |
void | getInternals () |
void | nearestTime () |
Private Attributes | |
Table | tab_p |
the subtable More... | |
ScalarColumn< Double > | timeColumn_p |
ScalarColumn< Double > | intervalColumn_p |
Vector< Double > | timeVec_p |
Vector< Double > | intervalVec_p |
const Double * | timeVals_p |
const Double * | intervalVals_p |
Bool | deleteItTime_p |
Bool | deleteItInterval_p |
Record * | key_p |
Internal keys - set by user. More... | |
Block< RecordFieldPtr< Int > > | intKeys_p |
Double | time_p |
Double | interval_p |
Vector< Int > | lastKeys_p |
last known integer key values More... | |
Double | lastTime_p |
last known time and interval More... | |
Double | lastInterval_p |
RowNumbers | lastSearch_p |
last search result - matching integer keys More... | |
Int64 | lastNearest_p |
last nearest More... | |
Bool | nearestFound_p |
Bool | nearestReady_p |
rownr_t | nrows_p |
last known sub-table size More... | |
Bool | hasChanged_p |
ColumnsIndex * | index_p |
Block< RecordFieldPtr< Int > > | indexKeys_p |
Bool | hasTime_p |
Bool | hasInterval_p |
Public interface
Definition at line 82 of file MSTableIndex.h.
casacore::MSTableIndex::MSTableIndex | ( | ) |
no index attached, use the attach function or assignment operator to change that
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.
casacore::MSTableIndex::MSTableIndex | ( | const MSTableIndex & | other | ) |
construct one from another
|
virtual |
|
inlinevirtual |
access the record of index (integer) keys
Definition at line 112 of file MSTableIndex.h.
References key_p.
void casacore::MSTableIndex::attach | ( | const Table & | subTable, |
const Vector< String > & | indexCols, | ||
ColumnsIndex::Compare * | compareFunction = 0 |
||
) |
attach this to a subtable using indexCols
|
private |
|
private |
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.
|
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 >
|
inlinevirtual |
access the INTERVAL to use in the search (seconds), must be >= 0
Definition at line 118 of file MSTableIndex.h.
References interval_p.
|
inlinevirtual |
is this attached to a null table
Definition at line 131 of file MSTableIndex.h.
References casacore::Table::isNull(), and tab_p.
|
private |
|
private |
|
private |
MSTableIndex& casacore::MSTableIndex::operator= | ( | const MSTableIndex & | other | ) |
assignment operator, refernce semantics
|
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
|
inlinevirtual |
|
inlinevirtual |
access the TIME to use in the search (seconds)
Definition at line 115 of file MSTableIndex.h.
References time_p.
|
private |
Definition at line 142 of file MSTableIndex.h.
|
private |
Definition at line 142 of file MSTableIndex.h.
|
private |
Definition at line 164 of file MSTableIndex.h.
|
private |
Definition at line 168 of file MSTableIndex.h.
|
private |
Definition at line 168 of file MSTableIndex.h.
|
private |
Definition at line 166 of file MSTableIndex.h.
|
private |
Definition at line 167 of file MSTableIndex.h.
|
private |
Definition at line 147 of file MSTableIndex.h.
Referenced by interval().
|
private |
Definition at line 139 of file MSTableIndex.h.
|
private |
Definition at line 141 of file MSTableIndex.h.
Definition at line 140 of file MSTableIndex.h.
|
private |
Definition at line 146 of file MSTableIndex.h.
|
private |
Internal keys - set by user.
Definition at line 145 of file MSTableIndex.h.
Referenced by accessKey().
|
private |
Definition at line 152 of file MSTableIndex.h.
last known integer key values
Definition at line 150 of file MSTableIndex.h.
|
private |
last nearest
Definition at line 158 of file MSTableIndex.h.
|
private |
last search result - matching integer keys
Definition at line 155 of file MSTableIndex.h.
|
private |
last known time and interval
Definition at line 152 of file MSTableIndex.h.
|
private |
Definition at line 159 of file MSTableIndex.h.
|
private |
Definition at line 159 of file MSTableIndex.h.
|
private |
last known sub-table size
Definition at line 162 of file MSTableIndex.h.
|
private |
|
private |
Definition at line 147 of file MSTableIndex.h.
Referenced by time().
|
private |
Definition at line 139 of file MSTableIndex.h.
|
private |
Definition at line 141 of file MSTableIndex.h.
Definition at line 140 of file MSTableIndex.h.