| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
BoundedVerifier< T > Class Template Reference

`#include <GaudiKernel/PropertyVerifier.h>`

Inheritance diagram for BoundedVerifier< T >:
[legend]
Collaboration diagram for BoundedVerifier< T >:
[legend]

## Public Member Functions
| BoundedVerifier ()
| Constructors. More...
| ~BoundedVerifier () override=default
| Destructor. More...
bool | isValid (const typename Gaudi::Utils::PropertyTypeTraits< T >::CVal value) const override
| Check if the value is within bounds. More...
bool | hasLower () const
| Return if it has a lower bound. More...
bool | hasUpper () const
| Return if it has a lower bound. More...
const T & | lower () const
| Return the lower bound value. More...
const T & | upper () const
| Return the upper bound value. More...
void | setLower (const T &value)
| Set lower bound value. More...
void | setUpper (const T &value)
| Set upper bound value. More...
void | clearLower ()
| Clear lower bound value. More...
void | clearUpper ()
| Clear upper bound value. More...
void | setBounds (const T &lower, const T &upper)
| Set both bounds (lower and upper) at the same time. More...
void | clearBounds ()
| Clear both bounds (lower and upper) at the same time. More...
template<>
bool | isValid (const Gaudi::Histo1DDef *value) const
Public Member Functions inherited from PropertyVerifier< T >
virtual | ~PropertyVerifier ()=default

## Private Attributes
bool | m_hasLowerBound
| Data and Function Members for This Class Implementation. More...
bool | m_hasUpperBound
T | m_lowerBound
T | m_upperBound

## Detailed Description

### template<class T>
class BoundedVerifier< T >

Author
  CTDay

Definition at line 11 of file HistoProperty.h.

## Constructor & Destructor Documentation

template<class T>

BoundedVerifier< T >::BoundedVerifier | ( |  | ) |
| inline

Constructors.

Definition at line 71 of file PropertyVerifier.h.

72 : m_hasLowerBound( false ),
73 m_hasUpperBound( false ),
74 m_lowerBound( T() ),
75 m_upperBound( T() ) { }
BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
Definition: PropertyVerifier.h:123
BoundedVerifier::m_lowerBound
T m_lowerBound
Definition: PropertyVerifier.h:125
BoundedVerifier::m_upperBound
T m_upperBound
Definition: PropertyVerifier.h:126
BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: PropertyVerifier.h:124
template<class T>

BoundedVerifier< T >::~BoundedVerifier | ( |  | ) |
| override default

Destructor.

## Member Function Documentation

template<class T>

void BoundedVerifier< T >::clearBounds | ( |  | ) |
| inline

Clear both bounds (lower and upper) at the same time.

Definition at line 114 of file PropertyVerifier.h.

115 {
116 clearLower();
117 clearUpper();
118 }
BoundedVerifier::clearLower
void clearLower()
Clear lower bound value.
Definition: PropertyVerifier.h:102
BoundedVerifier::clearUpper
void clearUpper()
Clear upper bound value.
Definition: PropertyVerifier.h:104
template<class T>

void BoundedVerifier< T >::clearLower | ( |  | ) |
| inline

Clear lower bound value.

Definition at line 102 of file PropertyVerifier.h.

102 { m_hasLowerBound = false; m_lowerBound = T(); }
BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
Definition: PropertyVerifier.h:123
BoundedVerifier::m_lowerBound
T m_lowerBound
Definition: PropertyVerifier.h:125
template<class T>

void BoundedVerifier< T >::clearUpper | ( |  | ) |
| inline

Clear upper bound value.

Definition at line 104 of file PropertyVerifier.h.

104 { m_hasUpperBound = false; m_upperBound = T(); }
BoundedVerifier::m_upperBound
T m_upperBound
Definition: PropertyVerifier.h:126
BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: PropertyVerifier.h:124
template<class T>

bool BoundedVerifier< T >::hasLower | ( |  | ) | const
| inline

Return if it has a lower bound.

Definition at line 89 of file PropertyVerifier.h.

89 { return m_hasLowerBound; }
BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
Definition: PropertyVerifier.h:123
template<class T>

bool BoundedVerifier< T >::hasUpper | ( |  | ) | const
| inline

Return if it has a lower bound.

Definition at line 91 of file PropertyVerifier.h.

91 { return m_hasUpperBound; }
BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: PropertyVerifier.h:124
template<>

bool BoundedVerifier< Gaudi::Histo1DDef >::isValid | ( | const Gaudi::Histo1DDef * | value | ) | const
| inline

Author
  Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u

Date
  2007-09-18

Definition at line 24 of file HistoProperty.h.

