#include <Options.h>
Public Member Functions | |
bool | isOption (const std::string &name) const |
Does the given name correspond to any of the options in the class? | |
void | checkOptions (const std::list< std::string > &names) const |
Check stored options against those in a list. | |
int | getOptionInt (const std::string &name) const |
Return, as integer, the value associated with named option. | |
double | getOptionDbl (const std::string &name) const |
Return, as double, the value associated with named option. | |
const std::string & | getOptionStr (const std::string &name) const |
Return, as std::string, the value associated with named option. | |
const std::string & | getCurationEvent () const |
Return the value associated with the curation event option. | |
const std::string & | getArchive () const |
Return the value associated with the archive option. | |
const std::string & | getCsvPath () const |
const std::string & | getIllumFileList () const |
Return the value associated with the illumination table list file. | |
const std::string & | getOutTablesList () const |
Return the value giving the tables which are to be created. | |
const std::string & | getCsvPrefix () const |
const std::string & | getSqlPath () const |
const std::string & | getNewObjId () const |
Return the value associated with the object ID option. | |
const std::string & | getTableList () const |
const std::string & | getTableName (int n) const |
Return the n'th table name in the table list. | |
int | getTableNum (const std::string &name) const |
const std::string & | getIllumTableName (int n) const |
Return the n'th illumination table name. | |
const std::string & | getSchemaFilename (int n) const |
Return the n'th schema file name in the table list. | |
StringMap | getConstraints (int n) const |
int | getNumTables () const |
Return the number of tables in the list. | |
const std::string & | getFileList () const |
Return the name of the file that lists all the FITS files to be ingested. | |
const std::string & | getPixelFilename (int n) const |
Return the name of the n'th pixel file in the list. | |
const std::string & | getCatalogFilename (int n) const |
Return the name of the n'th catalog (source) file in the list. | |
const std::string & | getCompressedName (int n) const |
int | getNumScienceFiles () const |
Return the number of files in the list. | |
int | getNumIllumTables () const |
Static Private Attributes | |
static int | numOptions = 0 |
static std::map< std::string, std::string > | valueMap |
Map of parameter name to parameter value. | |
static std::map< int, StringMap > | fileMap |
Map of input textfile that gives list of files. | |
static std::map< int, StringMap > | illumMap |
Map of input textfile that gives list of illumination files. | |
static std::map< int, StringMap > | tableMap |
Friends | |
class | OptionsFiller |
Class to keep track of user supplied program options (parameters) given on the command line and/or in parameter files. This is based on the monostate design patter where only one instance of the class is permittted (and needed of course). This single instances is initialised by the friendly OptionsFiller class
void Options::checkOptions | ( | const std::list< std::string > & | names | ) | const |
const std::string & Options::getArchive | ( | ) | const |
Return the value associated with the archive option.
References OptionNames::archive, and valueMap.
Referenced by Moon< DataType >::calcMoonPosAndPhase(), Table< DataType >::checkData(), CalibratedVSAMagnitude< DataType >::doit2(), CalibratedMagnitude< DataType >::doit2(), FileName< DataType >::FileName(), SourceTable::finishOff(), getMethod(), FitsFile::initExpectedKeysList(), makeTargetList(), TelRunNum< DataType >::TelRunNum(), and FitsFile::testExpectedKeys().
const std::string & Options::getCatalogFilename | ( | int | n | ) | const |
Return the name of the n'th catalog (source) file in the list.
References fileMap.
Referenced by extractMetadata(), and extractSources().
const std::string & Options::getCompressedName | ( | int | n | ) | const |
Return the base name of the n'th compressed image in the list. The actual filenames will have been appended with -0.jpg, -1.jpg indication the HDU no.
References fileMap.
StringMap Options::getConstraints | ( | int | n | ) | const |
Return a list of the constraining attributes associated with the n'th table in the list. The map<> is used like an infinite array.
References tableMap.
Referenced by extractMetadata(), and extractSources().
const std::string & Options::getCsvPath | ( | ) | const |
Return the value associated with option specifying the path where all the CSV files go
References OptionNames::csvpath, and valueMap.
Referenced by extractMetadata(), and extractSources().
const std::string & Options::getCsvPrefix | ( | ) | const |
Return the value associated with option specifying the output file name prefix
References OptionNames::csvprefix, and valueMap.
Referenced by extractMetadata(), and extractSources().
const std::string & Options::getCurationEvent | ( | ) | const |
Return the value associated with the curation event option.
References OptionNames::cuEvent, and valueMap.
Referenced by CurationTaskID< DataType >::CurationTaskID().
const std::string & Options::getFileList | ( | ) | const |
Return the name of the file that lists all the FITS files to be ingested.
References OptionNames::files, and valueMap.
Referenced by main().
const std::string & Options::getIllumFileList | ( | ) | const |
Return the value associated with the illumination table list file.
References OptionNames::illumname, and valueMap.
Referenced by extractSources(), and main().
const std::string & Options::getIllumTableName | ( | int | n | ) | const |
const std::string & Options::getNewObjId | ( | ) | const |
Return the value associated with the object ID option.
References OptionNames::newobjid, and valueMap.
Referenced by extractSources(), and ObjectID< DataType >::ObjectID().
int Options::getNumIllumTables | ( | ) | const |
References illumMap.
Referenced by extractSources().
int Options::getNumScienceFiles | ( | ) | const |
Return the number of files in the list.
References fileMap.
Referenced by extractMetadata(), and extractSources().
int Options::getNumTables | ( | ) | const |
Return the number of tables in the list.
References tableMap.
Referenced by extractMetadata(), and extractSources().
double Options::getOptionDbl | ( | const std::string & | name | ) | const |
Return, as double, the value associated with named option.
References isOption(), and valueMap.
Referenced by SourceTable::insertAstrometricData(), and SourceTable::insertUserSupplied().
int Options::getOptionInt | ( | const std::string & | name | ) | const |
Return, as integer, the value associated with named option.
References isOption(), and valueMap.
const std::string & Options::getOptionStr | ( | const std::string & | name | ) | const |
Return, as std::string, the value associated with named option.
References isOption(), and valueMap.
Referenced by CameoSet::CameoSet(), SourceTable::fillExtinctionValues(), SourceTable::insertUserSupplied(), main(), and SourceTable::writeAsBinary().
const std::string & Options::getOutTablesList | ( | ) | const |
Return the value giving the tables which are to be created.
References OptionNames::outtables, and valueMap.
Referenced by extractSources().
const std::string & Options::getPixelFilename | ( | int | n | ) | const |
Return the name of the n'th pixel file in the list.
References fileMap.
Referenced by extractMetadata(), and extractSources().
const std::string & Options::getSchemaFilename | ( | int | n | ) | const |
Return the n'th schema file name in the table list.
References tableMap.
Referenced by extractMetadata(), and extractSources().
const std::string & Options::getSqlPath | ( | ) | const |
Return the value associated with option specifying the path where the schema files are
References OptionNames::sqlpath, and valueMap.
Referenced by extractMetadata(), extractSources(), ProgrammeTable::loadData(), and main().
const std::string & Options::getTableList | ( | ) | const |
const std::string & Options::getTableName | ( | int | n | ) | const |
Return the n'th table name in the table list.
References tableMap.
Referenced by extractMetadata(), and extractSources().
int Options::getTableNum | ( | const std::string & | name | ) | const |
References tableMap.
Referenced by DataMethod< DataType >::determineDetectionSourceAndTarget(), and DataMethod< DataType >::determineSourceAndTarget().
bool Options::isOption | ( | const std::string & | name | ) | const [inline] |
Does the given name correspond to any of the options in the class?
References valueMap.
Referenced by checkOptions(), CameoSet::countCameoSchemas(), getOptionDbl(), getOptionInt(), and getOptionStr().
friend class OptionsFiller [friend] |
map< int, StringMap > Options::fileMap [static, private] |
Map of input textfile that gives list of files.
Referenced by getCatalogFilename(), getCompressedName(), getNumScienceFiles(), getPixelFilename(), and OptionsFiller::parseFileList().
map< int, StringMap > Options::illumMap [static, private] |
Map of input textfile that gives list of illumination files.
Referenced by getIllumTableName(), getNumIllumTables(), and OptionsFiller::parseIllumList().
int Options::numOptions = 0 [static, private] |
map< int, StringMap > Options::tableMap [static, private] |
Map of input textfile that gives list of tables and their contraints
Referenced by getConstraints(), getNumTables(), getSchemaFilename(), getTableName(), getTableNum(), and OptionsFiller::parseTableList().
map< string, string > Options::valueMap [static, private] |
Map of parameter name to parameter value.
Referenced by getArchive(), getCsvPath(), getCsvPrefix(), getCurationEvent(), getFileList(), getIllumFileList(), getNewObjId(), getOptionDbl(), getOptionInt(), getOptionStr(), getOutTablesList(), getSqlPath(), getTableList(), isOption(), OptionsFiller::parseCommand(), and OptionsFiller::setOption().