CARMA C++
SpectralLineCatalog.h
Go to the documentation of this file.
1 
11 #ifndef CARMA_UTIL_SPECTRALLINECATALOG_H
12 #define CARMA_UTIL_SPECTRALLINECATALOG_H
13 
14 
15 #include <iostream>
16 #include <iomanip>
17 #include <sstream>
18 #include <string>
19 #include <map>
20 
21 #include "carma/services/Table.h"
24 #include "carma/services/Catalog.h"
25 
26 namespace carma {
27  namespace services {
28 
34  class SpectralLineCatalog : public carma::services::Catalog {
35  public:
36 
41 
46 
47 
52  void open(const std::string& fileName);
53 
67  std::vector<carma::services::SpectralLine>
68  lookup(const std::string & lineName,
69  const carma::services::Frequency & freqLo,
70  const carma::services::Frequency & freqHi);
71 
72 
83  const carma::services::SpectralLine& lookup(const std::string &name,
84  const std::string &transition);
85 
86  private:
97  const carma::services::SpectralLine& lookup(const std::string &name);
98 
99  // use a multimap since a line can have more than one freq
100  // (caused by different transitions of the same molecule)
101  std::multimap<std::string, carma::services::SpectralLine> lines_;
102  }; // end SpectralLineCatalog
103 
104  }
105 }
106 
107 #endif // CARMA_UTIL_SPECTRALLINECATALOG_H
This class extracts information from a spectral line catalog file and puts it into a multimap for lat...
carma/services/Frequency.h Representation of Frequency.
SpectralLine is derived from CatalogEntry and is used to hold information for a particular entry from...
Definition: SpectralLine.h:21
The Frequency class can represent any frequency in any units.
Definition: Frequency.h:39
SpectralLineCatalog()
Default constructor.
Common table functions.
void open(const std::string &fileName)
Open a table for read access.
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.