Loading...
Searching...
No Matches
casacore::MSObservationParse Class Reference
ms package (libcasa_ms) » MSSel_module » MSSel_module_internal_classes

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)
Public Member Functions inherited from casacore::MSParse
| MSParse ()
| Default constructor for List container class.
| MSParse (const MSParse &)
| Copy constructor (copy semantics).
| ~MSParse ()
MSParse & | operator= (const MSParse &)
| Assignment (copy semantics).
| MSParse (const MeasurementSet *ms, const String &shorthand)
| Associate the ms and the shorthand.
| MSParse (const MSSelectableTable *ms, const String &shorthand)
| Associate the ms and the shorthand.
Bool | test (const String &shortHand) const
| Test if shorthand matches.
String & | shorthand ()
| Get the shorthand.
MeasurementSet * | ms ()
| Get ms object.
MSSelectableTable * | msInterface ()
| Get ms object.
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

## Detailed Description

Class to hold values from scan grammar parser

### Intended use:

Internal

### Etymology

MSObservationParse is the class used to parse a scan command.

### Synopsis

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.

### 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 85 of file MSObservationParse.h.

## Constructor & Destructor Documentation

## MSObservationParse() [1/2]

casacore::MSObservationParse::MSObservationParse | ( |  | ) |

Default constructor.

## MSObservationParse() [2/2]

casacore::MSObservationParse::MSObservationParse | ( | const MeasurementSet * | ms,
|  | const MSObservation & | obsSubtable,
|  | const TableExprNode & | colAsTEN )

Associate the ms and the shorthand.

References casacore::MSParse::ms().

## ~MSObservationParse()

casacore::MSObservationParse::~MSObservationParse | ( |  | ) |

inline

Definition at line 95 of file MSObservationParse.h.

References columnAsTEN_p.

## Member Function Documentation

## accumulateIDs()

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

## appendToIDList()

void casacore::MSObservationParse::appendToIDList | ( | const Vector< Int > & | v | ) |

private

## cleanup()

void casacore::MSObservationParse::cleanup | ( |  | ) |

inline

Definition at line 113 of file MSObservationParse.h.

## node()

const TableExprNode casacore::MSObservationParse::node | ( |  | ) |

Get table expression node object.

## reset()

void casacore::MSObservationParse::reset | ( |  | ) |

inline

Definition at line 112 of file MSObservationParse.h.

References idList.

## selectedIDs()

Vector< Int > casacore::MSObservationParse::selectedIDs | ( |  | ) |

## selectObservationIds() [1/2]

const TableExprNode * casacore::MSObservationParse::selectObservationIds | ( |  | ) |

inline

Definition at line 100 of file MSObservationParse.h.

References parsedIDList_p, and selectObservationIds().

Referenced by selectObservationIds().

## selectObservationIds() [2/2]

const TableExprNode * casacore::MSObservationParse::selectObservationIds | ( | const Vector< Int > & | scanids | ) |

## selectObservationIdsGT()

const TableExprNode * casacore::MSObservationParse::selectObservationIdsGT | ( | const Vector< Int > & | scanids | ) |

## selectObservationIdsGTEQ()

const TableExprNode * casacore::MSObservationParse::selectObservationIdsGTEQ | ( | const Vector< Int > & | scanids | ) |

## selectObservationIdsLT()

const TableExprNode * casacore::MSObservationParse::selectObservationIdsLT | ( | const Vector< Int > & | scanids | ) |

## selectObservationIdsLTEQ()

const TableExprNode * casacore::MSObservationParse::selectObservationIdsLTEQ | ( | const Vector< Int > & | scanids | ) |

## selectRangeGEAndLE()

const TableExprNode * casacore::MSObservationParse::selectRangeGEAndLE | ( | const Int & | n0,
|  | const Int & | n1 )

## selectRangeGTAndLT()

const TableExprNode * casacore::MSObservationParse::selectRangeGTAndLT | ( | const Int & | n0,
|  | const Int & | n1 )

## setMaxObs()

void casacore::MSObservationParse::setMaxObs | ( | const Int & | n | ) |

inline

Definition at line 115 of file MSObservationParse.h.

References maxObs_p.

## Member Data Documentation

## colName

const String casacore::MSObservationParse::colName

private

Definition at line 123 of file MSObservationParse.h.

## columnAsTEN_p

TableExprNode casacore::MSObservationParse::columnAsTEN_p

static private

Definition at line 126 of file MSObservationParse.h.

Referenced by ~MSObservationParse().

## idList

Vector<Int> casacore::MSObservationParse::idList

private

Definition at line 121 of file MSObservationParse.h.

Referenced by reset().

## maxObs_p

Int casacore::MSObservationParse::maxObs_p

private

Definition at line 125 of file MSObservationParse.h.

Referenced by setMaxObs().

## node_p

TableExprNode casacore::MSObservationParse::node_p

private

Definition at line 120 of file MSObservationParse.h.

## obsIDList_p

Vector<Int> casacore::MSObservationParse::obsIDList_p

private

Definition at line 121 of file MSObservationParse.h.

## parsedIDList_p

std::vector<Int> casacore::MSObservationParse::parsedIDList_p

private

Definition at line 122 of file MSObservationParse.h.

Referenced by selectObservationIds().

## thisMSObsParser

MSObservationParse* casacore::MSObservationParse::thisMSObsParser

static

Definition at line 117 of file MSObservationParse.h.

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

- ms/MSSel/MSObservationParse.h