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

More...

`#include <MSTimeParse.h>`

## Public Member Functions

| MSTimeParse ()
| Default constructor.
| MSTimeParse (const MeasurementSet *ms, const TableExprNode &otherTens, const Bool honourRowFlags=True)
| Associate the ms and the shorthand.
| MSTimeParse (const MeasurementSet *ms, const TableExprNode &colAsTEN, MSSelectableMainColumn &msMainColInterface, const TableExprNode &otherTEN, const Bool honourRowFlags=True)
| ~MSTimeParse ()
const TableExprNode * | selectTime (const MEpoch &time, bool daytime=false)
| ~MSTimeParse() { if (node_p) delete node_p;node_p=0x0; if (otherTens_p) delete otherTens_p;otherTens_p=0x0; }
const TableExprNode * | selectTimeGT (const MEpoch &lowboundTime, bool daytime=false)
const TableExprNode * | selectTimeLT (const MEpoch &upboundTime, bool daytime=false)
const TableExprNode * | selectTimeRange (const MEpoch &lowboundTime, const MEpoch &upboundTime, bool daytime=false, Float edgeWidth=-1.0)
Matrix< Double > | selectedTimes ()
const TableExprNode * | addCondition (TableExprNode &condition)
void | getDefaults ()
Int | year0 ()
Int | month0 ()
Int | day0 ()
Int | hour0 ()
Int | minute0 ()
Int | second0 ()
Int | fractionalsec0 ()
Double | defaultInteg ()
void | accumulateTimeList (const Double t0, const Double t1, const Double dT=-1)
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 Member Functions

static void | setDefaults (TimeFields &tf, Bool dataOrigin=True)
static void | copyDefaults (TimeFields &target, TimeFields &source)
static const MEpoch * | yearTimeConvert (Int year=-1, Int month=-1, Int day=-1, Int hour=-1, Int minute=-1, Int second=-1, Int millisec=-1)
static const MEpoch * | yearTimeConvert (const TimeFields &tf)
static const TableExprNode * | node ()
| Get table expression node object.
static void | validate (const TimeFields &tf)
static void | reset ()
static void | cleanup ()
static Double | toTAIInSec (const MEpoch &time)

## Public Attributes

MVTime | firstRowTime
Int | defaultYear
Int | defaultMonth
Int | defaultDay
Int | defaultHour
Int | defaultMinute
Int | defaultSeconds
Int | defaultFractionalSec
Double | defaultExposure
const String | colName
Bool | honourRowFlags_p

## Static Public Attributes

static TableExprNode * | node_p
static TableExprNode * | otherTens_p
| private:
static Bool | defaultTimeComputed
static MeasurementSet * | ms_p
static MEpoch * | yeartime
static MEpoch * | daytime
static Matrix< Double > | timeList
static MSTimeParse * | thisMSTParser
static TableExprNode | columnAsTEN_p
static MSSelectableMainColumn * | mainColumn_p
Static Public Attributes inherited from casacore::MSParse
static MeasurementSet * | ms_p
static MSSelectableTable * | msInterface_p

## Detailed Description

Class to hold values from time grammar parser

### Intended use:

Internal

### Etymology

MSTimeParse is the class used to parse a time command.

### Synopsis

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

Global functions are used to operate on the information. The main function is the global function msTimeCommand. 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 MSTimeParse.h.

## Constructor & Destructor Documentation

## MSTimeParse() [1/3]

casacore::MSTimeParse::MSTimeParse | ( |  | ) |

Default constructor.

## MSTimeParse() [2/3]

casacore::MSTimeParse::MSTimeParse | ( | const MeasurementSet * | ms,
|  | const TableExprNode & | otherTens,
|  | const Bool | honourRowFlags = True )

Associate the ms and the shorthand.

References casacore::MSParse::ms(), and casacore::True.

## MSTimeParse() [3/3]

casacore::MSTimeParse::MSTimeParse | ( | const MeasurementSet * | ms,
|  | const TableExprNode & | colAsTEN,
|  | MSSelectableMainColumn & | msMainColInterface,
|  | const TableExprNode & | otherTEN,
|  | const Bool | honourRowFlags = True )

