The Gaudi Framework  v30r3 (a5ef0a68)
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 <>
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 // ============================================================================
46 // ============================================================================
49 // ============================================================================
50 
51 // ============================================================================
52 // The END
53 // ============================================================================
54 #endif // GAUDIKERNEL_HISTOPROPERTY_H
55 // ============================================================================
Implementation of property with value of concrete type.
Definition: Property.h:381
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:356
Gaudi::Property< Gaudi::Histo1DDef & > Histo1DPropertyRef
the actual type of "histogram property reference"
Definition: HistoProperty.h:48
Gaudi::Details::PropertyBase Property
backward compatibility hack for old Property base class
Definition: PropertyFwd.h:28
void operator()(const TYPE &value) const
Definition: Property.h:245
Gaudi::Property< Gaudi::Histo1DDef > Histo1DProperty
the actual type of "histogram property"
Definition: HistoProperty.h:45
Simple helper class for description of 1D-histogram The class is targeted to act as the primary "hist...
Definition: HistoDef.h:33
bool ok() const
check if all fields are "reasonable"
Definition: HistoDef.h:95
Helper functions to set/get the application return code.
Definition: __init__.py:1