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

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

#include <MSFeedParse.h>

Inheritance diagram for casacore::MSFeedParse:
casacore::MSParse

Public Types

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

Public Member Functions

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

Static Public Attributes

static MSFeedParsethisMSFParser
 
static CountedPtr
< MSSelectionErrorHandler
thisMSFErrorHandler
 
- Static Public Attributes inherited from casacore::MSParse
static MeasurementSetms_p
 
static MSSelectableTablemsInterface_p
 

Private Member Functions

const TableExprNodesetTEN (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< Intfeed1List
 
Vector< Intfeed2List
 
Matrix< IntfeedPairList
 
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 88 of file MSFeedParse.h.

Member Enumeration Documentation

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 94 of file MSFeedParse.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

Bool casacore::MSFeedParse::addFeedPair ( const Matrix< Int > &  feedpairlist,
const Int  feed1,
const Int  feed2,
BaselineListType  baselineType = CrossOnly 
)
private
static void casacore::MSFeedParse::cleanupErrorHandler ( )
inlinestatic

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.

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

Definition at line 121 of file MSFeedParse.h.

References feed1List.

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

Definition at line 123 of file MSFeedParse.h.

References feed2List.

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

Definition at line 125 of file MSFeedParse.h.

References feedPairList.

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

Add the given feed selection.

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::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.

Member Data Documentation

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
staticprivate

Definition at line 155 of file MSFeedParse.h.

Referenced by ~MSFeedParse().

TableExprNode casacore::MSFeedParse::column2AsTEN_p
staticprivate

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

CountedPtr<MSSelectionErrorHandler> casacore::MSFeedParse::thisMSFErrorHandler
static

Definition at line 147 of file MSFeedParse.h.

Referenced by cleanupErrorHandler().

MSFeedParse* casacore::MSFeedParse::thisMSFParser
static

Definition at line 146 of file MSFeedParse.h.


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