| The Gaudi Framework v29r1 (5cd95fa2)

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

- File List
- File Members

HistoProperty.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_HISTOPROPERTY_H
2 #define GAUDIKERNEL_HISTOPROPERTY_H 1
3 // ============================================================================
4 // Include files
5 // ============================================================================
6 // GaudiKernel
7 // ============================================================================
8 #include "GaudiKernel/HistoDef.h"
9 #include "GaudiKernel/Property.h"
10 namespace Gaudi
11 {
12 namespace Details
13 {
14 namespace Property
15 {
16 // ============================================================================
22 template <>
23 inline void BoundedVerifier<Gaudi::Histo1DDef>::operator()( const Gaudi::Histo1DDef& value ) const
24 {
25 if ( !value.ok() || ( m_hasLowerBound && ( value < m_lowerBound ) ) ||
26 ( m_hasUpperBound && ( m_upperBound < value ) ) )
27 throw std::out_of_range( "value " + Gaudi::Utils::toString( value ) + " outside range" );
28 }
29 // ============================================================================
34 template <>
35 inline void NullVerifier::operator()<Gaudi::Histo1DDef>( const Gaudi::Histo1DDef& value ) const
36 {
37 if ( !value.ok() ) throw std::invalid_argument( "bad value " + Gaudi::Utils::toString( value ) );
38 }
39 // ============================================================================
40 }
41 }
42 } // end of namespace Gaudi::Details::Property
43 // ============================================================================
45 typedef Gaudi::Property<Gaudi::Histo1DDef> Histo1DProperty;
46 // ============================================================================
48 typedef Gaudi::Property<Gaudi::Histo1DDef&> Histo1DPropertyRef;
49 // ============================================================================
50
51 // ============================================================================
52 // The END
53 // ============================================================================
54 #endif // GAUDIKERNEL_HISTOPROPERTY_H
55 // ============================================================================
std::out_of_range
STL class.
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:319
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:346
Histo1DPropertyRef
Gaudi::Property< Gaudi::Histo1DDef & > Histo1DPropertyRef
the actual type of "histogram property reference"
Definition: HistoProperty.h:48
Gaudi::Details::Property::BoundedVerifier::operator()
void operator()(const TYPE &value) const
Definition: Property.h:183
Histo1DProperty
Gaudi::Property< Gaudi::Histo1DDef > Histo1DProperty
the actual type of "histogram property"
Definition: HistoProperty.h:45
Gaudi::Histo1DDef
Simple helper class for description of 1D-histogram The class is targeted to act as the primary "hist...
Definition: HistoDef.h:33
Gaudi::Histo1DDef::ok
bool ok() const
check if all fields are "reasonable"
Definition: HistoDef.h:95
Property.h
Gaudi
Helper functions to set/get the application return code.
Definition: __init__.py:1
std::invalid_argument
STL class.
HistoDef.h