OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
ShareTree.hpp
Go to the documentation of this file.
1 #ifndef FOCS_SHARETREE
2 #define FOCS_SHARETREE
3 
4 #include <boost/filesystem.hpp>
5 
6 #include <rapidjson/document.h>
7 
8 #include <iterator>
9 #include <string>
10 #include <map>
11 
12 namespace focs {
13  struct SensorDirectory {
17 
18  SensorDirectory(const rapidjson::GenericValue<rapidjson::UTF8<>>& in);
19  };
20  std::ostream& operator<<(std::ostream& out, const SensorDirectory& in);
21 
22  class ShareTree {
23  public:
24  ShareTree();
26 
27  inline static ShareTree& get_default(){
28  static ShareTree _instance{};
29  return _instance;
30  }
31 
32  std::map<const std::string, const SensorDirectory>::const_iterator begin() const;
33  std::map<const std::string, const SensorDirectory>::const_iterator end() const;
34 
35  const SensorDirectory& operator[] (const std::string& k) const;
36  const SensorDirectory& operator[] (std::string&& k) const;
37 
38  const SensorDirectory& at(const std::string& k) const;
39 
40  std::string get_path_to_file(const std::string& sensor_id, const boost::filesystem::path& rel_path);
42  private:
43  const boost::filesystem::path root_;
44  const std::map<const std::string, const SensorDirectory> directories_;
45  };
46 } // namespace focs
47 
48 #endif // FOCS_SHARETREE
49 
std::string get_path_to_file(const std::string &sensor_id, const boost::filesystem::path &rel_path)
boost::filesystem::path root
Definition: ShareTree.hpp:16
std::map< const std::string, const SensorDirectory >::const_iterator end() const
std::string instrument
Definition: ShareTree.hpp:14
data_t root[NROOTS]
Definition: decode_rs.h:78
const SensorDirectory & operator[](const std::string &k) const
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed as required for compatibility with version of the SDP toolkit Corrected test output file names to end in out
Definition: HISTORY.txt:422
@ string
const SensorDirectory & at(const std::string &k) const
std::map< const std::string, const SensorDirectory >::const_iterator begin() const
SensorDirectory(const rapidjson::GenericValue< rapidjson::UTF8<>> &in)
string path
Definition: color_dtdb.py:221
static ShareTree & get_default()
Definition: ShareTree.hpp:27
std::ostream & operator<<(std::ostream &out, const SensorDirectory &in)
std::string platform
Definition: ShareTree.hpp:15
int k
Definition: decode_rs.h:73