33 namespace fs = boost::filesystem;
34 namespace pexExcept = lsst::pex::exceptions;
41 const std::string& filepath,
42 const std::string& repos,
47 if (repos.length() > 0)
_repos /= repos;
65 std::string productName_DIR(productName);
68 std::transform(productName_DIR.begin(), productName_DIR.end(),
69 productName_DIR.begin(),
70 std::ptr_fun<int, int>( std::toupper ));
73 productName_DIR +=
"_DIR";
76 const char *ipath = getenv(productName_DIR.c_str());
79 productName_DIR +
": environment variable not set");
81 return fs::path(ipath);
the definition of the DefaultPolicyFile class
a container for holding hierarchical configuration data in memory.
virtual void load(Policy &policy) const
virtual void load(Policy &policy) const
DefaultPolicyFile(const char *const productName, const std::string &filepath, const std::string &repos="", bool strict=true)
boost::filesystem::path _repos
static boost::filesystem::path installPathFor(const char *const productName)
virtual boost::filesystem::path getInstallPath(const char *const productName)
#define LSST_EXCEPT(type,...)
boost::filesystem::path _file
int loadPolicyFiles(bool strict=true)
a representation of a file containing Policy parameter data.
Include files required for standard LSST Exception handling.