|
artdaq_core
v3_08_01
|
This class is intended to find files using a set lookup order. More...
#include <artdaq-core/Utilities/SimpleLookupPolicy.hh>
Public Types | |
| enum | ArgType : int { ArgType::ENV_VAR = 0, ArgType::PATH_STRING = 1 } |
| Flag if the constructor argument is a list of paths or the name of an environment variable. More... | |
Public Member Functions | |
| SimpleLookupPolicy (std::string const &paths, ArgType argType=ArgType::ENV_VAR) | |
| Constructor. More... | |
| std::string | operator() (std::string const &filename) override |
| Perform the file lookup. More... | |
| virtual | ~SimpleLookupPolicy () noexcept |
| Default destructor. | |
This class is intended to find files using a set lookup order.
This class is intended to find files using the following lookup order:
Definition at line 20 of file SimpleLookupPolicy.hh.
|
strong |
Flag if the constructor argument is a list of paths or the name of an environment variable.
| Enumerator | |
|---|---|
| ENV_VAR |
Constructor argument is environment variable name. |
| PATH_STRING |
Constructor argument is a list of directories. |
Definition at line 26 of file SimpleLookupPolicy.hh.
| artdaq::SimpleLookupPolicy::SimpleLookupPolicy | ( | std::string const & | paths, |
| ArgType | argType = ArgType::ENV_VAR |
||
| ) |
Constructor.
| paths | Either the name of an environment variable or a list of directories to search |
| argType | Flag to determine if paths argument is an environment variable or a list of directories |
The SimpleLookupPolicy Constructor instantiates the cet::search_path objects used for file lookup.
Definition at line 7 of file SimpleLookupPolicy.cc.
|
override |
Perform the file lookup.
| filename | The name of the file to find |
The lookup proceeds in the following order:
Definition at line 43 of file SimpleLookupPolicy.cc.