CARMA C++
carma::services::SpectralLineCatalog Class Reference

This class extracts information from a spectral line catalog file and puts it into a multimap for later searches. More...

#include <carma/services/SpectralLineCatalog.h>

Inherits carma::services::Catalog.

Public Member Functions

std::vector
< carma::services::SpectralLine
lookup (const std::string &lineName, const carma::services::Frequency &freqLo, const carma::services::Frequency &freqHi)
 Look up spectral line from a catalog. More...
 
const
carma::services::SpectralLine
lookup (const std::string &name, const std::string &transition)
 Look up spectral line from a catalog. More...
 
void open (const std::string &fileName)
 Open a table for read access. More...
 
 SpectralLineCatalog ()
 Default constructor. More...
 
 ~SpectralLineCatalog ()
 Destructor. More...
 
- Public Member Functions inherited from carma::services::Catalog
virtual bool contains (const std::string &entryName)
 
long getCommentColumnNo () const
 
std::string getFileName () const
 
bool hasCommentColumn () const
 Tables and Catalogs are of course allowed to have no column which contains comments. More...
 
virtual const
carma::services::CatalogEntry & 
lookup (const std::string &entryName)=0
 Lookup an catalog entry by name. More...
 
void open (const std::string &fileName)
 Open a file for reading in this Catalog. More...
 
void setCommentColumnNo (const long columnNo)
 Comment are allows to have white space, which can confuse carma::services::Table which assumes white space delineates columns. More...
 

Additional Inherited Members

- Static Public Attributes inherited from carma::services::Catalog
static const long NO_COMMENT = -1
 We're allowed to have no comments in catalog, as this value indicates. More...
 
- Protected Attributes inherited from carma::services::Catalog
carma::services::Table catalogTable_
 
std::string fileName_
 

Detailed Description

This class extracts information from a spectral line catalog file and puts it into a multimap for later searches.

Definition at line 34 of file SpectralLineCatalog.h.

Constructor & Destructor Documentation

carma::services::SpectralLineCatalog::SpectralLineCatalog ( )

Default constructor.

carma::services::SpectralLineCatalog::~SpectralLineCatalog ( )

Destructor.

Member Function Documentation

std::vector<carma::services::SpectralLine> carma::services::SpectralLineCatalog::lookup ( const std::string &  lineName,
const carma::services::Frequency freqLo,
const carma::services::Frequency freqHi 
)

Look up spectral line from a catalog.

This look-up is case insensitive.

Parameters
lineNameThe identifying name of the spectral line
freqLolower limit on the frequency of the spectral lines
freqHiupper limit on the frequency of the spectral lines
Returns
A vector of carma::services::SpectralLine which fall within the limits defined by the frequency parameters
Exceptions
SpectraLineNotFoundExceptionif the spectral line cannot be found in the opened catalog.
const carma::services::SpectralLine& carma::services::SpectralLineCatalog::lookup ( const std::string &  name,
const std::string &  transition 
)

Look up spectral line from a catalog.

This look-up is case insensitive.

Parameters
nameThe spectral line name
transitionThe specific transition for the spectral line
Returns
A carma::services::SpectralLine representation of the named entry
Exceptions
SpectraLineNotFoundExceptionif the spectral line cannot be found in the opened catalog.
void carma::services::SpectralLineCatalog::open ( const std::string &  fileName)

Open a table for read access.

Parameters
fileNamethe file to open.

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