Loading...
Searching...
No Matches
casacore::MSSourceIndex Class Reference
ms package (libcasa_ms) » MSSel_module

More...

`#include <MSSourceIndex.h>`

## Public Member Functions

| MSSourceIndex ()
| no index attached, use the attach function or assignment operator to change that
| MSSourceIndex (const MSSource &source)
| construct one using the indicated SOURCE table
| MSSourceIndex (const MSSourceIndex &other)
| construct one from another
virtual | ~MSSourceIndex ()
MSSourceIndex & | operator= (const MSSourceIndex &other)
void | attach (const MSSource &source)
Int & | sourceId ()
| access to the source ID key, throws an exception if isNull() is False
Int & | spectralWindowId ()
| access to the spectral window ID key, throws an exception if isNull() is False
Vector< Int > | matchSourceName (const String &name)
| Match a source name or list of source names to a set of SOURCE_ID's.
Vector< Int > | matchSourceName (const Vector< String > &names)
Vector< Int > | matchSourceCode (const String &code)
| add for source code selection
RowNumbers | getRowNumbersOfSourceID (const Int sid)
| Return rows matching a SourceID.
Public Member Functions inherited from casacore::MSTableIndex
| 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 ()
MSTableIndex & | operator= (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 Record & | accessKey ()
| access the record of index (integer) keys
virtual Double & | time ()
| access the TIME to use in the search (seconds)
virtual Double & | interval ()
| 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 Table & | table ()
| return the subtable being indexed

## Static Protected Member Functions

static Int | compare (const Block< void * > &fieldPtrs, const Block< void * > &dataPtrs, const Block< Int > &dataTypes, rownr_t index)
| the specialized compare function to pass to the ColumnsIndex object.

## Private Member Functions

void | attachIds ()

## Private Attributes

MSSourceColumns * | msSourceCols_p
| Pointer to local MSSourceColumns object.
RecordFieldPtr< Int > | sourceId_p
RecordFieldPtr< Int > | spwId_p

## Detailed Description

### Intended use:

Public interface

### Review Status

Date Reviewed:
  yyyy/mm/dd

### Prerequisite

- MeasurementSet
- MSTableIndex

### Etymology

### Synopsis

### Example

### Motivation

### Thrown Exceptions

Definition at line 71 of file MSSourceIndex.h.

## Constructor & Destructor Documentation

## MSSourceIndex() [1/3]

casacore::MSSourceIndex::MSSourceIndex | ( |  | ) |

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

Referenced by MSSourceIndex(), and operator=().

## MSSourceIndex() [2/3]

casacore::MSSourceIndex::MSSourceIndex | ( | const MSSource & | source | ) |

construct one using the indicated SOURCE table

## MSSourceIndex() [3/3]

casacore::MSSourceIndex::MSSourceIndex | ( | const MSSourceIndex & | other | ) |

construct one from another

References MSSourceIndex().

## ~MSSourceIndex()

virtual casacore::MSSourceIndex::~MSSourceIndex | ( |  | ) |

virtual

## Member Function Documentation

## attach()

void casacore::MSSourceIndex::attach | ( | const MSSource & | source | ) |

## attachIds()

void casacore::MSSourceIndex::attachIds | ( |  | ) |

private

## compare()

Int casacore::MSSourceIndex::compare | ( | const Block< void * > & | fieldPtrs,
|  | const Block< void * > & | dataPtrs,
|  | const Block< Int > & | dataTypes,
|  | rownr_t | index )

static protected

the specialized compare function to pass to the ColumnsIndex object.

This supports -1 values for the SPECTRAL_WINDOW_ID

## getRowNumbersOfSourceID()

RowNumbers casacore::MSSourceIndex::getRowNumbersOfSourceID | ( | const Int | sid | ) |

Return rows matching a SourceID.

## matchSourceCode()

Vector< Int > casacore::MSSourceIndex::matchSourceCode | ( | const String & | code | ) |

add for source code selection

## matchSourceName() [1/2]

Vector< Int > casacore::MSSourceIndex::matchSourceName | ( | const String & | name | ) |

Match a source name or list of source names to a set of SOURCE_ID's.

References casacore::name().

## matchSourceName() [2/2]

Vector< Int > casacore::MSSourceIndex::matchSourceName | ( | const Vector< String > & | names | ) |

## operator=()

MSSourceIndex & casacore::MSSourceIndex::operator= | ( | const MSSourceIndex & | other | ) |

References MSSourceIndex().

## sourceId()

Int & casacore::MSSourceIndex::sourceId | ( |  | ) |

inline

access to the source ID key, throws an exception if isNull() is False

Definition at line 90 of file MSSourceIndex.h.

References sourceId_p.

## spectralWindowId()

Int & casacore::MSSourceIndex::spectralWindowId | ( |  | ) |

inline

access to the spectral window ID key, throws an exception if isNull() is False

Definition at line 94 of file MSSourceIndex.h.

References spwId_p.

## Member Data Documentation

## msSourceCols_p

MSSourceColumns* casacore::MSSourceIndex::msSourceCols_p

private

Pointer to local MSSourceColumns object.

Definition at line 118 of file MSSourceIndex.h.

## sourceId_p

RecordFieldPtr<Int> casacore::MSSourceIndex::sourceId_p

private

Definition at line 120 of file MSSourceIndex.h.

Referenced by sourceId().

## spwId_p

RecordFieldPtr<Int> casacore::MSSourceIndex::spwId_p

private

Definition at line 120 of file MSSourceIndex.h.

Referenced by spectralWindowId().

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

- ms/MSSel/MSSourceIndex.h