casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casa::SearchEngine Class Reference

Performs a query on a splatalogue spectral line table. More...

#include <SearchEngine.h>

Public Member Functions

 SearchEngine (const SplatalogueTable *const table, const casacore::Bool list, const casacore::String &logfile, const casacore::Bool append)
 table casacore::Input spectral line table to search. More...
 
 ~SearchEngine ()
 destuctor More...
 
SplatalogueTablesearch (const casacore::String &resultsTableName, const casacore::Double freqLow, const casacore::Double freqHigh, const casacore::Vector< casacore::String > &species, const casacore::Bool recommendedOnly, const casacore::Vector< casacore::String > &chemNames, const casacore::Vector< casacore::String > &qns, const casacore::Double intensityLow, const casacore::Double intensityHigh, const casacore::Double smu2Low, const casacore::Double smu2High, const casacore::Double logaLow, const casacore::Double logaHigh, const casacore::Double elLow, const casacore::Double elHigh, const casacore::Double euLow, const casacore::Double euHigh, const casacore::Bool includeRRLs, const casacore::Bool onlyRRLs) const
 Search the table. More...
 
casacore::Vector
< casacore::String
uniqueSpecies () const
 Get the unique species in the table. More...
 
casacore::Vector
< casacore::String
uniqueChemicalNames () const
 Get the unique chemical names in the table. More...
 

Private Member Functions

 SearchEngine ()
 
casacore::String _getBetweenClause (const casacore::String &col, const casacore::Double low, const casacore::Double high) const
 
casacore::Table _runQuery (const casacore::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. More...
 
void _logIt (const casacore::String &logString) const
 

Private Attributes

casacore::LogIO_log
 
const SplatalogueTable_table
 
casacore::String _logfile
 
const casacore::Bool _list
 
const casacore::Bool _append
 

Detailed Description

Performs a query on a splatalogue spectral line table.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

Searches a splatalogue table.

Synopsis

It is a requirement that users be able to perform searches on spectral line tables they import from Splatalogue.

Example

SearchEngine searcher(...);
SplatalogueTable *resTable = searcher.search();

Motivation

A class to for splatalogue spectral line searches.

Definition at line 71 of file SearchEngine.h.

Constructor & Destructor Documentation

casa::SearchEngine::SearchEngine ( const SplatalogueTable *const  table,
const casacore::Bool  list,
const casacore::String logfile,
const casacore::Bool  append 
)

table casacore::Input spectral line table to search.

list casacore::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.

casa::SearchEngine::~SearchEngine ( )

destuctor

casa::SearchEngine::SearchEngine ( )
private

Member Function Documentation

casacore::String casa::SearchEngine::_getBetweenClause ( const casacore::String col,
const casacore::Double  low,
const casacore::Double  high 
) const
private
void casa::SearchEngine::_logIt ( const casacore::String logString) const
private
casacore::Table casa::SearchEngine::_runQuery ( const casacore::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 casacore::String resultsTableName,
const casacore::Double  freqLow,
const casacore::Double  freqHigh,
const casacore::Vector< casacore::String > &  species,
const casacore::Bool  recommendedOnly,
const casacore::Vector< casacore::String > &  chemNames,
const casacore::Vector< casacore::String > &  qns,
const casacore::Double  intensityLow,
const casacore::Double  intensityHigh,
const casacore::Double  smu2Low,
const casacore::Double  smu2High,
const casacore::Double  logaLow,
const casacore::Double  logaHigh,
const casacore::Double  elLow,
const casacore::Double  elHigh,
const casacore::Double  euLow,
const casacore::Double  euHigh,
const casacore::Bool  includeRRLs,
const casacore::Bool  onlyRRLs 
) const

Search the table.

It is the caller's responsibility to delete the returned pointer.

casacore::Vector<casacore::String> casa::SearchEngine::uniqueChemicalNames ( ) const

Get the unique chemical names in the table.

casacore::Vector<casacore::String> casa::SearchEngine::uniqueSpecies ( ) const

Get the unique species in the table.

Member Data Documentation

const casacore::Bool casa::SearchEngine::_append
private

Definition at line 109 of file SearchEngine.h.

const casacore::Bool casa::SearchEngine::_list
private

Definition at line 109 of file SearchEngine.h.

casacore::LogIO* casa::SearchEngine::_log
private

Definition at line 106 of file SearchEngine.h.

casacore::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.


The documentation for this class was generated from the following file: