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

More...

`#include <MSSpwParse.h>`

## Public Member Functions

| MSSpwParse ()
| Default constructor.
| MSSpwParse (const MeasurementSet *ms)
| ~MSSpwParse() {if (node_p) delete node_p;node_p=0x0;};
| MSSpwParse (const MSSpectralWindow &spwSubTable, const MSDataDescription &ddSubTable, const TableExprNode &columnAsTEN)
| ~MSSpwParse ()
const TableExprNode * | selectSpwIdsFromIDList (const Vector< Int > &spwIds, const Bool addTen=True, const Bool addIDs=True)
const TableExprNode * | selectSpwIdsFromFreqList (const Vector< Float > &spwIds, const Float factor)
void | selectChannelsFromIDList (Vector< Int > &spwIds, Vector< Int > &chanIDList, Int nFSpec)
void | selectChannelsFromDefaultList (Vector< Int > &spwIds, Vector< Int > &chanDefaultList)
const TableExprNode * | endOfCeremony (const TableExprNode &ten)
MSSpectralWindow & | subTable ()
Public Member Functions inherited from casacore::MSParse
| MSParse ()
| Default constructor for List container class.
| MSParse (const MSParse &)
| Copy constructor (copy semantics).
| ~MSParse ()
MSParse & | operator= (const MSParse &)
| Assignment (copy semantics).
| MSParse (const MeasurementSet *ms, const String &shorthand)
| Associate the ms and the shorthand.
| MSParse (const MSSelectableTable *ms, const String &shorthand)
| Associate the ms and the shorthand.
Bool | test (const String &shortHand) const
| Test if shorthand matches.
String & | shorthand ()
| Get the shorthand.
MeasurementSet * | ms ()
| Get ms object.
MSSelectableTable * | msInterface ()
| Get ms object.
void | setMS (MeasurementSet *ms)
void | setMSInterface (MSSelectableTable *msI)
void | addCondition (TableExprNode &target, TableExprNode &source)

## Static Public Member Functions

static const TableExprNode * | node ()
| const TableExprNode *selectSpwOrSource(const String& fieldName);
static Vector< Int > | selectedDDIDs ()
static Vector< Int > | selectedIDs ()
static Matrix< Int > | selectedChanIDs ()
static void | reset ()
static void | cleanupNode ()
static void | cleanupErrorHandler ()
static void | cleanup ()

## Static Public Attributes

static MSSpwParse * | thisMSSParser
static std::shared_ptr< MSSelectionErrorHandler > | thisMSSpwErrorHandler
Static Public Attributes inherited from casacore::MSParse
static MeasurementSet * | ms_p
static MSSelectableTable * | msInterface_p

## Private Attributes

MSSpectralWindow | spwSubTable_p
MSDataDescription | ddSubTable_p

## Static Private Attributes

static TableExprNode * | node_p
static Vector< Int > | idList
static Vector< Int > | ddidList
static Matrix< Int > | chanList
static TableExprNode | columnAsTEN_p

## Detailed Description

Class to hold values from field grammar parser

### Intended use:

Internal

### Etymology

MSSpwParse is the class used to parse a spectral window selection command.

### Synopsis

MSSpwParse is used by the parser of spectral window (Spw) sub-expression statements. The parser is written in Bison and Flex in files MSSpwGram.y and.l. The statements in there use the routines in this file to act upon a reduced rule. Since multiple tables can be given (with a shorthand), the table names are stored in a list. The variable names can be qualified by the table name and will be looked up in the appropriate table.

The class MSSpwParse only contains information about a table used in the table command. Global variables (like a list and a vector) are used in MSSpwParse.cc to hold further information.

Global functions are used to operate on the information. The main function is the global function msSpwCommand. It executes the given STaQL command and returns the resulting ms. This is, in fact, the only function to be used by a user.

### Motivation

It is necessary to be able to give a ms command in ASCII. This can be used in a CLI or in the table browser to get a subset of a table or to sort a table.

Definition at line 86 of file MSSpwParse.h.

## Constructor & Destructor Documentation

## MSSpwParse() [1/3]

casacore::MSSpwParse::MSSpwParse | ( |  | ) |

Default constructor.

## MSSpwParse() [2/3]

casacore::MSSpwParse::MSSpwParse | ( | const MeasurementSet * | ms | ) |

~MSSpwParse() {if (node_p) delete node_p;node_p=0x0;};

Associate the ms and the shorthand.

References casacore::MSParse::ms().

## MSSpwParse() [3/3]

casacore::MSSpwParse::MSSpwParse | ( | const MSSpectralWindow & | spwSubTable,
|  | const MSDataDescription & | ddSubTable,
|  | const TableExprNode & | columnAsTEN )

## ~MSSpwParse()

casacore::MSSpwParse::~MSSpwParse | ( |  | ) |

inline

Definition at line 97 of file MSSpwParse.h.

References columnAsTEN_p.

## Member Function Documentation

## cleanup()

void casacore::MSSpwParse::cleanup | ( |  | ) |

inline static

Definition at line 124 of file MSSpwParse.h.

References cleanupErrorHandler(), and cleanupNode().

## cleanupErrorHandler()

void casacore::MSSpwParse::cleanupErrorHandler | ( |  | ) |

inline static

Definition at line 123 of file MSSpwParse.h.

References thisMSSpwErrorHandler.

Referenced by cleanup().

## cleanupNode()

void casacore::MSSpwParse::cleanupNode | ( |  | ) |

inline static

Definition at line 122 of file MSSpwParse.h.

References node_p.

Referenced by cleanup().

## endOfCeremony()

const TableExprNode * casacore::MSSpwParse::endOfCeremony | ( | const TableExprNode & | ten | ) |

## node()

const TableExprNode * casacore::MSSpwParse::node | ( |  | ) |

static

const TableExprNode *selectSpwOrSource(const String& fieldName);

Get table expression node object.

## reset()

void casacore::MSSpwParse::reset | ( |  | ) |

inline static

Definition at line 121 of file MSSpwParse.h.

References chanList, ddidList, and idList.

## selectChannelsFromDefaultList()

void casacore::MSSpwParse::selectChannelsFromDefaultList | ( | Vector< Int > & | spwIds,
|  | Vector< Int > & | chanDefaultList )

## selectChannelsFromIDList()

void casacore::MSSpwParse::selectChannelsFromIDList | ( | Vector< Int > & | spwIds,
|  | Vector< Int > & | chanIDList,
|  | Int | nFSpec )

## selectedChanIDs()

Matrix< Int > casacore::MSSpwParse::selectedChanIDs | ( |  | ) |

inline static

Definition at line 120 of file MSSpwParse.h.

References chanList.

## selectedDDIDs()

Vector< Int > casacore::MSSpwParse::selectedDDIDs | ( |  | ) |

inline static

Definition at line 118 of file MSSpwParse.h.

References ddidList.

## selectedIDs()

Vector< Int > casacore::MSSpwParse::selectedIDs | ( |  | ) |

inline static

Definition at line 119 of file MSSpwParse.h.

References idList.

## selectSpwIdsFromFreqList()

const TableExprNode * casacore::MSSpwParse::selectSpwIdsFromFreqList | ( | const Vector< Float > & | spwIds,
|  | const Float | factor )

References casacore::factor.

## selectSpwIdsFromIDList()

const TableExprNode * casacore::MSSpwParse::selectSpwIdsFromIDList | ( | const Vector< Int > & | spwIds,
|  | const Bool | addTen = True,
|  | const Bool | addIDs = True )

References casacore::True.

## subTable()

MSSpectralWindow & casacore::MSSpwParse::subTable | ( |  | ) |

inline

Definition at line 126 of file MSSpwParse.h.

References spwSubTable_p.

## Member Data Documentation

## chanList

Matrix<Int> casacore::MSSpwParse::chanList

static private

Definition at line 130 of file MSSpwParse.h.

Referenced by reset(), and selectedChanIDs().

## columnAsTEN_p

TableExprNode casacore::MSSpwParse::columnAsTEN_p

static private

Definition at line 133 of file MSSpwParse.h.

Referenced by ~MSSpwParse().

## ddidList

Vector<Int> casacore::MSSpwParse::ddidList

static private

Definition at line 129 of file MSSpwParse.h.

Referenced by reset(), and selectedDDIDs().

## ddSubTable_p

MSDataDescription casacore::MSSpwParse::ddSubTable_p

private

Definition at line 132 of file MSSpwParse.h.

## idList

Vector<Int> casacore::MSSpwParse::idList

static private

Definition at line 129 of file MSSpwParse.h.

Referenced by reset(), and selectedIDs().

## node_p

TableExprNode* casacore::MSSpwParse::node_p

static private

Definition at line 128 of file MSSpwParse.h.

Referenced by cleanupNode().

## spwSubTable_p

MSSpectralWindow casacore::MSSpwParse::spwSubTable_p

private

Definition at line 131 of file MSSpwParse.h.

Referenced by subTable().

## thisMSSParser

MSSpwParse* casacore::MSSpwParse::thisMSSParser

static

Definition at line 116 of file MSSpwParse.h.

## thisMSSpwErrorHandler

std::shared_ptr<MSSelectionErrorHandler> casacore::MSSpwParse::thisMSSpwErrorHandler

static

Definition at line 117 of file MSSpwParse.h.

Referenced by cleanupErrorHandler().

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

- ms/MSSel/MSSpwParse.h