group Other utilities

Other utilities

Functions

Name
template <typename T >
T
getEnvParam(const std::string name, const T & fallback)
Get a parameter from a named environment variable, with automatic type conversion.

Functions Documentation

function getEnvParam

template <typename T >
T getEnvParam(
    const std::string name,
    const T & fallback
)

Get a parameter from a named environment variable, with automatic type conversion.

Note: Return fallback if the variable is not defined, otherwise convert its string to the template type

Todo: Should the param name have to be specific to an analysis? Can specialise as an Analysis member fn.


Updated on 2022-08-07 at 20:17:17 +0100