casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes
casa::MSSpwParse Class Reference

Class to hold values from field grammar parser. More...

#include <MSSpwParse.h>

Inheritance diagram for casa::MSSpwParse:
casa::MSParse

List of all members.

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 TableExprNodeselectSpwIdsFromIDList (const Vector< Int > &spwIds, const Bool addTen=True, const Bool addIDs=True)
const TableExprNodeselectSpwIdsFromFreqList (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 TableExprNodeendOfCeremony (const TableExprNode &ten)
MSSpectralWindowsubTable ()

Static Public Member Functions

static const TableExprNodenode ()
 const TableExprNode *selectSpwOrSource(const String& fieldName);
static Vector< IntselectedIDs ()
static Matrix< IntselectedChanIDs ()
static void reset ()
static void cleanup ()

Static Public Attributes

static MSSpwParsethisMSSParser

Private Attributes

MSSpectralWindow spwSubTable_p
MSDataDescription ddSubTable_p

Static Private Attributes

static TableExprNodenode_p
static Vector< IntidList
static Matrix< IntchanList
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

Default constructor.

~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 
)

Definition at line 97 of file MSSpwParse.h.

References columnAsTEN_p.


Member Function Documentation

static void casa::MSSpwParse::cleanup ( ) [inline, static]

Definition at line 120 of file MSSpwParse.h.

References node_p.

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]
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 
)

Definition at line 122 of file MSSpwParse.h.

References spwSubTable_p.


Member Data Documentation

Definition at line 126 of file MSSpwParse.h.

Referenced by reset(), and selectedChanIDs().

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().

Definition at line 124 of file MSSpwParse.h.

Referenced by cleanup().

Definition at line 127 of file MSSpwParse.h.

Referenced by subTable().

Definition at line 116 of file MSSpwParse.h.


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