LidarZone.h
Go to the documentation of this file.
1 
9 #ifndef _atm_LidarZone_h_
10 #define _atm_LidarZone_h_
11 
12 #include <string>
13 #include <boost/lexical_cast.hpp>
14 #include <boost/iterator/indirect_iterator.hpp>
15 
16 #include <atm/VZone.h>
17 #include <det/Detector.h>
18 #include <atm/VAODSlice.h>
19 #include <utl/ErrorLogger.h>
20 #include <utl/AugerException.h>
21 
22 
23 namespace atm {
24 
39  class LidarZone : public VZone {
40 
41  private:
42  typedef std::vector<const VAODSlice*> InternalVAODSliceVector;
43  typedef InternalVAODSliceVector::const_iterator InternalVAODSliceIterator;
44 
46 
47  public:
49  typedef boost::indirect_iterator<InternalVAODSliceIterator,
51 
54 
57 
59  double GetLidarMaxHeight() const;
60 
62  double GetCloudCoverage() const;
63 
65  double GetLowestCloudHeight() const;
66 
68  double GetLowestCloudThickness() const;
69 
71  double GetLowestCloudVAOD() const;
72 
73  private:
74  LidarZone(const std::string& zoneId, const std::string& lidarId,
75  const std::string& zoneName,
76  const double northing, const double easting);
77 
78  virtual ~LidarZone();
79 
80  std::string fLidarIdString;
81  std::string fLidarZoneIdString;
82 
83  mutable double* fLidarMaxHeight;
84  mutable double* fCoverage;
85  mutable double* fLowestHeight;
86  mutable double* fLowestThickness;
87  mutable double* fLowestVAOD;
88 
89  // helper method to get cloud data
90  //
91  template<typename T>
92  void
93  GetCloudData(T*& requestedData,
94  const std::string& property)
95  const
96  {
97  requestedData = new T;
98 
99  det::VManager::IndexMap indexMap;
100  indexMap["lidar_zone_id"] = fLidarZoneIdString;
101 
102  const det::Detector& det = det::Detector::GetInstance();
103  const det::VManager& manager = det.GetAManagerRegister();
104 
105  try {
106  const det::VManager::Status foundFlag =
107  manager.GetData(*requestedData, "cloud", property, indexMap);
108 
109  if (foundFlag == det::VManager::eFound)
110  return;
111  } catch (...) {
112  delete requestedData;
113  requestedData = 0;
114  throw;
115  }
116 
117  throw utl::DataNotFoundInDBException("cloud", property, indexMap,
118  boost::lexical_cast<std::string>(det.GetTime()));
119  }
120 
121  friend class LidarDB;
122  };
123 
124 } // atm
125 
126 #endif //_atm_LidarZone_h_
127 
128 // Configure (x)emacs for this file ...
129 // Local Variables:
130 // mode: c++
131 // compile-command: "make -C .. -k"
132 // End:
double * fLidarMaxHeight
Definition: LidarZone.h:83
double GetLowestCloudThickness() const
Lowest cloud thickness for the zone.
Definition: LidarZone.cc:128
std::string fLidarIdString
Definition: LidarZone.h:80
Cloud data for a Lidar zone.
Definition: LidarZone.h:39
double GetLowestCloudHeight() const
Lowest cloud height for the zone.
Definition: LidarZone.cc:117
utl::TimeStamp GetTime() const
Get time pertaining to the detector description.
Definition: Detector.h:134
VAOD data in a lidar zone slice.
Definition: VAODSlice.h:29
Interface for detector managers.
Definition: VManager.h:115
VAODSliceIterator VAODSlicesEnd() const
End of the collection of VAODenuation data slices.
Definition: LidarZone.cc:84
double GetLidarMaxHeight() const
Return the lidar maximum signal range.
Definition: LidarZone.cc:95
boost::indirect_iterator< InternalVAODSliceIterator, const VAODSlice & > VAODSliceIterator
VAODSlice iterator returns a pointer to the attenuation data slice for this zone. ...
Definition: LidarZone.h:50
virtual Status GetData(double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
double GetLowestCloudVAOD() const
Lowest cloud VAOD for the zone.
Definition: LidarZone.cc:139
Exception to use in case requested data not found in the database with detailed printout.
void GetCloudData(T *&requestedData, const std::string &property) const
Definition: LidarZone.h:93
virtual ~LidarZone()
Definition: LidarZone.cc:55
InternalVAODSliceVector::const_iterator InternalVAODSliceIterator
Definition: LidarZone.h:43
double * fLowestThickness
Definition: LidarZone.h:86
ManagerRegister & GetAManagerRegister() const
Definition: Detector.h:116
Top of the hierarchy of the detector description interface.
Definition: Detector.h:81
Base class for Aerosol, Molecula, Overall Quality and Lidar atmosphere zones.
Definition: VZone.h:28
double * fCoverage
Definition: LidarZone.h:84
double GetCloudCoverage() const
Return cloud coverage for the zone (in percent)
Definition: LidarZone.cc:106
double * fLowestHeight
Definition: LidarZone.h:85
InternalVAODSliceVector * fVAODSliceVector
Definition: LidarZone.h:45
std::vector< const VAODSlice * > InternalVAODSliceVector
Definition: LidarZone.h:42
Detector description interface for LidarDB-realted data.
Definition: LidarDB.h:26
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
VAODSliceIterator VAODSlicesBegin() const
Beginning of the collection of VAODenuation data slices.
Definition: LidarZone.cc:73
std::string fLidarZoneIdString
Definition: LidarZone.h:81
LidarZone(const std::string &zoneId, const std::string &lidarId, const std::string &zoneName, const double northing, const double easting)
Definition: LidarZone.cc:25
Status
Specifies success or (eventually) various possible failure modes.
Definition: VManager.h:127
double * fLowestVAOD
Definition: LidarZone.h:87

, generated on Tue Sep 26 2023.