casa
$Rev:20696$
|
Class to hold values from scan grammar parser. More...
#include <MSObservationParse.h>
Public Member Functions | |
MSObservationParse () | |
Default constructor. | |
MSObservationParse (const MeasurementSet *ms, const MSObservation &obsSubtable, const TableExprNode &colAsTEN) | |
Associate the ms and the shorthand. | |
~MSObservationParse () | |
const TableExprNode * | selectRangeGTAndLT (const Int &n0, const Int &n1) |
const TableExprNode * | selectRangeGEAndLE (const Int &n0, const Int &n1) |
const TableExprNode * | selectObservationIds (const Vector< Int > &scanids) |
const TableExprNode * | selectObservationIds () |
const TableExprNode * | selectObservationIdsGT (const Vector< Int > &scanids) |
const TableExprNode * | selectObservationIdsLT (const Vector< Int > &scanids) |
const TableExprNode * | selectObservationIdsGTEQ (const Vector< Int > &scanids) |
const TableExprNode * | selectObservationIdsLTEQ (const Vector< Int > &scanids) |
std::vector< Int > & | accumulateIDs (const Int id0, const Int id1=-1) |
const TableExprNode | node () |
Get table expression node object. | |
Vector< Int > | selectedIDs () |
void | reset () |
void | cleanup () |
void | setMaxObs (const Int &n) |
Static Public Attributes | |
static MSObservationParse * | thisMSObsParser |
Private Member Functions | |
void | appendToIDList (const Vector< Int > &v) |
Private Attributes | |
TableExprNode | node_p |
Vector< Int > | idList |
Vector< Int > | obsIDList_p |
std::vector< Int > | parsedIDList_p |
const String | colName |
Int | maxObs_p |
Static Private Attributes | |
static TableExprNode | columnAsTEN_p |
Class to hold values from scan grammar parser.
Internal
MSObservationParse is the class used to parse a scan command.
MSObservationParse is used by the parser of scan sub-expression statements. The parser is written in Bison and Flex in files MSObservationGram.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 MSObservationParse only contains information about a table used in the table command. Global variables (like a list and a vector) are used in MSObservationParse.cc to hold further information.
Global functions are used to operate on the information. The main function is the global function msScanCommand. 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 86 of file MSObservationParse.h.
Default constructor.
casa::MSObservationParse::MSObservationParse | ( | const MeasurementSet * | ms, |
const MSObservation & | obsSubtable, | ||
const TableExprNode & | colAsTEN | ||
) |
Associate the ms and the shorthand.
casa::MSObservationParse::~MSObservationParse | ( | ) | [inline] |
Definition at line 96 of file MSObservationParse.h.
References columnAsTEN_p.
std::vector<Int>& casa::MSObservationParse::accumulateIDs | ( | const Int | id0, |
const Int | id1 = -1 |
||
) |
void casa::MSObservationParse::appendToIDList | ( | const Vector< Int > & | v | ) | [private] |
void casa::MSObservationParse::cleanup | ( | ) | [inline] |
Definition at line 114 of file MSObservationParse.h.
const TableExprNode casa::MSObservationParse::node | ( | ) |
Get table expression node object.
void casa::MSObservationParse::reset | ( | ) | [inline] |
Definition at line 113 of file MSObservationParse.h.
References idList, and casa::Vector< T >::resize().
const TableExprNode* casa::MSObservationParse::selectObservationIds | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casa::MSObservationParse::selectObservationIds | ( | ) | [inline] |
Definition at line 101 of file MSObservationParse.h.
References parsedIDList_p, and selectObservationIds().
Referenced by selectObservationIds().
const TableExprNode* casa::MSObservationParse::selectObservationIdsGT | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casa::MSObservationParse::selectObservationIdsGTEQ | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casa::MSObservationParse::selectObservationIdsLT | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casa::MSObservationParse::selectObservationIdsLTEQ | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casa::MSObservationParse::selectRangeGEAndLE | ( | const Int & | n0, |
const Int & | n1 | ||
) |
const TableExprNode* casa::MSObservationParse::selectRangeGTAndLT | ( | const Int & | n0, |
const Int & | n1 | ||
) |
void casa::MSObservationParse::setMaxObs | ( | const Int & | n | ) | [inline] |
Definition at line 116 of file MSObservationParse.h.
const String casa::MSObservationParse::colName [private] |
Definition at line 124 of file MSObservationParse.h.
TableExprNode casa::MSObservationParse::columnAsTEN_p [static, private] |
Definition at line 127 of file MSObservationParse.h.
Referenced by ~MSObservationParse().
Vector<Int> casa::MSObservationParse::idList [private] |
Definition at line 122 of file MSObservationParse.h.
Referenced by reset().
Int casa::MSObservationParse::maxObs_p [private] |
Definition at line 126 of file MSObservationParse.h.
Definition at line 121 of file MSObservationParse.h.
Vector<Int> casa::MSObservationParse::obsIDList_p [private] |
Definition at line 122 of file MSObservationParse.h.
std::vector<Int> casa::MSObservationParse::parsedIDList_p [private] |
Definition at line 123 of file MSObservationParse.h.
Referenced by selectObservationIds().
Definition at line 116 of file MSObservationParse.h.