casacore
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
casacore::MSScanParse Class Reference

More...

#include <MSScanParse.h>

Public Member Functions

 MSScanParse ()
 Default constructor. More...
 
 MSScanParse (const MeasurementSet *ms)
 Associate the ms and the shorthand. More...
 
 MSScanParse (const MeasurementSet *ms, const TableExprNode &colAsTEN)
 
 ~MSScanParse ()
 
const TableExprNodeselectRangeGTAndLT (const Int &n0, const Int &n1)
 
const TableExprNodeselectRangeGEAndLE (const Int &n0, const Int &n1)
 
const TableExprNodeselectScanIds (const Vector< Int > &scanids)
 
const TableExprNodeselectScanIds ()
 
const TableExprNodeselectScanIdsGT (const Vector< Int > &scanids)
 
const TableExprNodeselectScanIdsLT (const Vector< Int > &scanids)
 
const TableExprNodeselectScanIdsGTEQ (const Vector< Int > &scanids)
 
const TableExprNodeselectScanIdsLTEQ (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< IntselectedIDs ()
 
void reset ()
 
void cleanup ()
 
void setMaxScan (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 ()
 
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 Attributes

static MSScanParsethisMSSParser
 
- Static Public Attributes inherited from casacore::MSParse
static MeasurementSetms_p
 
static MSSelectableTablemsInterface_p
 

Private Member Functions

void appendToIDList (const Vector< Int > &v)
 

Private Attributes

TableExprNode node_p
 
Vector< IntidList
 
std::vector< IntparsedIDList_p
 
const String colName
 
Int maxScans_p
 

Static Private Attributes

static TableExprNode columnAsTEN_p
 

Detailed Description

Class to hold values from scan grammar parser

Intended use:

Internal

Etymology

MSScanParse is the class used to parse a scan command.

Synopsis

MSScanParse is used by the parser of scan sub-expression statements. The parser is written in Bison and Flex in files MSScanGram.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 MSScanParse only contains information about a table used in the table command. Global variables (like a list and a vector) are used in MSScanParse.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.

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 87 of file MSScanParse.h.

Constructor & Destructor Documentation

◆ MSScanParse() [1/3]

casacore::MSScanParse::MSScanParse ( )

Default constructor.

◆ MSScanParse() [2/3]

casacore::MSScanParse::MSScanParse ( const MeasurementSet ms)

Associate the ms and the shorthand.

◆ MSScanParse() [3/3]

casacore::MSScanParse::MSScanParse ( const MeasurementSet ms,
const TableExprNode colAsTEN 
)

◆ ~MSScanParse()

casacore::MSScanParse::~MSScanParse ( )
inline

Definition at line 97 of file MSScanParse.h.

References columnAsTEN_p.

Member Function Documentation

◆ accumulateIDs()

std::vector<Int>& casacore::MSScanParse::accumulateIDs ( const Int  id0,
const Int  id1 = -1 
)

◆ appendToIDList()

void casacore::MSScanParse::appendToIDList ( const Vector< Int > &  v)
private

◆ cleanup()

void casacore::MSScanParse::cleanup ( )
inline

Definition at line 114 of file MSScanParse.h.

◆ node()

const TableExprNode casacore::MSScanParse::node ( )

Get table expression node object.

◆ reset()

void casacore::MSScanParse::reset ( )
inline

Definition at line 113 of file MSScanParse.h.

References idList, parsedIDList_p, and casacore::Vector< T, Alloc >::resize().

◆ selectedIDs()

Vector<Int> casacore::MSScanParse::selectedIDs ( )
inline

Definition at line 112 of file MSScanParse.h.

References idList.

◆ selectRangeGEAndLE()

const TableExprNode* casacore::MSScanParse::selectRangeGEAndLE ( const Int n0,
const Int n1 
)

◆ selectRangeGTAndLT()

const TableExprNode* casacore::MSScanParse::selectRangeGTAndLT ( const Int n0,
const Int n1 
)

◆ selectScanIds() [1/2]

const TableExprNode* casacore::MSScanParse::selectScanIds ( )
inline

Definition at line 102 of file MSScanParse.h.

References parsedIDList_p, and selectScanIds().

Referenced by selectScanIds().

◆ selectScanIds() [2/2]

const TableExprNode* casacore::MSScanParse::selectScanIds ( const Vector< Int > &  scanids)

◆ selectScanIdsGT()

const TableExprNode* casacore::MSScanParse::selectScanIdsGT ( const Vector< Int > &  scanids)

◆ selectScanIdsGTEQ()

const TableExprNode* casacore::MSScanParse::selectScanIdsGTEQ ( const Vector< Int > &  scanids)

◆ selectScanIdsLT()

const TableExprNode* casacore::MSScanParse::selectScanIdsLT ( const Vector< Int > &  scanids)

◆ selectScanIdsLTEQ()

const TableExprNode* casacore::MSScanParse::selectScanIdsLTEQ ( const Vector< Int > &  scanids)

◆ setMaxScan()

void casacore::MSScanParse::setMaxScan ( const Int n)
inline

Definition at line 116 of file MSScanParse.h.

References maxScans_p.

Member Data Documentation

◆ colName

const String casacore::MSScanParse::colName
private

Definition at line 124 of file MSScanParse.h.

◆ columnAsTEN_p

TableExprNode casacore::MSScanParse::columnAsTEN_p
staticprivate

Definition at line 127 of file MSScanParse.h.

Referenced by ~MSScanParse().

◆ idList

Vector<Int> casacore::MSScanParse::idList
private

Definition at line 122 of file MSScanParse.h.

Referenced by reset(), and selectedIDs().

◆ maxScans_p

Int casacore::MSScanParse::maxScans_p
private

Definition at line 126 of file MSScanParse.h.

Referenced by setMaxScan().

◆ node_p

TableExprNode casacore::MSScanParse::node_p
private

Definition at line 121 of file MSScanParse.h.

◆ parsedIDList_p

std::vector<Int> casacore::MSScanParse::parsedIDList_p
private

Definition at line 123 of file MSScanParse.h.

Referenced by reset(), and selectScanIds().

◆ thisMSSParser

MSScanParse* casacore::MSScanParse::thisMSSParser
static

Definition at line 118 of file MSScanParse.h.


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