4 #include <det/Detector.h>
5 #include <utl/ErrorLogger.h>
6 #include <atm/Atmosphere.h>
7 #include <atm/AerosolZone.h>
8 #include <atm/AerosolDB.h>
10 #include <utl/AugerException.h>
18 AerosolDB::AerosolDB()
27 Detector::GetInstance().GetAManagerRegister().GetManager(
"AAerosolSQLManager");
30 manager.
GetData(fAerosolIdString,
"aerosol",
"aerosol_id", emptyIndexMap);
45 AerosolDB::CacheZones()
49 if (!fZoneMap.empty())
50 ERROR(
"Call to CacheZones with non-empty fZoneMap. This is a bug .. please report it");
55 Detector::GetInstance().GetAManagerRegister().GetManager(
"AAerosolSQLManager");
60 vector<string> zoneIdStrings;
62 indexMap[
"aerosol_id"] = fAerosolIdString;
64 manager.
GetData(zoneIdStrings,
"zone",
"zone_id", indexMap);
67 boost::lexical_cast<string>(Detector::GetInstance().GetTime()));
70 for (vector<string>::iterator it = zoneIdStrings.begin();
71 it != zoneIdStrings.end(); ++it) {
74 zoneNameIndexMap[
"zone_id"] = *it;
77 manager.
GetData(zoneName,
"zone",
"name", zoneNameIndexMap);
80 manager.
GetData(zoneNorthing,
"zone",
"northing", zoneNameIndexMap);
83 manager.
GetData(zoneEasting,
"zone",
"easting", zoneNameIndexMap);
86 new AerosolZone(*it, fAerosolIdString, zoneName, zoneNorthing, zoneEasting);
88 fZoneMap[zoneName] = aZone;
92 AerosolDB::~AerosolDB()
95 it != fZoneMap.end(); ++it)
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.
InternalZoneMap::const_iterator InternalZoneIterator
Class for storing an hour's worth of aerosol data.
std::map< std::string, std::string > IndexMap
#define ERROR(message)
Macro for logging error messages.
Status
Specifies success or (eventually) various possible failure modes.