Rivet  3.1.2
Functions
Other utilities

Functions

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

Detailed Description

Function Documentation

◆ getEnvParam()

template<typename T >
T Rivet::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.

References Rivet::lexical_cast().

Referenced by Rivet::Event::applyProjection().