SDMSIterator.h

Classes

SDMSIterator -- (full description)

class SDMSIterator : public SDIterator

Interface

Public Members
SDMSIterator(const String &msName, const Record &selection, Table::TableOption opt = Table::Old, TableLock::LockOption lockoptions = TableLock::DefaultLocking, Bool useCorrectedData = False)
SDMSIterator(const SDMSIterator& other)
SDMSIterator(const SDMSIterator& other, const Record &selection)
~SDMSIterator()
SDMSIterator &operator=(const SDMSIterator& other)
virtual String type() const
Bool unlock()
Bool lock(uInt nattempts=0)
void origin()
Bool more()
SDIterator& operator++(int)
SDIterator& operator++()
SDIterator& operator--(int)
SDIterator& operator--()
uInt where() const
uInt nrecords()
void resync()
void flush()
void reselect()
void deepCopy(const String &newName)
const SDRecord &get()
const Record &getData()
const Record &getHeader()
const Record &getOther()
const Array<String> getHist()
Bool put(const SDRecord& rec)
Bool appendRec(const SDRecord &rec)
Bool deleteRec()
Bool isWritable() const
const Record &stringFields() const
String name() const
Bool ok() const
virtual Bool useCorrectedData(Bool correctedData)
virtual Bool correctedData()
Private Members
void cleanup()
void cleanRec()
void copyAll()
void copyData()
void copyHeader()
void copyHist()
void copyOther()
Bool replaceAll(const SDRecord& rec, Bool rowIsNew = False)
void init()
void initRec()
void resetDataType()
void applySelection(const Record &selection)
Vector<uInt> parseRow(const Record& selection, Int maxRow)
void createMS(const String& msName, TableLock::LockOption lockoption, Table::TableOption opt)
Double getRefPix(const Vector<Double> &chanVals, Double refVal, Double &delta, Int count=0)
void initStringFields(Record &fieldRec, const Record &modelRec)
String asStringVec(const Vector<Int> &vec)
Record getVectorShortCuts(const Record &recTemplate)
String dataUnits(const MSMainEnums::PredefinedColumns whichCol)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Thrown Exceptions

To Do

Member Description

SDMSIterator(const String &msName, const Record &selection, Table::TableOption opt = Table::Old, TableLock::LockOption lockoptions = TableLock::DefaultLocking, Bool useCorrectedData = False)

SDMSIterator(const SDMSIterator& other)

construct from another MS iterator

SDMSIterator(const SDMSIterator& other, const Record &selection)

construct from another with selection

~SDMSIterator()

SDMSIterator &operator=(const SDMSIterator& other)

assiment operator

virtual String type() const

what type of sditerator is this ("MeasurementSet")

Bool unlock()

Unlock this table

Bool lock(uInt nattempts=0)

Lock this table. Try nattempts times.

void origin()

reset the iterator to the top

Bool more()

are there any more SDRecords after the current one

SDIterator& operator++(int)

step to the next one, if at end, nothing changes

SDIterator& operator++()

SDIterator& operator--(int)

step back, if at end, nothing changes

SDIterator& operator--()

uInt where() const

return the current row number

uInt nrecords()

how many SDRecords are there

void resync()

resync with the disk contents

void flush()

flush to disk - a no-op for read-only sditerators (all MS-based ones are read-only)

void reselect()

re-select

void deepCopy(const String &newName)

make a deep copy

const SDRecord &get()

return the current SDRecord

const Record &getData()

return just the data portion of the current SDRecord

const Record &getHeader()

return just the header portion of the current SDRecord

const Record &getOther()

return just the other portion of the current SDRecord

const Array<String> getHist()

return just the hist portion of the current SDRecord

Bool put(const SDRecord& rec)

replace the current SDRecord with a new one

Bool appendRec(const SDRecord &rec)

add a new record at the end of the iterator

Bool deleteRec()

delete the record at the current location

Bool isWritable() const

see if this iterator is writable currently always returns False.

const Record &stringFields() const

get a record with structure like the current working SDRecord which contains only fields which are scalar string fields - the value of those fields is just a boolean. This is necessary so that the proper parsing of the selection when given as a string can be done for each field without having to duplicate that code in both glish and here in C++.

String name() const

return the name of iterator, the same as the table name

Bool ok() const

other things may not work if ok == False, this needs to be cleaned up

virtual Bool useCorrectedData(Bool correctedData)

Toggle use of corrected data if available.

virtual Bool correctedData()

query whether corrected data is being used.

void cleanup()

void cleanRec()

void copyAll()

void copyData()

void copyHeader()

void copyHist()

void copyOther()

Bool replaceAll(const SDRecord& rec, Bool rowIsNew = False)

void init()

void initRec()

void resetDataType()

void applySelection(const Record &selection)

Vector<uInt> parseRow(const Record& selection, Int maxRow)

void createMS(const String& msName, TableLock::LockOption lockoption, Table::TableOption opt)

Double getRefPix(const Vector<Double> &chanVals, Double refVal, Double &delta, Int count=0)

void initStringFields(Record &fieldRec, const Record &modelRec)

String asStringVec(const Vector<Int> &vec)

Record getVectorShortCuts(const Record &recTemplate)

String dataUnits(const MSMainEnums::PredefinedColumns whichCol)