OverallQualityDB.h
Go to the documentation of this file.
1 
9 #ifndef _atm_OverallQualityDB_h_
10 #define _atm_OverallQualityDB_h_
11 
12 
13 #include <string>
14 #include <map>
15 #include <boost/lexical_cast.hpp>
16 
17 #include <det/VManager.h>
18 #include <det/Detector.h>
19 #include <utl/AugerException.h>
20 
21 // temp tp
22 #include <iostream>
23 
24 namespace atm {
25 
26  class OverallQualityZone;
27 
28 
41 
42  public:
43  // Horizontal uniformity across the array
44  //
45  double GetHorizontalUniformity() const;
46 
47  // Fractional cloud coverage
48  //
49  double GetCloudCoverage() const;
50 
51  // height of cloud base
52  //
53  double GetMinCloudBase() const;
54 
55  private:
58 
59  std::string fQualityIdString; // specifies overall_quality_id for given time and software version
60 
61  mutable double* fHorizontalUniformity;
62  mutable double* fCloudCoverage;
63  mutable double* fMinCloudBase;
64 
65  template<class T>
66  void
67  GetQualData(T*& requested, const std::string& property)
68  const
69  {
70  requested = new T;
71 
73 
74  try {
75  const det::VManager& manager =
76  det::Detector::GetInstance().GetAManagerRegister().GetManager("AOverallQualitySQLManager");
77 
79  manager.GetData(*requested, "overall_quality", property, emptyMap);
80 
81  if (foundFlag == det::VManager::eFound)
82  return;
83  } catch (...) {
84  delete requested;
85  requested = 0;
86  throw;
87  }
88 
89  throw utl::DataNotFoundInDBException("overall_quality", "property", emptyMap,
90  boost::lexical_cast<std::string>(det::Detector::GetInstance().GetTime()));
91  }
92 
93  friend class Atmosphere;
94 
95  };
96 
97 }
98 
99 
100 #endif // _atm_OverallQualityDB_h_
101 
102 // Configure (x)emacs for this file ...
103 // Local Variables:
104 // mode: c++
105 // compile-command: "make -C .. -k"
106 // End:
det::VManager::IndexMap emptyMap
Top of the interface to Atmosphere information.
Interface for detector managers.
Definition: VManager.h:115
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.
double GetMinCloudBase() const
std::string fQualityIdString
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
double GetCloudCoverage() const
Access to database describing overall atmospheric quality.
Status
Specifies success or (eventually) various possible failure modes.
Definition: VManager.h:127
const det::VManager::Status foundFlag
double GetHorizontalUniformity() const

, generated on Tue Sep 26 2023.