11 #include <boost/lexical_cast.hpp>
13 #include <atm/MolecularZone.h>
14 #include <atm/MolecularLayer.h>
15 #include <atm/Atmosphere.h>
16 #include <utl/ErrorLogger.h>
24 MolecularZone::MolecularZone(
const string& zoneId,
const string& molecularId,
25 const string& zoneName,
26 const double northing,
const double easting) :
27 VZone(zoneId, zoneName, northing, easting),
29 fMolecularIdString(molecularId)
39 const VManager& manager = Detector::GetInstance().GetAManagerRegister();
42 if (stat == VManager::eNotFound)
44 boost::lexical_cast<string>(Detector::GetInstance().GetTime()));
81 const string& zoneIdString)
87 const VManager& manager = Detector::GetInstance().GetAManagerRegister();
89 layerVector =
new vector<const MolecularLayer*>;
92 indexMap[
"molecular_zone_id"] = zoneIdString;
94 vector<string> layerIdStrings;
96 manager.
GetData(layerIdStrings,
"molecular_layer",
"molecular_layer_id", indexMap);
98 if (stat == VManager::eNotFound) {
100 msg <<
"Did not find requested data, header table: molecular_layer, "
101 " zoneId: " << zoneIdString;
104 boost::lexical_cast<string>(Detector::GetInstance().GetTime()));
107 for (vector<string>::iterator it = layerIdStrings.begin();
108 it != layerIdStrings.end(); ++it) {
110 layerVector->push_back(layer);
InternalLayerVector::const_iterator InternalLayerIterator
void CacheLayers(InternalLayerVector *&layerVector, const std::string &zoneIdString) const
std::string fMolecularIdString
InternalLayerVector * fLayerVector
Interface for detector managers.
virtual Status GetData(double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
Exception to use in case requested data not found in the database with detailed printout.
Base class for Aerosol, Molecula, Overall Quality and Lidar atmosphere zones.
std::string fMolecularZoneIdString
boost::indirect_iterator< InternalLayerIterator, const MolecularLayer & > LayerIterator
Layer iterator returns a pointer to the molecular data slice for this zone.
std::map< std::string, std::string > IndexMap
LayerIterator LayersBegin() const
Beginning of the collection of molecular data slices.
LayerIterator LayersEnd() const
End of the collection of molecular data slices.
Molecular data for a zone slice.
#define ERROR(message)
Macro for logging error messages.
std::string fZoneIdString
Status
Specifies success or (eventually) various possible failure modes.