TTTT Analysis  0.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Attributes | List of all members
filval::GenValue Class Referenceabstract

A type-agnostic value. More...

#include <value.hpp>

Inheritance diagram for filval::GenValue:
Inheritance graph
[legend]

Public Member Functions

 GenValue (const std::string &name)
 
const std::string & get_name ()
 

Static Public Member Functions

static void reset ()
 
static GenValueget_value (const std::string &name)
 
static void summary ()
 

Protected Member Functions

virtual void _reset ()=0
 Mark the internal value as invalid. More...
 

Static Protected Attributes

static std::map< const std::string, GenValue * > values
 A static mapping containing all created Value objects. More...
 

Private Attributes

std::string name
 The name of the value. More...
 

Detailed Description

A type-agnostic value.

It is necessary to create a type-agnostic parent class to Value so that it is possible to handle collections of them. GenValue also provides the rest of the type-independent interface to Value.

Member Function Documentation

§ _reset()

virtual void filval::GenValue::_reset ( )
protectedpure virtual

Mark the internal value as invalid.

This is needed for DerivedValue to force a recalculation of the internal value when a new observation is loaded into memory. It is called automatically for all GenValue objects when reset is called.

Implemented in filval::DerivedValue< T >, filval::DerivedValue< double >, filval::DerivedValue< R >, filval::DerivedValue< std::vector< R > >, filval::DerivedValue< std::vector< T > >, filval::DerivedValue< TLorentzVector >, filval::DerivedValue< std::pair< T1, T2 > >, filval::DerivedValue< bool >, filval::DerivedValue< std::pair< T, int > >, and filval::ObservedValue< T >.

Member Data Documentation

§ name

std::string filval::GenValue::name
private

The name of the value.

This is used to allow for dynamic lookup of values based on their name via GenValue::get_value.

§ values

std::map<const std::string, GenValue*> filval::GenValue::values
inlinestaticprotected

A static mapping containing all created Value objects.

Every value object must have a unique name, and this name is used as a key in values to that object. This is used to enable more dynamic creation of objects as well as avoiding the uneccesary passing of pointers.


The documentation for this class was generated from the following file: