casa
5.7.0-16
|
Class to hold values from scan grammar parser. More...
#include <MSObservationParse.h>
Public Member Functions | |
MSObservationParse () | |
Default constructor. More... | |
MSObservationParse (const MeasurementSet *ms, const MSObservation &obsSubtable, const TableExprNode &colAsTEN) | |
Associate the ms and the shorthand. More... | |
~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. More... | |
Vector< Int > | selectedIDs () |
void | reset () |
void | cleanup () |
void | setMaxObs (const Int &n) |
Public Member Functions inherited from casacore::MSParse | |
MSParse () | |
Default constructor for List container class. More... | |
MSParse (const MSParse &) | |
Copy constructor (copy semantics). More... | |
~MSParse () | |
MSParse & | operator= (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... | |
String & | shorthand () |
Get the shorthand. More... | |
MeasurementSet * | ms () |
Get ms object. More... | |
MSSelectableTable * | msInterface () |
Get ms object. More... | |
void | setMS (MeasurementSet *ms) |
void | setMSInterface (MSSelectableTable *msI) |
void | addCondition (TableExprNode &target, TableExprNode &source) |
Static Public Attributes | |
static MSObservationParse * | thisMSObsParser |
Static Public Attributes inherited from casacore::MSParse | |
static MeasurementSet * | ms_p |
static MSSelectableTable * | msInterface_p |
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 87 of file MSObservationParse.h.
casacore::MSObservationParse::MSObservationParse | ( | ) |
Default constructor.
casacore::MSObservationParse::MSObservationParse | ( | const MeasurementSet * | ms, |
const MSObservation & | obsSubtable, | ||
const TableExprNode & | colAsTEN | ||
) |
Associate the ms and the shorthand.
|
inline |
Definition at line 97 of file MSObservationParse.h.
References columnAsTEN_p.
|
inline |
Definition at line 115 of file MSObservationParse.h.
const TableExprNode casacore::MSObservationParse::node | ( | ) |
Get table expression node object.
|
inline |
Definition at line 114 of file MSObservationParse.h.
References idList, and casacore::Vector< T >::resize().
const TableExprNode* casacore::MSObservationParse::selectObservationIds | ( | const Vector< Int > & | scanids | ) |
|
inline |
Definition at line 102 of file MSObservationParse.h.
References parsedIDList_p, and selectObservationIds().
Referenced by selectObservationIds().
const TableExprNode* casacore::MSObservationParse::selectObservationIdsGT | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casacore::MSObservationParse::selectObservationIdsGTEQ | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casacore::MSObservationParse::selectObservationIdsLT | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casacore::MSObservationParse::selectObservationIdsLTEQ | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casacore::MSObservationParse::selectRangeGEAndLE | ( | const Int & | n0, |
const Int & | n1 | ||
) |
const TableExprNode* casacore::MSObservationParse::selectRangeGTAndLT | ( | const Int & | n0, |
const Int & | n1 | ||
) |
|
inline |
Definition at line 117 of file MSObservationParse.h.
References maxObs_p.
|
private |
Definition at line 125 of file MSObservationParse.h.
|
staticprivate |
Definition at line 128 of file MSObservationParse.h.
Referenced by ~MSObservationParse().
Definition at line 123 of file MSObservationParse.h.
Referenced by reset().
|
private |
Definition at line 127 of file MSObservationParse.h.
Referenced by setMaxObs().
|
private |
Definition at line 122 of file MSObservationParse.h.
Definition at line 123 of file MSObservationParse.h.
|
private |
Definition at line 124 of file MSObservationParse.h.
Referenced by selectObservationIds().
|
static |
Definition at line 119 of file MSObservationParse.h.