25 {
26 return value && value->ok()
27 && ( ( m_hasLowerBound && ( *value < m_lowerBound ) ) ? false : true )
28 && ( ( m_hasUpperBound && ( m_upperBound < *value ) ) ? false : true ) ;
29 }
BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
Definition: PropertyVerifier.h:123
Gaudi::Histo1DDef::ok
bool ok() const
check if all fields are "reasonable"
Definition: HistoDef.h:100
BoundedVerifier::m_lowerBound
T m_lowerBound
Definition: PropertyVerifier.h:125
BoundedVerifier::m_upperBound
T m_upperBound
Definition: PropertyVerifier.h:126
BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: PropertyVerifier.h:124
template<class T>

bool BoundedVerifier< T >::isValid | ( | const typename Gaudi::Utils::PropertyTypeTraits< T >::CVal | value | ) | const
| inline override virtual

Check if the value is within bounds.

Implements PropertyVerifier< T >.

Definition at line 81 of file PropertyVerifier.h.

82 {
83 return
84 (( m_hasLowerBound && ( *value < m_lowerBound ) ) ? false : true ) &&
85 (( m_hasUpperBound && ( *value > m_upperBound ) ) ? false : true ) ;
86 }
BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
Definition: PropertyVerifier.h:123
dump_component_properties.value
list value
Definition: dump_component_properties.py:12
BoundedVerifier::m_lowerBound
T m_lowerBound
Definition: PropertyVerifier.h:125
BoundedVerifier::m_upperBound
T m_upperBound
Definition: PropertyVerifier.h:126
BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: PropertyVerifier.h:124
template<class T>

const T& BoundedVerifier< T >::lower | ( |  | ) | const
| inline

Return the lower bound value.

Definition at line 93 of file PropertyVerifier.h.

93 { return m_lowerBound; }
BoundedVerifier::m_lowerBound
T m_lowerBound
Definition: PropertyVerifier.h:125
template<class T>

void BoundedVerifier< T >::setBounds | ( | const T & | lower,
|  | const T & | upper
| ) |  |
| inline

Set both bounds (lower and upper) at the same time.

Definition at line 107 of file PropertyVerifier.h.

108 {
109 setLower( lower );
110 setUpper( upper );
111 }
BoundedVerifier::setLower
void setLower(const T &value)
Set lower bound value.
Definition: PropertyVerifier.h:98
BoundedVerifier::lower
const T & lower() const
Return the lower bound value.
Definition: PropertyVerifier.h:93
BoundedVerifier::upper
const T & upper() const
Return the upper bound value.
Definition: PropertyVerifier.h:95
BoundedVerifier::setUpper
void setUpper(const T &value)
Set upper bound value.
Definition: PropertyVerifier.h:100
template<class T>

void BoundedVerifier< T >::setLower | ( | const T & | value | ) |
| inline

Set lower bound value.

Definition at line 98 of file PropertyVerifier.h.

98 { m_hasLowerBound = true; m_lowerBound = value; }
BoundedVerifier::m_hasLowerBound
bool m_hasLowerBound
Data and Function Members for This Class Implementation.
Definition: PropertyVerifier.h:123
dump_component_properties.value
list value
Definition: dump_component_properties.py:12
BoundedVerifier::m_lowerBound
T m_lowerBound
Definition: PropertyVerifier.h:125
template<class T>

void BoundedVerifier< T >::setUpper | ( | const T & | value | ) |
| inline

Set upper bound value.

Definition at line 100 of file PropertyVerifier.h.

100 { m_hasUpperBound = true; m_upperBound = value; }
dump_component_properties.value
list value
Definition: dump_component_properties.py:12
BoundedVerifier::m_upperBound
T m_upperBound
Definition: PropertyVerifier.h:126
BoundedVerifier::m_hasUpperBound
bool m_hasUpperBound
Definition: PropertyVerifier.h:124
template<class T>

const T& BoundedVerifier< T >::upper | ( |  | ) | const
| inline

Return the upper bound value.

Definition at line 95 of file PropertyVerifier.h.

95 { return m_upperBound; }
BoundedVerifier::m_upperBound
T m_upperBound
Definition: PropertyVerifier.h:126

## Member Data Documentation

template<class T>

bool BoundedVerifier< T >::m_hasLowerBound
| private

Data and Function Members for This Class Implementation.

Data members

Definition at line 123 of file PropertyVerifier.h.

template<class T>

bool BoundedVerifier< T >::m_hasUpperBound
| private

Definition at line 124 of file PropertyVerifier.h.

template<class T>

T BoundedVerifier< T >::m_lowerBound
| private

Definition at line 125 of file PropertyVerifier.h.

template<class T>

T BoundedVerifier< T >::m_upperBound
| private

Definition at line 126 of file PropertyVerifier.h.

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

- GaudiKernel/GaudiKernel/HistoProperty.h
- GaudiKernel/GaudiKernel/PropertyVerifier.h