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

More...

`#include <MSFeedParse.h>`

## Public Types

enum | BaselineListType { AutoCorrOnly , AutoCorrAlso , CrossOnly }
| Define the operator types (&&&, &&, and &). More...

## Public Member Functions

| MSFeedParse ()
| Default constructor.
| MSFeedParse (const MeasurementSet *ms)
| Associate the ms.
| MSFeedParse (const MSFeed &feedSubTable, const TableExprNode &feed1AsTEN, const TableExprNode &feed2AsTEN)
| ~MSFeedParse ()
const TableExprNode * | selectFeedIds (const Vector< Int > &feedIds, BaselineListType baselineType=CrossOnly, Bool negate=False)
| Add the given feed selection.
const TableExprNode * | selectFeedIds (const Vector< Int > &feedIds1, const Vector< Int > &feedIds2, BaselineListType baselineType=CrossOnly, Bool negate=False)
| Add the given "baseline" selection.
TableExprNode | node () const
| Get a pointer to the table expression node object.
const Vector< Int > & | selectedFeed1 () const
const Vector< Int > & | selectedFeed2 () const
const Matrix< Int > & | selectedFeedPairs () const
MSFeed & | 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 void | cleanupErrorHandler ()

## Static Public Attributes

static MSFeedParse * | thisMSFParser
static std::shared_ptr< MSSelectionErrorHandler > | thisMSFErrorHandler
Static Public Attributes inherited from casacore::MSParse
static MeasurementSet * | ms_p
static MSSelectableTable * | msInterface_p

## Private Member Functions

const TableExprNode * | setTEN (TableExprNode &condition, BaselineListType baselineType=CrossOnly, Bool negate=False)
void | makeFeedPairList (const Vector< Int > &f1, const Vector< Int > &f2, Matrix< Int > &fp, BaselineListType baselineType=CrossOnly, Bool negate=False)
void | makeFeedList (Vector< Int > &feedList, const Vector< Int > &thisList, Bool negate=False)
Bool | addFeedPair (const Matrix< Int > &feedpairlist, const Int feed1, const Int feed2, BaselineListType baselineType=CrossOnly)

## Private Attributes

TableExprNode | node_p
const String | colName1
const String | colName2
Vector< Int > | feed1List
Vector< Int > | feed2List
Matrix< Int > | feedPairList
MSFeed | msSubTable_p

## Static Private Attributes

static TableExprNode | column1AsTEN_p
static TableExprNode | column2AsTEN_p

## Detailed Description

Class to hold values from feed grammar parser

### Intended use:

Internal

### Etymology

MSFeedParse is the class used to parse a feed command.

### Synopsis

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

Global functions are used to operate on the information. The main function is the global function msFeedCommand. 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 MSFeedParse.h.

## Member Enumeration Documentation

## BaselineListType

enum casacore::MSFeedParse::BaselineListType

Define the operator types (&&&, &&, and &).

NB: Keeping the same notation as Antenna parser, even tho not a baseline here!

Enumerator
AutoCorrOnly |
AutoCorrAlso |
CrossOnly |

Definition at line 92 of file MSFeedParse.h.

## Constructor & Destructor Documentation

## MSFeedParse() [1/3]

casacore::MSFeedParse::MSFeedParse | ( |  | ) |

Default constructor.

## MSFeedParse() [2/3]

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

Associate the ms.

References casacore::MSParse::ms().

## MSFeedParse() [3/3]

casacore::MSFeedParse::MSFeedParse | ( | const MSFeed & | feedSubTable,
|  | const TableExprNode & | feed1AsTEN,
|  | const TableExprNode & | feed2AsTEN )

## ~MSFeedParse()

casacore::MSFeedParse::~MSFeedParse | ( |  | ) |

inline

Definition at line 103 of file MSFeedParse.h.

References column1AsTEN_p, and column2AsTEN_p.

## Member Function Documentation

## addFeedPair()

Bool casacore::MSFeedParse::addFeedPair | ( | const Matrix< Int > & | feedpairlist,
|  | const Int | feed1,
|  | const Int | feed2,
|  | BaselineListType | baselineType = CrossOnly )

private

References CrossOnly.

## cleanupErrorHandler()

void casacore::MSFeedParse::cleanupErrorHandler | ( |  | ) |

inline static

Definition at line 146 of file MSFeedParse.h.

References thisMSFErrorHandler.

## makeFeedList()

