casacore::MSFeedParse Class Reference

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

#include <MSFeedParse.h>

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

List of all members.

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 TableExprNodeselectFeedIds (const Vector< Int > &feedIds, BaselineListType baselineType=CrossOnly, Bool negate=False)
 Add the given feed selection.
const TableExprNodeselectFeedIds (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
MSFeedsubTable ()

Static Public Member Functions

static void cleanupErrorHandler ()

Static Public Attributes

static MSFeedParsethisMSFParser
static MSSelectionErrorHandlerthisMSFErrorHandler

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

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


Member Data Documentation

Definition at line 151 of file MSFeedParse.h.

Definition at line 151 of file MSFeedParse.h.

Definition at line 155 of file MSFeedParse.h.

Referenced by ~MSFeedParse().

Definition at line 155 of file MSFeedParse.h.

Referenced by ~MSFeedParse().

Definition at line 152 of file MSFeedParse.h.

Referenced by selectedFeed1().

Definition at line 152 of file MSFeedParse.h.

Referenced by selectedFeed2().

Definition at line 153 of file MSFeedParse.h.

Referenced by selectedFeedPairs().

Definition at line 154 of file MSFeedParse.h.

Referenced by subTable().

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1