casa
$Rev:20696$
|
Class to hold values from field grammar parser. 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 () |
Static Public Member Functions | |
static const TableExprNode * | node () |
const TableExprNode *selectSpwOrSource(const String& fieldName); | |
static Vector< Int > | selectedIDs () |
static Matrix< Int > | selectedChanIDs () |
static void | reset () |
static void | cleanup () |
Static Public Attributes | |
static MSSpwParse * | thisMSSParser |
Private Attributes | |
MSSpectralWindow | spwSubTable_p |
MSDataDescription | ddSubTable_p |
Static Private Attributes | |
static TableExprNode * | node_p |
static Vector< Int > | idList |
static Matrix< Int > | chanList |
static TableExprNode | columnAsTEN_p |
Class to hold values from field grammar parser.
Internal
MSSpwParse is the class used to parse a spectral window selection command.
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.
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.
Default constructor.
casa::MSSpwParse::MSSpwParse | ( | const MeasurementSet * | ms | ) |
~MSSpwParse() {if (node_p) delete node_p;node_p=0x0;};
Associate the ms and the shorthand.
casa::MSSpwParse::MSSpwParse | ( | const MSSpectralWindow & | spwSubTable, |
const MSDataDescription & | ddSubTable, | ||
const TableExprNode & | columnAsTEN | ||
) |
casa::MSSpwParse::~MSSpwParse | ( | ) | [inline] |
Definition at line 97 of file MSSpwParse.h.
References columnAsTEN_p.
static void casa::MSSpwParse::cleanup | ( | ) | [inline, static] |
Definition at line 120 of file MSSpwParse.h.
References node_p.
const TableExprNode* casa::MSSpwParse::endOfCeremony | ( | const TableExprNode & | ten | ) |
static const TableExprNode* casa::MSSpwParse::node | ( | ) | [static] |
const TableExprNode *selectSpwOrSource(const String& fieldName);
Get table expression node object.
static void casa::MSSpwParse::reset | ( | ) | [inline, static] |
Definition at line 119 of file MSSpwParse.h.
References chanList, idList, casa::Matrix< T >::resize(), and casa::Vector< T >::resize().
void casa::MSSpwParse::selectChannelsFromDefaultList | ( | Vector< Int > & | spwIds, |
Vector< Int > & | chanDefaultList | ||
) |
void casa::MSSpwParse::selectChannelsFromIDList | ( | Vector< Int > & | spwIds, |
Vector< Int > & | chanIDList, | ||
Int | nFSpec | ||
) |
static Matrix<Int> casa::MSSpwParse::selectedChanIDs | ( | ) | [inline, static] |
Definition at line 118 of file MSSpwParse.h.
References chanList.
static Vector<Int> casa::MSSpwParse::selectedIDs | ( | ) | [inline, static] |
Definition at line 117 of file MSSpwParse.h.
References idList.
const TableExprNode* casa::MSSpwParse::selectSpwIdsFromFreqList | ( | const Vector< Float > & | spwIds, |
const Float | factor | ||
) |
const TableExprNode* casa::MSSpwParse::selectSpwIdsFromIDList | ( | const Vector< Int > & | spwIds, |
const Bool | addTen = True , |
||
const Bool | addIDs = True |
||
) |
MSSpectralWindow& casa::MSSpwParse::subTable | ( | ) | [inline] |
Definition at line 122 of file MSSpwParse.h.
References spwSubTable_p.
Matrix<Int> casa::MSSpwParse::chanList [static, private] |
Definition at line 126 of file MSSpwParse.h.
Referenced by reset(), and selectedChanIDs().
TableExprNode casa::MSSpwParse::columnAsTEN_p [static, private] |
Definition at line 129 of file MSSpwParse.h.
Referenced by ~MSSpwParse().
Definition at line 128 of file MSSpwParse.h.
Vector<Int> casa::MSSpwParse::idList [static, private] |
Definition at line 125 of file MSSpwParse.h.
Referenced by reset(), and selectedIDs().
TableExprNode* casa::MSSpwParse::node_p [static, private] |
Definition at line 124 of file MSSpwParse.h.
Referenced by cleanup().
Definition at line 127 of file MSSpwParse.h.
Referenced by subTable().
MSSpwParse* casa::MSSpwParse::thisMSSParser [static] |
Definition at line 116 of file MSSpwParse.h.