Class to hold values from feed grammar parser. 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 () |
Static Public Member Functions | |
static void | cleanupErrorHandler () |
Static Public Attributes | |
static MSFeedParse * | thisMSFParser |
static MSSelectionErrorHandler * | thisMSFErrorHandler |
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 |
Class to hold values from feed grammar parser.
Internal
MSFeedParse is the class used to parse a feed command.
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.
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 MSFeedParse.h.
Define the operator types (&&&, &&, and &).
NB: Keeping the same notation as Antenna parser, even tho not a baseline here!
Definition at line 94 of file MSFeedParse.h.
casacore::MSFeedParse::MSFeedParse | ( | ) |
Default constructor.
casacore::MSFeedParse::MSFeedParse | ( | const MeasurementSet * | ms | ) |
Associate the ms.
casacore::MSFeedParse::MSFeedParse | ( | const MSFeed & | feedSubTable, | |
const TableExprNode & | feed1AsTEN, | |||
const TableExprNode & | feed2AsTEN | |||
) |
casacore::MSFeedParse::~MSFeedParse | ( | ) | [inline] |
Definition at line 105 of file MSFeedParse.h.
References column1AsTEN_p, and column2AsTEN_p.
Bool casacore::MSFeedParse::addFeedPair | ( | const Matrix< Int > & | feedpairlist, | |
const Int | feed1, | |||
const Int | feed2, | |||
BaselineListType | baselineType = CrossOnly | |||
) | [private] |
static void casacore::MSFeedParse::cleanupErrorHandler | ( | ) | [inline, static] |
Definition at line 148 of file MSFeedParse.h.
References thisMSFErrorHandler.
void casacore::MSFeedParse::makeFeedList | ( | Vector< Int > & | feedList, | |
const Vector< Int > & | thisList, | |||
Bool | negate = False | |||
) | [private] |
void casacore::MSFeedParse::makeFeedPairList | ( | const Vector< Int > & | f1, | |
const Vector< Int > & | f2, | |||
Matrix< Int > & | fp, | |||
BaselineListType | baselineType = CrossOnly , |
|||
Bool | negate = False | |||
) | [private] |
TableExprNode casacore::MSFeedParse::node | ( | ) | const [inline] |
Get a pointer to the table expression node object.
Definition at line 119 of file MSFeedParse.h.
References node_p.
Definition at line 121 of file MSFeedParse.h.
References feed1List.
Definition at line 123 of file MSFeedParse.h.
References feed2List.
Definition at line 125 of file MSFeedParse.h.
References feedPairList.
const TableExprNode* casacore::MSFeedParse::selectFeedIds | ( | const Vector< Int > & | feedIds1, | |
const Vector< Int > & | feedIds2, | |||
BaselineListType | baselineType = CrossOnly , |
|||
Bool | negate = False | |||
) |
Add the given "baseline" selection.
const TableExprNode* casacore::MSFeedParse::selectFeedIds | ( | const Vector< Int > & | feedIds, | |
BaselineListType | baselineType = CrossOnly , |
|||
Bool | negate = False | |||
) |
Add the given feed selection.
const TableExprNode* casacore::MSFeedParse::setTEN | ( | TableExprNode & | condition, | |
BaselineListType | baselineType = CrossOnly , |
|||
Bool | negate = False | |||
) | [private] |
MSFeed& casacore::MSFeedParse::subTable | ( | ) | [inline] |
Definition at line 128 of file MSFeedParse.h.
References msSubTable_p.
const String casacore::MSFeedParse::colName1 [private] |
Definition at line 151 of file MSFeedParse.h.
const String casacore::MSFeedParse::colName2 [private] |
Definition at line 151 of file MSFeedParse.h.
TableExprNode casacore::MSFeedParse::column1AsTEN_p [static, private] |
Definition at line 155 of file MSFeedParse.h.
Referenced by ~MSFeedParse().
TableExprNode casacore::MSFeedParse::column2AsTEN_p [static, private] |
Definition at line 155 of file MSFeedParse.h.
Referenced by ~MSFeedParse().
Vector<Int> casacore::MSFeedParse::feed1List [private] |
Definition at line 152 of file MSFeedParse.h.
Referenced by selectedFeed1().
Vector<Int> casacore::MSFeedParse::feed2List [private] |
Definition at line 152 of file MSFeedParse.h.
Referenced by selectedFeed2().
Matrix<Int> casacore::MSFeedParse::feedPairList [private] |
Definition at line 153 of file MSFeedParse.h.
Referenced by selectedFeedPairs().
MSFeed casacore::MSFeedParse::msSubTable_p [private] |
Definition at line 154 of file MSFeedParse.h.
Referenced by subTable().
TableExprNode casacore::MSFeedParse::node_p [private] |
Definition at line 150 of file MSFeedParse.h.
Referenced by node().
Definition at line 147 of file MSFeedParse.h.
Referenced by cleanupErrorHandler().
Definition at line 146 of file MSFeedParse.h.