casa
$Rev:20696$
|
Performs a query on a splatalogue spectral line table. More...
#include <SearchEngine.h>
Public Member Functions | |
SearchEngine (const SplatalogueTable *const table, const Bool list, const String &logfile, const Bool append) | |
table Input spectral line table to search. | |
~SearchEngine () | |
destuctor | |
SplatalogueTable * | search (const String &resultsTableName, const Double freqLow, const Double freqHigh, const Vector< String > &species, const Bool recommendedOnly, const Vector< String > &chemNames, const Vector< String > &qns, const Double intensityLow, const Double intensityHigh, const Double smu2Low, const Double smu2High, const Double logaLow, const Double logaHigh, const Double elLow, const Double elHigh, const Double euLow, const Double euHigh, const Bool includeRRLs, const Bool onlyRRLs) const |
Search the table. | |
Vector< String > | uniqueSpecies () const |
Get the unique species in the table. | |
Vector< String > | uniqueChemicalNames () const |
Get the unique chemical names in the table. | |
Private Member Functions | |
SearchEngine () | |
String | _getBetweenClause (const String &col, const Double low, const Double high) const |
Table | _runQuery (const String &query) const |
If the query table is currently not on disk, this method will temporarily write a copy of it to disk and query it, and then remove the copy from disk. | |
void | _logIt (const String &logString) const |
Private Attributes | |
LogIO * | _log |
const SplatalogueTable * | _table |
String | _logfile |
const Bool | _list |
const Bool | _append |
Performs a query on a splatalogue spectral line table.
Public interface
Searches a splatalogue table.
It is a requirement that users be able to perform searches on spectral line tables they import from Splatalogue.
SearchEngine searcher(...); SplatalogueTable *resTable = searcher.search();
A class to for splatalogue spectral line searches.
Definition at line 71 of file SearchEngine.h.
casa::SearchEngine::SearchEngine | ( | const SplatalogueTable *const | table, |
const Bool | list, | ||
const String & | logfile, | ||
const Bool | append | ||
) |
table
Input spectral line table to search.
list
List result set of search to logger (and optional logfile)? logfile
Logfile to list results to. Only used if list=True. If empty, no logfile is created. append
Append results to logfile (True) or overwrite logfile (False) if it exists? Only used if list=True and logfile not empty.
destuctor
casa::SearchEngine::SearchEngine | ( | ) | [private] |
String casa::SearchEngine::_getBetweenClause | ( | const String & | col, |
const Double | low, | ||
const Double | high | ||
) | const [private] |
void casa::SearchEngine::_logIt | ( | const String & | logString | ) | const [private] |
Table casa::SearchEngine::_runQuery | ( | const String & | query | ) | const [private] |
If the query table is currently not on disk, this method will temporarily write a copy of it to disk and query it, and then remove the copy from disk.
The method returns the query results table.
SplatalogueTable* casa::SearchEngine::search | ( | const String & | resultsTableName, |
const Double | freqLow, | ||
const Double | freqHigh, | ||
const Vector< String > & | species, | ||
const Bool | recommendedOnly, | ||
const Vector< String > & | chemNames, | ||
const Vector< String > & | qns, | ||
const Double | intensityLow, | ||
const Double | intensityHigh, | ||
const Double | smu2Low, | ||
const Double | smu2High, | ||
const Double | logaLow, | ||
const Double | logaHigh, | ||
const Double | elLow, | ||
const Double | elHigh, | ||
const Double | euLow, | ||
const Double | euHigh, | ||
const Bool | includeRRLs, | ||
const Bool | onlyRRLs | ||
) | const |
Search the table.
It is the caller's responsibility to delete the returned pointer.
Vector<String> casa::SearchEngine::uniqueChemicalNames | ( | ) | const |
Get the unique chemical names in the table.
Vector<String> casa::SearchEngine::uniqueSpecies | ( | ) | const |
Get the unique species in the table.
const Bool casa::SearchEngine::_append [private] |
Definition at line 109 of file SearchEngine.h.
const Bool casa::SearchEngine::_list [private] |
Definition at line 109 of file SearchEngine.h.
LogIO* casa::SearchEngine::_log [private] |
Definition at line 106 of file SearchEngine.h.
String casa::SearchEngine::_logfile [private] |
Definition at line 108 of file SearchEngine.h.
const SplatalogueTable* casa::SearchEngine::_table [private] |
Definition at line 107 of file SearchEngine.h.