#include <DataMethod.hxx>
Public Member Functions | |
DataMethod () | |
virtual | ~DataMethod () |
Virtual destructor. | |
const std::string & | getName () const |
void | logInfo (const StringMap &aTarget) |
Helper function to log information on the instantiated DataMethod. | |
bool | useOtherTables (IntMap &sourceTbl, int tabNo) |
void | determineSourceAndTarget (const TableInfo &aInfo, const StringMap &aTarget) |
bool | determineDetectionSourceAndTarget (const TableInfo *aInfo, int tabNo, const StringMap &aTarget) |
virtual void | setSource (IntMap &tbls, IntMap &cols, StringMap units)=0 |
virtual void | setTarget (IntMap &cols, StringMap units)=0 |
virtual void | doit (TableData< DataType > &data, int row1, int row2)=0 |
virtual void | doit2 (TableData< DataType > &inpData, TableData< DataType > &data, int row1, int row2)=0 |
Protected Attributes | |
std::string | methodName |
The name given to a data method. |
Abstract base class for data method class. A data method is a function of one or more "source" attributes in a table resulting in one or more "target" attributes. The design of this class is based upon the "Command" pattern in the Design Patterns book (p233).
DataMethod< DataType >::DataMethod | ( | ) | [inline] |
Constructor in the base class sets the default value for the methodName. This value can be overwritten in the constructors of the derived classes.
References DataMethod< DataType >::methodName.
virtual DataMethod< DataType >::~DataMethod | ( | ) | [inline, virtual] |
Virtual destructor.
bool DataMethod< DataType >::determineDetectionSourceAndTarget | ( | const TableInfo * | aInfo, | |
int | tabNo, | |||
const StringMap & | aTarget | |||
) | [inline] |
Use information in the given schema to set the source and target data columns for a given target and method.
References TableInfo::getAttNo(), Options::getTableNum(), TableInfo::getUnits(), TableInfo::getUsingValue(), StringOps::hasSubstr(), DataMethod< DataType >::logInfo(), DataMethod< DataType >::setSource(), DataMethod< DataType >::setTarget(), StringOps::split(), and DataMethod< DataType >::useOtherTables().
Referenced by extractMetadata(), and extractSources().
void DataMethod< DataType >::determineSourceAndTarget | ( | const TableInfo & | aInfo, | |
const StringMap & | aTarget | |||
) | [inline] |
Use information in the given schema to set the source and target data columns for a given target and method.
References TableInfo::getAttNo(), TableInfo::getTableName(), Options::getTableNum(), TableInfo::getUnits(), TableInfo::getUsingValue(), StringOps::hasSubstr(), DataMethod< DataType >::logInfo(), DataMethod< DataType >::setSource(), DataMethod< DataType >::setTarget(), and StringOps::split().
Referenced by SourceTable::finishOff().
virtual void DataMethod< DataType >::doit | ( | TableData< DataType > & | data, | |
int | row1, | |||
int | row2 | |||
) | [pure virtual] |
Run the data method. This fills up the appropriate columns in the TableData object over the given row range where row>=row1 and row<row2
Implemented in AxesLength< DataType >, Cartesian< DataType >, CurationTaskID< DataType >, NothingToDo< DataType >, DegToH< DataType >, DoneToBool< DataType >, FileName< DataType >, FileTimeStamp< DataType >, FilterIDByFits< DataType >, FilterID< DataType >, DirectFrameID< DataType >, IndirectFrameID< DataType >, FrameType< DataType >, GalacticCoords< DataType >, HlRadCirc< DataType >, HlRadii< DataType >, HtmIndex< DataType >, JulianDayNum< DataType >, CalibratedMagnitude< DataType >, MagnitudeError< DataType >, ColourIndex< DataType >, ColourIndexError< DataType >, Moon< DataType >, NumDetectors< DataType >, ObjectID< DataType >, ProgrammeID< DataType >, QuantitiesByAst< DataType >, RaDecByAst< DataType >, SkySubScale< DataType >, SloanCoords< DataType >, TelRunNum< DataType >, TotalExpTime< DataType >, UtDate< DataType >, VersionNum< DataType >, CalibratedVSAMagnitude< DataType >, and VSAProject< DataType >.
Referenced by extractSources(), and SourceTable::finishOff().
virtual void DataMethod< DataType >::doit2 | ( | TableData< DataType > & | inpData, | |
TableData< DataType > & | data, | |||
int | row1, | |||
int | row2 | |||
) | [pure virtual] |
Implemented in AxesLength< DataType >, Cartesian< DataType >, CurationTaskID< DataType >, NothingToDo< DataType >, DegToH< DataType >, DoneToBool< DataType >, FileName< DataType >, FileTimeStamp< DataType >, FilterIDByFits< DataType >, FilterID< DataType >, DirectFrameID< DataType >, IndirectFrameID< DataType >, FrameType< DataType >, GalacticCoords< DataType >, HlRadCirc< DataType >, HlRadii< DataType >, HtmIndex< DataType >, JulianDayNum< DataType >, CalibratedMagnitude< DataType >, MagnitudeError< DataType >, ColourIndex< DataType >, ColourIndexError< DataType >, Moon< DataType >, NumDetectors< DataType >, ObjectID< DataType >, ProgrammeID< DataType >, QuantitiesByAst< DataType >, RaDecByAst< DataType >, SkySubScale< DataType >, SloanCoords< DataType >, TelRunNum< DataType >, TotalExpTime< DataType >, UtDate< DataType >, VersionNum< DataType >, CalibratedVSAMagnitude< DataType >, and VSAProject< DataType >.
Referenced by extractSources().
const std::string& DataMethod< DataType >::getName | ( | ) | const [inline] |
Return the name of the data method. The appropriate value as defined in subclasses will be returned.
References DataMethod< DataType >::methodName.
void DataMethod< DataType >::logInfo | ( | const StringMap & | aTarget | ) | [inline] |
Helper function to log information on the instantiated DataMethod.
References Logger::addMessage(), and DataMethod< DataType >::methodName.
Referenced by DataMethod< DataType >::determineDetectionSourceAndTarget(), and DataMethod< DataType >::determineSourceAndTarget().
virtual void DataMethod< DataType >::setSource | ( | IntMap & | tbls, | |
IntMap & | cols, | |||
StringMap | units | |||
) | [pure virtual] |
Sets the "source" data columns that are required as input for filling up the "target" data columns
Implemented in AxesLength< DataType >, Cartesian< DataType >, CurationTaskID< DataType >, NothingToDo< DataType >, DegToH< DataType >, DoneToBool< DataType >, FileName< DataType >, FileTimeStamp< DataType >, FilterIDByFits< DataType >, FilterID< DataType >, DirectFrameID< DataType >, IndirectFrameID< DataType >, FrameType< DataType >, GalacticCoords< DataType >, HlRadCirc< DataType >, HlRadii< DataType >, HtmIndex< DataType >, JulianDayNum< DataType >, CalibratedMagnitude< DataType >, MagnitudeError< DataType >, ColourIndex< DataType >, ColourIndexError< DataType >, Moon< DataType >, NumDetectors< DataType >, ObjectID< DataType >, ProgrammeID< DataType >, QuantitiesByAst< DataType >, RaDecByAst< DataType >, SkySubScale< DataType >, SloanCoords< DataType >, TelRunNum< DataType >, TotalExpTime< DataType >, UtDate< DataType >, VersionNum< DataType >, CalibratedVSAMagnitude< DataType >, and VSAProject< DataType >.
Referenced by DataMethod< DataType >::determineDetectionSourceAndTarget(), and DataMethod< DataType >::determineSourceAndTarget().
virtual void DataMethod< DataType >::setTarget | ( | IntMap & | cols, | |
StringMap | units | |||
) | [pure virtual] |
Sets the target data columns that are filled up from taking input from the source data columns
Implemented in AxesLength< DataType >, Cartesian< DataType >, CurationTaskID< DataType >, NothingToDo< DataType >, DegToH< DataType >, DoneToBool< DataType >, FileName< DataType >, FileTimeStamp< DataType >, FilterIDByFits< DataType >, FilterID< DataType >, DirectFrameID< DataType >, IndirectFrameID< DataType >, FrameType< DataType >, GalacticCoords< DataType >, HlRadCirc< DataType >, HlRadii< DataType >, HtmIndex< DataType >, JulianDayNum< DataType >, CalibratedMagnitude< DataType >, MagnitudeError< DataType >, ColourIndex< DataType >, ColourIndexError< DataType >, Moon< DataType >, NumDetectors< DataType >, ObjectID< DataType >, ProgrammeID< DataType >, QuantitiesByAst< DataType >, RaDecByAst< DataType >, SkySubScale< DataType >, SloanCoords< DataType >, TelRunNum< DataType >, TotalExpTime< DataType >, UtDate< DataType >, VersionNum< DataType >, CalibratedVSAMagnitude< DataType >, and VSAProject< DataType >.
Referenced by DataMethod< DataType >::determineDetectionSourceAndTarget(), and DataMethod< DataType >::determineSourceAndTarget().
bool DataMethod< DataType >::useOtherTables | ( | IntMap & | sourceTbl, | |
int | tabNo | |||
) | [inline] |
Referenced by DataMethod< DataType >::determineDetectionSourceAndTarget().
std::string DataMethod< DataType >::methodName [protected] |
The name given to a data method.
Referenced by DataMethod< DataType >::DataMethod(), DataMethod< DataType >::getName(), and DataMethod< DataType >::logInfo().