Class to wrap together RResultPtrs for different systematic variations.
More...
#include <SysResultPtr.h>
|
| SysResultPtr (const std::string &nominalName) |
| Create the result. More...
|
|
template<typename U , typename = std::enable_if_t<std::is_base_of<T, U>{} || std::is_same<T, U>{}, void>> |
| SysResultPtr (const std::string &nominalName, const std::map< std::string, ROOT::RDF::RResultPtr< U >> &resultMap) |
| Create the result from an existing map. More...
|
|
auto | begin () |
| Iterator to the start of the underlying map. More...
|
|
auto | begin () const |
| Const iterator to the start of the underlying map. More...
|
|
auto | end () |
| Iterator to the end of the underlying map. More...
|
|
auto | end () const |
| Const iterator to the end of the underlying map. More...
|
|
std::size_t | size () const |
| Size of the map (i.e. the number of systematics affecting this result) More...
|
|
void | setMap (const std::map< std::string, ResultWrapper< T >> &newMap) |
| Set from a map. More...
|
|
void | reset () |
| Reset all results. More...
|
|
T * | get (const std::string &syst) |
| Get the result pointed to. More...
|
|
bool | addResult (const std::string &systematic, const ResultWrapper< T > &result) |
| Add the result wrapper for a given systematic. More...
|
|
template<typename U , typename = std::enable_if_t<std::is_base_of<T, U>{}, void>> |
| SysResultPtr (const SysResultPtr< U > &other) |
| Allow type conversions in copy construction. More...
|
|
| operator bool () const |
| Allow conversion to bool - returns true if anything is filled. More...
|
|
template<typename T>
class RDFAnalysis::SysResultPtr< T >
Class to wrap together RResultPtrs for different systematic variations.
- Template Parameters
-
T | The type held by the RResultPtrs |
This class acts as a specialised map class holding result pointers corresponding to systematic variations of the same quantity. If a systematic variation is requested that does not affect this variable the nominal is returned.
Create the result.
- Parameters
-
nominalName | The name of the nominal variation |
SysResultPtr |
( |
const std::string & |
nominalName, |
|
|
const std::map< std::string, ROOT::RDF::RResultPtr< U >> & |
resultMap |
|
) |
| |
|
inline |
Create the result from an existing map.
- Template Parameters
-
The | type of the result ptr |
- Parameters
-
nominalName | The name of the nominal variation |
resultMap | Map of systematics to RResultPtrs |
Allow type conversions in copy construction.
- Template Parameters
-
U | The held type of the other object |
- Parameters
-
bool addResult |
( |
const std::string & |
systematic, |
|
|
const ResultWrapper< T > & |
result |
|
) |
| |
|
inline |
Add the result wrapper for a given systematic.
- Parameters
-
systematic | The variation to add |
result | The result to add. |
- Returns
- if a new result was provided
Iterator to the start of the underlying map.
Const iterator to the start of the underlying map.
Iterator to the end of the underlying map.
Const iterator to the end of the underlying map.
T* get |
( |
const std::string & |
syst | ) |
|
|
inline |
Get the result pointed to.
- Parameters
-
syst | The variation to retrieve If the variation doesn't exist then return the nominal. |
Allow conversion to bool - returns true if anything is filled.
void setMap |
( |
const std::map< std::string, ResultWrapper< T >> & |
newMap | ) |
|
|
inline |
std::size_t size |
( |
| ) |
const |
|
inline |
Size of the map (i.e. the number of systematics affecting this result)
The documentation for this class was generated from the following file: