#include <TableData.hxx>
Public Member Functions | |
TableData (unsigned aNumCols, unsigned aNumRows) | |
~TableData () | |
Destructor removes all data. | |
unsigned | qNumRows () const |
Get the number of rows in the table. | |
unsigned | qNumCols () const |
Get the number of columns in the table. | |
unsigned | qNumExts () const |
Get the number of columns in the table. | |
template<typename ADataType > | |
void | assign (unsigned aCol, unsigned aRow, ADataType v) |
const DataType & | at (unsigned aCol, unsigned aRow) const |
Get the value in the data type as determined at compile time. | |
template<typename ADataType > | |
void | value (unsigned aCol, unsigned aRow, ADataType &aValue) const |
Fetch a value from the specified entry location. | |
bool | isDefined (unsigned aCol, unsigned aRow) const |
Has a value been assigned at this given entry location. | |
void | setundef (unsigned aCol, unsigned aRow) |
void | setNumExts (unsigned aNum) |
int | getFirstDefinedRow (unsigned aCol) |
void | loadFitsColumn (FitsFile &ff, const std::string &fitsColName, unsigned aCol, unsigned firstRow) |
bool | testRange (unsigned aCol, unsigned aRow, StringMap aRange) |
template<typename ADataType > | |
bool | testDiscrValues (unsigned aCol, unsigned aRow, std::map< int, ADataType > aValues) |
Private Member Functions | |
void | checkIsInRange (unsigned aCol, unsigned aRow) const |
void | writeToBuffer (unsigned aCol, unsigned aRow, DataType aValue) |
void | writeToDefined (unsigned aCol, unsigned aRow, bool aState) |
void | writeToNumExts (unsigned aNum) |
const DataType & | readBuffer (unsigned aCol, unsigned aRow) const |
bool | readDefined (unsigned aCol, unsigned aRow) const |
Private Attributes | |
unsigned | mNumCols |
Dimensions of the data table. | |
unsigned | mNumRows |
unsigned | mNumExts |
DataType ** | mBufferAry |
Data goes here. | |
bool ** | mDefinedAry |
Class to encapsulate the data that will be ingested into a data base table
TableData< DataType >::TableData | ( | unsigned | aNumCols, | |
unsigned | aNumRows | |||
) | [inline] |
Construct using number of attributes (columns) and number of rows of data (rows) for each attribute
Destructor removes all data.
void TableData< DataType >::assign | ( | unsigned | aCol, | |
unsigned | aRow, | |||
ADataType | v | |||
) | [inline] |
Assign a value to the given entry location. Note the use of the above convert type functions so that all combinations of compile time implementations can be dealt with.
Referenced by DataDumper::addDefaultRow(), Provenance< DataType >::build(), SourceTable::calcMergedClass(), SourceTable::copyPassband(), Table< DataType >::datetimeTest(), VSAProject< DataType >::doit(), VersionNum< DataType >::doit(), UtDate< DataType >::doit(), TotalExpTime< DataType >::doit(), TelRunNum< DataType >::doit(), SloanCoords< DataType >::doit(), SkySubScale< DataType >::doit(), QuantitiesByAst< DataType >::doit(), ProgrammeID< DataType >::doit(), ObjectID< DataType >::doit(), NumDetectors< DataType >::doit(), Moon< DataType >::doit(), ColourIndexError< DataType >::doit(), ColourIndex< DataType >::doit(), JulianDayNum< DataType >::doit(), HtmIndex< DataType >::doit(), HlRadii< DataType >::doit(), HlRadCirc< DataType >::doit(), GalacticCoords< DataType >::doit(), FrameType< DataType >::doit(), IndirectFrameID< DataType >::doit(), DirectFrameID< DataType >::doit(), FilterID< DataType >::doit(), FilterIDByFits< DataType >::doit(), FileTimeStamp< DataType >::doit(), FileName< DataType >::doit(), DoneToBool< DataType >::doit(), DegToH< DataType >::doit(), CurationTaskID< DataType >::doit(), CalibratedVSAMagnitude< DataType >::doit2(), RaDecByAst< DataType >::doit2(), MagnitudeError< DataType >::doit2(), CalibratedMagnitude< DataType >::doit2(), SourceTable::fillExtinctionValues(), DataChannel_SQL_float< DataType >::input(), DataChannel_SQL_real< DataType >::input(), DataChannel_SQL_bigint< DataType >::input(), DataChannel_SQL_int< DataType >::input(), DataChannel_SQL_smallint< DataType >::input(), DataChannel_SQL_tinyint< DataType >::input(), SourceTable::insertAstrometricData(), insertExtNum(), insertFitsColumns(), insertKeywordValue(), SourceTable::insertUserSupplied(), and Table< DataType >::varcharTest().
const DataType& TableData< DataType >::at | ( | unsigned | aCol, | |
unsigned | aRow | |||
) | const [inline] |
Get the value in the data type as determined at compile time.
Referenced by Table< DataType >::bigintTest(), SourceTable::calcMergedClass(), Table< DataType >::datetimeTest(), DataDumper::dumpAsCsv(), SourceTable::fillExtinctionValues(), and Table< DataType >::varcharTest().
int TableData< DataType >::getFirstDefinedRow | ( | unsigned | aCol | ) | [inline] |
Returns the index of the first row in the specified column that has a defined value
aCol | column index to search |
bool TableData< DataType >::isDefined | ( | unsigned | aCol, | |
unsigned | aRow | |||
) | const [inline] |
Has a value been assigned at this given entry location.
Referenced by DataDumper::addDefaultRow(), Table< DataType >::bigintTest(), SourceTable::calcMergedClass(), ColourIndexError< DataType >::doit(), ColourIndex< DataType >::doit(), CalibratedVSAMagnitude< DataType >::doit2(), MagnitudeError< DataType >::doit2(), CalibratedMagnitude< DataType >::doit2(), and TableData< Numeric >::getFirstDefinedRow().
void TableData< DataType >::loadFitsColumn | ( | FitsFile & | ff, | |
const std::string & | fitsColName, | |||
unsigned | aCol, | |||
unsigned | firstRow | |||
) | [inline] |
Given a FitsFile object positioned at a table extension, load the entire contents of the named column in the file to the given column number in the table
Referenced by insertFitsColumns().
Get the number of columns in the table.
Referenced by SourceTable::copyPassband(), DataDumper::dumpAsCsv(), extractMetadata(), and extractSources().
Get the number of columns in the table.
Referenced by DataDumper::addDefaultRow().
Get the number of rows in the table.
Referenced by DataDumper::addDefaultRow(), SourceTable::calcMergedClass(), SourceTable::copyPassband(), DataDumper::dumpAsCsv(), extractMetadata(), extractSources(), SourceTable::fillExtinctionValues(), SourceTable::finishOff(), SourceTable::insertAstrometricData(), SourceTable::insertUserSupplied(), and SourceTable::writeAsBinary().
bool TableData< DataType >::readDefined | ( | unsigned | aCol, | |
unsigned | aRow | |||
) | const [inline, private] |
Referenced by TableData< Numeric >::isDefined().
bool TableData< DataType >::testDiscrValues | ( | unsigned | aCol, | |
unsigned | aRow, | |||
std::map< int, ADataType > | aValues | |||
) | [inline] |
Test whether a metadata value is within a set of discrete values at the given entry location. Note the use of the above convert type functions so that all combinations of compile time implementations can be dealt with.
bool TableData< DataType >::testRange | ( | unsigned | aCol, | |
unsigned | aRow, | |||
StringMap | aRange | |||
) | [inline] |
Test whether a metadata value is within the prescribed range at the given entry location. Note the use of the above convert type functions so that all combinations of compile time implementations can be dealt with.
void TableData< DataType >::value | ( | unsigned | aCol, | |
unsigned | aRow, | |||
ADataType & | aValue | |||
) | const [inline] |
Fetch a value from the specified entry location.
Referenced by DataDumper::addDefaultRow(), UtDate< DataType >::doit(), TotalExpTime< DataType >::doit(), SloanCoords< DataType >::doit(), SkySubScale< DataType >::doit(), QuantitiesByAst< DataType >::doit(), ProgrammeID< DataType >::doit(), Moon< DataType >::doit(), ColourIndexError< DataType >::doit(), ColourIndex< DataType >::doit(), JulianDayNum< DataType >::doit(), HtmIndex< DataType >::doit(), HlRadii< DataType >::doit(), HlRadCirc< DataType >::doit(), GalacticCoords< DataType >::doit(), IndirectFrameID< DataType >::doit(), FilterID< DataType >::doit(), DoneToBool< DataType >::doit(), DegToH< DataType >::doit(), CalibratedVSAMagnitude< DataType >::doit2(), RaDecByAst< DataType >::doit2(), MagnitudeError< DataType >::doit2(), CalibratedMagnitude< DataType >::doit2(), insertFitsColumns(), DataDumper::isUnique(), DataChannel_SQL_float< DataType >::output(), DataChannel_SQL_real< DataType >::output(), DataChannel_SQL_bigint< DataType >::output(), DataChannel_SQL_int< DataType >::output(), DataChannel_SQL_smallint< DataType >::output(), and DataChannel_SQL_tinyint< DataType >::output().
void TableData< DataType >::writeToBuffer | ( | unsigned | aCol, | |
unsigned | aRow, | |||
DataType | aValue | |||
) | [inline, private] |
Referenced by TableData< Numeric >::assign().
void TableData< DataType >::writeToDefined | ( | unsigned | aCol, | |
unsigned | aRow, | |||
bool | aState | |||
) | [inline, private] |
Referenced by TableData< Numeric >::loadFitsColumn(), and TableData< Numeric >::setundef().
void TableData< DataType >::writeToNumExts | ( | unsigned | aNum | ) | [inline, private] |
Referenced by TableData< Numeric >::setNumExts().
DataType** TableData< DataType >::mBufferAry [private] |
bool** TableData< DataType >::mDefinedAry [private] |
Corresponding boolean array specifying whether or not a given column and row value is defined
Referenced by TableData< Numeric >::readDefined(), TableData< Numeric >::TableData(), TableData< Numeric >::writeToBuffer(), TableData< Numeric >::writeToDefined(), and TableData< Numeric >::~TableData().
Dimensions of the data table.
Referenced by TableData< Numeric >::checkIsInRange(), TableData< Numeric >::qNumCols(), TableData< Numeric >::TableData(), and TableData< Numeric >::~TableData().
Referenced by TableData< Numeric >::qNumExts(), and TableData< Numeric >::writeToNumExts().