Rivet API documentation
![]() |
Rivet 4.1.3
|
Other utilities
Functions | |
| 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. | |
| 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.
References lexical_cast().
Referenced by Rivet::SmearedMET::SmearedMET(), Rivet::SmearedMET::SmearedMET(), Rivet::SmearedMET::SmearedMET(), and Rivet::Event::applyProjection().
Generated on for Rivet by
