Belle II Software development
ContinuousValue< T, ATag > Class Template Reference

Type to have values not based on discrete positions from an array. More...

#include <ContinuousValue.h>

Public Types

using This = ContinuousValue< T, ATag >
 Shortcut for the class itself.
 
using Array = std::array< T, 2 >
 Mock array type to be a drop in replacement for the discrete values.
 

Public Member Functions

 ContinuousValue ()=default
 Allow default construction.
 
 ContinuousValue (const T &value)
 Constructor from the underlying type.
 
 operator const T & () const
 Allow automatic casts to the underlying type.
 

Static Public Member Functions

static std::array< This, 2 > getRange (const Array &bounds)
 Extract the range from an array providing the discrete values.
 

Private Attributes

m_value
 Memory for the underlying value.
 

Detailed Description

template<class T, class ATag = T>
class Belle2::TrackFindingCDC::ContinuousValue< T, ATag >

Type to have values not based on discrete positions from an array.

Definition at line 21 of file ContinuousValue.h.

Member Typedef Documentation

◆ Array

using Array = std::array<T, 2>

Mock array type to be a drop in replacement for the discrete values.

Definition at line 36 of file ContinuousValue.h.

◆ This

using This = ContinuousValue<T, ATag>

Shortcut for the class itself.

Definition at line 24 of file ContinuousValue.h.

Constructor & Destructor Documentation

◆ ContinuousValue()

ContinuousValue ( const T &  value)
inlineexplicit

Constructor from the underlying type.

Definition at line 30 of file ContinuousValue.h.

30: m_value(value) {};
T m_value
Memory for the underlying value.

Member Function Documentation

◆ getRange()

static std::array< This, 2 > getRange ( const Array bounds)
inlinestatic

Extract the range from an array providing the discrete values.

Definition at line 40 of file ContinuousValue.h.

41 { return {{ This(bounds.front()), This(bounds.back()) }}; }
ContinuousValue< T, ATag > This
Shortcut for the class itself.

◆ operator const T &()

operator const T & ( ) const
inline

Allow automatic casts to the underlying type.

Definition at line 33 of file ContinuousValue.h.

33{return m_value; }

Member Data Documentation

◆ m_value

T m_value
private

Memory for the underlying value.

Definition at line 45 of file ContinuousValue.h.


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