casacore
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | List of all members
casacore::MSSpwParse Class Reference

More...

#include <MSSpwParse.h>

Public Member Functions

 MSSpwParse ()
 Default constructor. More...
 
 MSSpwParse (const MeasurementSet *ms)
 ~MSSpwParse() {if (node_p) delete node_p;node_p=0x0;}; More...
 
 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 ()
 
- Public Member Functions inherited from casacore::MSParse
 MSParse ()
 Default constructor for List container class. More...
 
 MSParse (const MSParse &)
 Copy constructor (copy semantics). More...
 
 ~MSParse ()
 
MSParseoperator= (const MSParse &)
 Assignment (copy semantics). More...
 
 MSParse (const MeasurementSet *ms, const String &shorthand)
 Associate the ms and the shorthand. More...
 
 MSParse (const MSSelectableTable *ms, const String &shorthand)
 Associate the ms and the shorthand. More...
 
Bool test (const String &shortHand) const
 Test if shorthand matches. More...
 
Stringshorthand ()
 Get the shorthand. More...
 
MeasurementSetms ()
 Get ms object. More...
 
MSSelectableTablemsInterface ()
 Get ms object. More...
 
void setMS (MeasurementSet *ms)
 
void setMSInterface (MSSelectableTable *msI)
 
void addCondition (TableExprNode &target, TableExprNode &source)
 

Static Public Member Functions

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

Static Public Attributes

static MSSpwParsethisMSSParser
 
static CountedPtr< MSSelectionErrorHandlerthisMSSpwErrorHandler
 
- Static Public Attributes inherited from casacore::MSParse
static MeasurementSetms_p
 
static MSSelectableTablemsInterface_p
 

Private Attributes

MSSpectralWindow spwSubTable_p
 
MSDataDescription ddSubTable_p
 

Static Private Attributes

static TableExprNodenode_p
 
static Vector< IntidList
 
static Vector< IntddidList
 
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 88 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.

◆ MSSpwParse() [3/3]

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

◆ ~MSSpwParse()

casacore::MSSpwParse::~MSSpwParse ( )
inline

Definition at line 99 of file MSSpwParse.h.

References columnAsTEN_p.

Member Function Documentation

◆ cleanup()

static void casacore::MSSpwParse::cleanup ( )
inlinestatic

Definition at line 126 of file MSSpwParse.h.

References cleanupErrorHandler(), and cleanupNode().

◆ cleanupErrorHandler()

static void casacore::MSSpwParse::cleanupErrorHandler ( )
inlinestatic

Definition at line 125 of file MSSpwParse.h.

References thisMSSpwErrorHandler.

Referenced by cleanup().

◆ cleanupNode()

static void casacore::MSSpwParse::cleanupNode ( )
inlinestatic

Definition at line 124 of file MSSpwParse.h.

References node_p.

Referenced by cleanup().

◆ endOfCeremony()

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

◆ node()

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

const TableExprNode *selectSpwOrSource(const String& fieldName);

Get table expression node object.

◆ reset()

static void casacore::MSSpwParse::reset ( )
inlinestatic

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

static Matrix<Int> casacore::MSSpwParse::selectedChanIDs ( )
inlinestatic

Definition at line 122 of file MSSpwParse.h.

References chanList.

◆ selectedDDIDs()

static Vector<Int> casacore::MSSpwParse::selectedDDIDs ( )
inlinestatic

Definition at line 120 of file MSSpwParse.h.

References ddidList.

◆ selectedIDs()

static Vector<Int> casacore::MSSpwParse::selectedIDs ( )
inlinestatic

Definition at line 121 of file MSSpwParse.h.

References idList.

◆ selectSpwIdsFromFreqList()

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

◆ selectSpwIdsFromIDList()

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

◆ subTable()

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

Definition at line 128 of file MSSpwParse.h.

References spwSubTable_p.

Member Data Documentation

◆ chanList

Matrix<Int> casacore::MSSpwParse::chanList
staticprivate

Definition at line 132 of file MSSpwParse.h.

Referenced by reset(), and selectedChanIDs().

◆ columnAsTEN_p

TableExprNode casacore::MSSpwParse::columnAsTEN_p
staticprivate

Definition at line 135 of file MSSpwParse.h.

Referenced by ~MSSpwParse().

◆ ddidList

Vector<Int> casacore::MSSpwParse::ddidList
staticprivate

Definition at line 131 of file MSSpwParse.h.

Referenced by reset(), and selectedDDIDs().

◆ ddSubTable_p

MSDataDescription casacore::MSSpwParse::ddSubTable_p
private

Definition at line 134 of file MSSpwParse.h.

◆ idList

Vector<Int> casacore::MSSpwParse::idList
staticprivate

Definition at line 131 of file MSSpwParse.h.

Referenced by reset(), and selectedIDs().

◆ node_p

TableExprNode* casacore::MSSpwParse::node_p
staticprivate

Definition at line 130 of file MSSpwParse.h.

Referenced by cleanupNode().

◆ spwSubTable_p

MSSpectralWindow casacore::MSSpwParse::spwSubTable_p
private

Definition at line 133 of file MSSpwParse.h.

Referenced by subTable().

◆ thisMSSParser

MSSpwParse* casacore::MSSpwParse::thisMSSParser
static

Definition at line 118 of file MSSpwParse.h.

◆ thisMSSpwErrorHandler

CountedPtr<MSSelectionErrorHandler> casacore::MSSpwParse::thisMSSpwErrorHandler
static

Definition at line 119 of file MSSpwParse.h.

Referenced by cleanupErrorHandler().


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