References casacore::MSParse::ms(), and casacore::True.

## ~MSTimeParse()

casacore::MSTimeParse::~MSTimeParse | ( |  | ) |

inline

Definition at line 101 of file MSTimeParse.h.

References columnAsTEN_p.

## Member Function Documentation

## accumulateTimeList()

void casacore::MSTimeParse::accumulateTimeList | ( | const Double | t0,
|  | const Double | t1,
|  | const Double | dT = -1 )

## addCondition()

const TableExprNode * casacore::MSTimeParse::addCondition | ( | TableExprNode & | condition | ) |

## cleanup()

void casacore::MSTimeParse::cleanup | ( |  | ) |

inline static

Definition at line 150 of file MSTimeParse.h.

References node_p.

## copyDefaults()

void casacore::MSTimeParse::copyDefaults | ( | TimeFields & | target,
|  | TimeFields & | source )

static

## day0()

Int casacore::MSTimeParse::day0 | ( |  | ) |

inline

Definition at line 141 of file MSTimeParse.h.

References defaultDay.

## defaultInteg()

Double casacore::MSTimeParse::defaultInteg | ( |  | ) |

inline

Definition at line 146 of file MSTimeParse.h.

References defaultExposure.

## fractionalsec0()

Int casacore::MSTimeParse::fractionalsec0 | ( |  | ) |

inline

Definition at line 145 of file MSTimeParse.h.

References defaultFractionalSec.

## getDefaults()

void casacore::MSTimeParse::getDefaults | ( |  | ) |

## hour0()

Int casacore::MSTimeParse::hour0 | ( |  | ) |

inline

Definition at line 142 of file MSTimeParse.h.

References defaultHour.

## minute0()

Int casacore::MSTimeParse::minute0 | ( |  | ) |

inline

Definition at line 143 of file MSTimeParse.h.

References defaultMinute.

## month0()

Int casacore::MSTimeParse::month0 | ( |  | ) |

inline

Definition at line 140 of file MSTimeParse.h.

References defaultMonth.

## node()

const TableExprNode * casacore::MSTimeParse::node | ( |  | ) |

static

Get table expression node object.

## reset()

void casacore::MSTimeParse::reset | ( |  | ) |

inline static

Definition at line 149 of file MSTimeParse.h.

References timeList.

## second0()

Int casacore::MSTimeParse::second0 | ( |  | ) |

inline

Definition at line 144 of file MSTimeParse.h.

References defaultSeconds.

## selectedTimes()

Matrix< Double > casacore::MSTimeParse::selectedTimes | ( |  | ) |

inline

Definition at line 119 of file MSTimeParse.h.

References timeList.

## selectTime()

const TableExprNode * casacore::MSTimeParse::selectTime | ( | const MEpoch & | time,
|  | bool | daytime = false )

~MSTimeParse() { if (node_p) delete node_p;node_p=0x0; if (otherTens_p) delete otherTens_p;otherTens_p=0x0; }

References daytime, and casacore::time().

## selectTimeGT()

const TableExprNode * casacore::MSTimeParse::selectTimeGT | ( | const MEpoch & | lowboundTime,
|  | bool | daytime = false )

References daytime.

## selectTimeLT()

const TableExprNode * casacore::MSTimeParse::selectTimeLT | ( | const MEpoch & | upboundTime,
|  | bool | daytime = false )

References daytime.

## selectTimeRange()

const TableExprNode * casacore::MSTimeParse::selectTimeRange | ( | const MEpoch & | lowboundTime,
|  | const MEpoch & | upboundTime,
|  | bool | daytime = false,
|  | Float | edgeWidth = -1.0 )

References daytime.

## setDefaults()

void casacore::MSTimeParse::setDefaults | ( | TimeFields & | tf,
|  | Bool | dataOrigin = True )

static

References casacore::True.

## toTAIInSec()

Double casacore::MSTimeParse::toTAIInSec | ( | const MEpoch & | time | ) |

static

References casacore::time().

## validate()

