List of all members | Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
atm::AerosolDB Class Reference

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
 

Detailed Description

Class for loading and storing a collection of aerosol data.

Author
T. Paul

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.

Basic Operation

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.

Using the AerosolDB

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.

Member Typedef Documentation

typedef InternalZoneMap::const_iterator atm::AerosolDB::InternalZoneIterator
private

Definition at line 20 of file AerosolDB.h.

typedef std::map<std::string, const AerosolZone*> atm::AerosolDB::InternalZoneMap
private

Definition at line 19 of file AerosolDB.h.

ZoneIterator returns a pointer to an AerosolZone.

Definition at line 33 of file AerosolDB.h.

Constructor & Destructor Documentation

AerosolDB::AerosolDB ( )
private

Definition at line 18 of file AerosolDB.cc.

References det::VManager::eNotFound, and det::VManager::GetData().

AerosolDB::~AerosolDB ( )
private

Definition at line 92 of file AerosolDB.cc.

Member Function Documentation

void AerosolDB::CacheZones ( )
private

Definition at line 45 of file AerosolDB.cc.

References det::VManager::eNotFound, ERROR, and det::VManager::GetData().

ZoneIterator atm::AerosolDB::ZonesBegin ( ) const
inline
ZoneIterator atm::AerosolDB::ZonesEnd ( ) const
inline

Friends And Related Function Documentation

friend class Atmosphere
friend

Definition at line 49 of file AerosolDB.h.

Member Data Documentation

std::string atm::AerosolDB::fAerosolIdString
private

Definition at line 47 of file AerosolDB.h.

InternalZoneMap atm::AerosolDB::fZoneMap
private

Definition at line 22 of file AerosolDB.h.

Referenced by ZonesBegin(), and ZonesEnd().


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

, generated on Tue Sep 26 2023.