void casacore::MSFeedParse::makeFeedList | ( | Vector< Int > & | feedList,
|  | const Vector< Int > & | thisList,
|  | Bool | negate = False )

private

References casacore::False.

## makeFeedPairList()

void casacore::MSFeedParse::makeFeedPairList | ( | const Vector< Int > & | f1,
|  | const Vector< Int > & | f2,
|  | Matrix< Int > & | fp,
|  | BaselineListType | baselineType = CrossOnly,
|  | Bool | negate = False )

private

References CrossOnly, and casacore::False.

## node()

TableExprNode casacore::MSFeedParse::node | ( |  | ) | const

inline

Get a pointer to the table expression node object.

Definition at line 117 of file MSFeedParse.h.

References node_p.

## selectedFeed1()

const Vector< Int > & casacore::MSFeedParse::selectedFeed1 | ( |  | ) | const

inline

Definition at line 119 of file MSFeedParse.h.

References feed1List.

## selectedFeed2()

const Vector< Int > & casacore::MSFeedParse::selectedFeed2 | ( |  | ) | const

inline

Definition at line 121 of file MSFeedParse.h.

References feed2List.

## selectedFeedPairs()

const Matrix< Int > & casacore::MSFeedParse::selectedFeedPairs | ( |  | ) | const

inline

Definition at line 123 of file MSFeedParse.h.

References feedPairList.

## selectFeedIds() [1/2]

const TableExprNode * casacore::MSFeedParse::selectFeedIds | ( | const Vector< Int > & | feedIds,
|  | BaselineListType | baselineType = CrossOnly,
|  | Bool | negate = False )

Add the given feed selection.

References CrossOnly, and casacore::False.

## selectFeedIds() [2/2]

const TableExprNode * casacore::MSFeedParse::selectFeedIds | ( | const Vector< Int > & | feedIds1,
|  | const Vector< Int > & | feedIds2,
|  | BaselineListType | baselineType = CrossOnly,
|  | Bool | negate = False )

Add the given "baseline" selection.

References CrossOnly, and casacore::False.

## setTEN()

const TableExprNode * casacore::MSFeedParse::setTEN | ( | TableExprNode & | condition,
|  | BaselineListType | baselineType = CrossOnly,
|  | Bool | negate = False )

private

References CrossOnly, and casacore::False.

## subTable()

MSFeed & casacore::MSFeedParse::subTable | ( |  | ) |

inline

Definition at line 126 of file MSFeedParse.h.

References msSubTable_p.

## Member Data Documentation

## colName1

const String casacore::MSFeedParse::colName1

private

Definition at line 149 of file MSFeedParse.h.

## colName2

const String casacore::MSFeedParse::colName2

private

Definition at line 149 of file MSFeedParse.h.

## column1AsTEN_p

TableExprNode casacore::MSFeedParse::column1AsTEN_p

static private

Definition at line 153 of file MSFeedParse.h.

Referenced by ~MSFeedParse().

## column2AsTEN_p

TableExprNode casacore::MSFeedParse::column2AsTEN_p

static private

Definition at line 153 of file MSFeedParse.h.

Referenced by ~MSFeedParse().

## feed1List

Vector<Int> casacore::MSFeedParse::feed1List

private

Definition at line 150 of file MSFeedParse.h.

Referenced by selectedFeed1().

## feed2List

Vector<Int> casacore::MSFeedParse::feed2List

private

Definition at line 150 of file MSFeedParse.h.

Referenced by selectedFeed2().

## feedPairList

Matrix<Int> casacore::MSFeedParse::feedPairList

private

Definition at line 151 of file MSFeedParse.h.

Referenced by selectedFeedPairs().

## msSubTable_p

MSFeed casacore::MSFeedParse::msSubTable_p

private

Definition at line 152 of file MSFeedParse.h.

Referenced by subTable().

## node_p

TableExprNode casacore::MSFeedParse::node_p

private

Definition at line 148 of file MSFeedParse.h.

Referenced by node().

## thisMSFErrorHandler

std::shared_ptr<MSSelectionErrorHandler> casacore::MSFeedParse::thisMSFErrorHandler

static

Definition at line 145 of file MSFeedParse.h.

Referenced by cleanupErrorHandler().

## thisMSFParser

MSFeedParse* casacore::MSFeedParse::thisMSFParser

static

Definition at line 144 of file MSFeedParse.h.

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

- ms/MSSel/MSFeedParse.h