Class for loading and storing a collection of aerosol data. More...
#include <AerosolDB.h>
Classes | |
struct | InternalZoneFunctor |
Public Types | |
typedef boost::transform_iterator < InternalZoneFunctor, InternalZoneIterator, const AerosolZone & > | ZoneIterator |
ZoneIterator returns a pointer to an AerosolZone. More... | |
Public Member Functions | |
ZoneIterator | ZonesBegin () const |
Beginning of the collection of valid Zones. More... | |
ZoneIterator | ZonesEnd () const |
End of the collection of valid Zones. More... | |
Private Types | |
typedef InternalZoneMap::const_iterator | InternalZoneIterator |
typedef std::map< std::string, const AerosolZone * > | InternalZoneMap |
Private Member Functions | |
AerosolDB () | |
void | CacheZones () |
~AerosolDB () | |
Private Attributes | |
std::string | fAerosolIdString |
InternalZoneMap | fZoneMap |
Friends | |
class | Atmosphere |
Class for loading and storing a collection of aerosol data.
This class provides a front end for user communication with the atmosphere aerosol MySQL database. It does not perform MySQL queries itself; these are delegated to the SQL manager class AAerosolSQLManager. Rather, it extracts data from the database using the SQL manager and stores them in a collection of AerosolZone objects. Physics modules can then extract the aerosol measurements they need from each AerosolZone. Access to the AerosolZone collection occurs through a public iterator called ZoneIterator.
The Atmosphere class contains a private pointer to an instance of AerosolDB, and users can access a constant reference to this instance through a call to Atmosphere::GetAerosolDB. The AerosolDB object is updated along with the rest of the detector description whenever a call to det::Detector::Update is made, regardless of whether or not the aerosol database is actually being used.
When the Detector updates to a given time, AerosolDB will attempt to access the aerosol
table in the database. When the table is found, it will load values describing the aerosol attenuation, wavelength dependence of the attenuation, and phase function from the zone
and aerosol_zone
tables corresponding to the current det::Detector utl::TimeStamp. These values are stored in the AerosolZone collection.
If there are no data in the database for a given TimeStamp, the AerosolDB class will raise a utl::DataNotFoundInDBException. The default Offline reconstruction uses an aerosol SuperModel which automatically handles this exception and passes control to an aerosol parameterization. If users are not using the SuperModel, then they are responsible for catching the exception themselves.
Generally, users should not have to access this class at the module level, since the Atmosphere class contains high-level EvaluateXYZ functions that completely calculate the aerosol scattering and attenuation between two locations. These function calls are sufficient for most physics modules.
Definition at line 14 of file AerosolDB.h.
|
private |
Definition at line 20 of file AerosolDB.h.
|
private |
Definition at line 19 of file AerosolDB.h.
typedef boost::transform_iterator<InternalZoneFunctor, InternalZoneIterator, const AerosolZone&> atm::AerosolDB::ZoneIterator |
ZoneIterator returns a pointer to an AerosolZone.
Definition at line 33 of file AerosolDB.h.
|
private |
Definition at line 18 of file AerosolDB.cc.
References det::VManager::eNotFound, and det::VManager::GetData().
|
private |
Definition at line 92 of file AerosolDB.cc.
|
private |
Definition at line 45 of file AerosolDB.cc.
References det::VManager::eNotFound, ERROR, and det::VManager::GetData().
|
inline |
Beginning of the collection of valid Zones.
Definition at line 36 of file AerosolDB.h.
References fZoneMap.
Referenced by atm::MeasuredDBMieModel::CheckForUpdates(), ReadAerosolLLNS::ReadAerosolLL::Run(), testAtmLowLevelAtmInterface::testAerosolDB(), testAtmLowLevelAtmInterface::testAerosolDBNotFound(), testAtmLowLevelAtmInterface::testAttSlice(), and testAtmLowLevelAtmInterface::testPFSlice().
|
inline |
End of the collection of valid Zones.
Definition at line 40 of file AerosolDB.h.
References fZoneMap.
Referenced by atm::MeasuredDBMieModel::CheckForUpdates(), ReadAerosolLLNS::ReadAerosolLL::Run(), testAtmLowLevelAtmInterface::testAerosolDB(), testAtmLowLevelAtmInterface::testAerosolDBNotFound(), testAtmLowLevelAtmInterface::testAttSlice(), and testAtmLowLevelAtmInterface::testPFSlice().
|
friend |
Definition at line 49 of file AerosolDB.h.
|
private |
Definition at line 47 of file AerosolDB.h.
|
private |
Definition at line 22 of file AerosolDB.h.
Referenced by ZonesBegin(), and ZonesEnd().