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 class SimpleLookupPolicy;
00010 }
00011
00012 class artdaq::SimpleLookupPolicy : public cet::filepath_maker
00013 {
00014 public:
00015
00016 enum ArgType : int { ENV_VAR = 0, PATH_STRING = 1 };
00017
00018 SimpleLookupPolicy(std::string const &paths, ArgType argType = ENV_VAR);
00019 virtual std::string operator() (std::string const &filename);
00020 virtual ~SimpleLookupPolicy() noexcept;
00021
00022 private:
00023 std::unique_ptr<cet::search_path> cwdPath_;
00024 std::unique_ptr<cet::search_path> fallbackPaths_;
00025
00026 };
00027
00028 #endif
00029
00030
00031
00032