void casacore::MSTimeParse::validate | ( | const TimeFields & | tf | ) |

static

## year0()

Int casacore::MSTimeParse::year0 | ( |  | ) |

inline

Definition at line 139 of file MSTimeParse.h.

References defaultYear.

## yearTimeConvert() [1/2]

const MEpoch * casacore::MSTimeParse::yearTimeConvert | ( | const TimeFields & | tf | ) |

static

## yearTimeConvert() [2/2]

const MEpoch * casacore::MSTimeParse::yearTimeConvert | ( | Int | year = -1,
|  | Int | month = -1,
|  | Int | day = -1,
|  | Int | hour = -1,
|  | Int | minute = -1,
|  | Int | second = -1,
|  | Int | millisec = -1 )

static

References casacore::day(), casacore::month(), and casacore::year().

## Member Data Documentation

## colName

const String casacore::MSTimeParse::colName

Definition at line 165 of file MSTimeParse.h.

## columnAsTEN_p

TableExprNode casacore::MSTimeParse::columnAsTEN_p

static

Definition at line 170 of file MSTimeParse.h.

Referenced by ~MSTimeParse().

## daytime

MEpoch* casacore::MSTimeParse::daytime

static

Definition at line 161 of file MSTimeParse.h.

Referenced by selectTime(), selectTimeGT(), selectTimeLT(), and selectTimeRange().

## defaultDay

Int casacore::MSTimeParse::defaultDay

Definition at line 162 of file MSTimeParse.h.

Referenced by day0().

## defaultExposure

Double casacore::MSTimeParse::defaultExposure

Definition at line 164 of file MSTimeParse.h.

Referenced by defaultInteg().

## defaultFractionalSec

Int casacore::MSTimeParse::defaultFractionalSec

Definition at line 163 of file MSTimeParse.h.

Referenced by fractionalsec0().

## defaultHour

Int casacore::MSTimeParse::defaultHour

Definition at line 163 of file MSTimeParse.h.

Referenced by hour0().

## defaultMinute

Int casacore::MSTimeParse::defaultMinute

Definition at line 163 of file MSTimeParse.h.

Referenced by minute0().

## defaultMonth

Int casacore::MSTimeParse::defaultMonth

Definition at line 162 of file MSTimeParse.h.

Referenced by month0().

## defaultSeconds

Int casacore::MSTimeParse::defaultSeconds

Definition at line 163 of file MSTimeParse.h.

Referenced by second0().

## defaultTimeComputed

Bool casacore::MSTimeParse::defaultTimeComputed

static

Definition at line 156 of file MSTimeParse.h.

## defaultYear

Int casacore::MSTimeParse::defaultYear

Definition at line 162 of file MSTimeParse.h.

Referenced by year0().

## firstRowTime

MVTime casacore::MSTimeParse::firstRowTime

Definition at line 157 of file MSTimeParse.h.

## honourRowFlags_p

Bool casacore::MSTimeParse::honourRowFlags_p

Definition at line 166 of file MSTimeParse.h.

## mainColumn_p

MSSelectableMainColumn* casacore::MSTimeParse::mainColumn_p

static

Definition at line 171 of file MSTimeParse.h.

## ms_p

MeasurementSet* casacore::MSTimeParse::ms_p

static

Definition at line 158 of file MSTimeParse.h.

## node_p

TableExprNode* casacore::MSTimeParse::node_p

static

Definition at line 152 of file MSTimeParse.h.

Referenced by cleanup().

## otherTens_p

TableExprNode* casacore::MSTimeParse::otherTens_p

static

private:

Definition at line 155 of file MSTimeParse.h.

## thisMSTParser

MSTimeParse* casacore::MSTimeParse::thisMSTParser

static

Definition at line 169 of file MSTimeParse.h.

## timeList

Matrix<Double> casacore::MSTimeParse::timeList

static

Definition at line 167 of file MSTimeParse.h.

Referenced by reset(), and selectedTimes().

## yeartime

MEpoch* casacore::MSTimeParse::yeartime

static

Definition at line 160 of file MSTimeParse.h.

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

- ms/MSSel/MSTimeParse.h