casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Attributes | List of all members
casacore::MSUvDistParse Class Reference

Class to hold values from UV dist grammar parser. More...

#include <MSUvDistParse.h>

Inheritance diagram for casacore::MSUvDistParse:
casacore::MSParse

Public Member Functions

 MSUvDistParse ()
 Default constructor. More...
 
 MSUvDistParse (const MeasurementSet *ms)
 Associate the ms and the shorthand. More...
 
const TableExprNodeselectUVRange (const Double &startUV, const Double &endUV, const String &unit, Bool doSlow=False)
 ~MSUvDistParse() {if (node_p) delete node_p;node_p=0x0;} More...
 
Vector< BoolselectedUnits ()
 
Matrix< DoubleselectedUV ()
 
- 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 void reset ()
 
static void cleanup ()
 
static const TableExprNodenode ()
 Get table expression node object. More...
 

Static Public Attributes

static MSUvDistParsethisMSUParser
 
- Static Public Attributes inherited from casacore::MSParse
static MeasurementSetms_p
 
static MSSelectableTablemsInterface_p
 

Private Member Functions

void accumulateUVList (const Double r0, const Double r1, const Bool wavelengthUnits, const Bool meterUnits)
 

Static Private Attributes

static TableExprNodenode_p
 
static Matrix< DoubleselectedUV_p
 
static Vector< BoolmeterUnits_p
 

Detailed Description

Class to hold values from UV dist grammar parser.

Intended use:

Internal

Etymology

MSUvDistParse is the class used to parse a UV dist command.

Synopsis

MSUvDistParse is used by the parser of UV dist sub-expression statements. The parser is written in Bison and Flex in files MSUvDistGram.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 MSUvDistParse only contains information about a table used in the table command. Global variables (like a list and a vector) are used in MSUvDistParse.cc to hold further information.

Global functions are used to operate on the information. The main function is the global function msUvDistCommand. 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 87 of file MSUvDistParse.h.

Constructor & Destructor Documentation

casacore::MSUvDistParse::MSUvDistParse ( )

Default constructor.

casacore::MSUvDistParse::MSUvDistParse ( const MeasurementSet ms)

Associate the ms and the shorthand.

Member Function Documentation

void casacore::MSUvDistParse::accumulateUVList ( const Double  r0,
const Double  r1,
const Bool  wavelengthUnits,
const Bool  meterUnits 
)
private
static void casacore::MSUvDistParse::cleanup ( )
inlinestatic

Definition at line 107 of file MSUvDistParse.h.

References node_p.

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

Get table expression node object.

static void casacore::MSUvDistParse::reset ( void  )
inlinestatic
Vector<Bool> casacore::MSUvDistParse::selectedUnits ( )
inline

Definition at line 104 of file MSUvDistParse.h.

References meterUnits_p.

Matrix<Double> casacore::MSUvDistParse::selectedUV ( )
inline

Definition at line 105 of file MSUvDistParse.h.

References selectedUV_p.

const TableExprNode* casacore::MSUvDistParse::selectUVRange ( const Double startUV,
const Double endUV,
const String unit,
Bool  doSlow = False 
)

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

Member Data Documentation

Vector<Bool> casacore::MSUvDistParse::meterUnits_p
staticprivate

Definition at line 116 of file MSUvDistParse.h.

Referenced by reset(), and selectedUnits().

TableExprNode* casacore::MSUvDistParse::node_p
staticprivate

Definition at line 114 of file MSUvDistParse.h.

Referenced by cleanup().

Matrix<Double> casacore::MSUvDistParse::selectedUV_p
staticprivate

Definition at line 115 of file MSUvDistParse.h.

Referenced by reset(), and selectedUV().

MSUvDistParse* casacore::MSUvDistParse::thisMSUParser
static

Definition at line 111 of file MSUvDistParse.h.


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