rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
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.
 
template<class T >
vector< T > Rivet::slice (const vector< T > &v, int startidx, int endidx)
 Get the contents of a vector between two indices.
 

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.

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