casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::SearchEngine Class Reference

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

#include <SearchEngine.h>

List of all members.

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
SplatalogueTablesearch (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< StringuniqueSpecies () const
 Get the unique species in the table.
Vector< StringuniqueChemicalNames () 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

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 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


Member Function Documentation

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.

Get the unique chemical names in the table.

Get the unique species in the table.


Member Data Documentation

Definition at line 109 of file SearchEngine.h.

Definition at line 109 of file SearchEngine.h.

Definition at line 106 of file SearchEngine.h.

Definition at line 108 of file SearchEngine.h.

Definition at line 107 of file SearchEngine.h.


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