00001 #ifndef artdaq_core_Utilities_SimpleLookupPolicy_h
00002 #define artdaq_core_Utilities_SimpleLookupPolicy_h
00003
00004 #include "cetlib/filepath_maker.h"
00005 #include "cetlib/search_path.h"
00006 #include <memory>
00007
00008 namespace artdaq
00009 {
00010 class SimpleLookupPolicy;
00011 }
00012
00021 class artdaq::SimpleLookupPolicy : public cet::filepath_maker
00022 {
00023 public:
00024
00028 enum class ArgType : int
00029 {
00030 ENV_VAR = 0,
00031 PATH_STRING = 1
00032 };
00033
00041 SimpleLookupPolicy(std::string const& paths, ArgType argType = ArgType::ENV_VAR);
00042
00053 std::string operator()(std::string const& filename) override;
00054
00058 virtual ~SimpleLookupPolicy() noexcept;
00059
00060 private:
00064 std::unique_ptr<cet::search_path> cwdPath_;
00068 std::unique_ptr<cet::search_path> fallbackPaths_;
00069 };
00070
00071 #endif
00072
00073
00074
00075