00001 #ifndef artdaq_core_Utilities_SimpleLookupPolicy_h
00002 #define artdaq_core_Utilities_SimpleLookupPolicy_h
00003
00004 #include <memory>
00005 #include "cetlib/filepath_maker.h"
00006 #include "cetlib/search_path.h"
00007
00008 namespace artdaq {
00009 class SimpleLookupPolicy;
00010 }
00011
00020 class artdaq::SimpleLookupPolicy : public cet::filepath_maker
00021 {
00022 public:
00026 enum class ArgType : int
00027 {
00028 ENV_VAR = 0,
00029 PATH_STRING = 1
00030 };
00031
00039 SimpleLookupPolicy(std::string const& paths, ArgType argType = ArgType::ENV_VAR);
00040
00051 std::string operator()(std::string const& filename) override;
00052
00056 virtual ~SimpleLookupPolicy() noexcept;
00057
00058 private:
00062 std::unique_ptr<cet::search_path> cwdPath_;
00066 std::unique_ptr<cet::search_path> fallbackPaths_;
00067 };
00068
00069 #endif
00070
00071
00072
00073