|
||||
File indexing completed on 2025-01-18 09:57:38
0001 /***********************************************************************************\ 0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * 0003 * * 0004 * This software is distributed under the terms of the Apache version 2 licence, * 0005 * copied verbatim in the file "LICENSE". * 0006 * * 0007 * In applying this licence, CERN does not waive the privileges and immunities * 0008 * granted to it by virtue of its status as an Intergovernmental Organization * 0009 * or submit itself to any jurisdiction. * 0010 \***********************************************************************************/ 0011 #ifndef GAUDIKERNEL_HISTOPROPERTY_H 0012 #define GAUDIKERNEL_HISTOPROPERTY_H 1 0013 // ============================================================================ 0014 // Include files 0015 // ============================================================================ 0016 // GaudiKernel 0017 // ============================================================================ 0018 #include "GaudiKernel/HistoDef.h" 0019 #include <Gaudi/Property.h> 0020 namespace Gaudi { 0021 namespace Details { 0022 namespace Property { 0023 // ============================================================================ 0024 /** Check if the value is OK 0025 * it is a nesessary template specialisation to avoid the compilation error 0026 * @author Vanya BELYAEV ibelyaev@physics.syr.edu 0027 * @date 2007-09-18 0028 */ 0029 template <> 0030 inline void BoundedVerifier<Gaudi::Histo1DDef>::operator()( const Gaudi::Histo1DDef& value ) const { 0031 if ( !value.ok() || ( m_hasLowerBound && ( value < m_lowerBound ) ) || 0032 ( m_hasUpperBound && ( m_upperBound < value ) ) ) 0033 throw std::out_of_range( "value " + Gaudi::Utils::toString( value ) + " outside range" ); 0034 } 0035 // ============================================================================ 0036 /** Check if the value is OK 0037 * @author Vanya BELYAEV ibelyaev@physics.syr.edu 0038 * @date 2007-09-18 0039 */ 0040 template <> 0041 inline void NullVerifier::operator()<Gaudi::Histo1DDef>( const Gaudi::Histo1DDef& value ) const { 0042 if ( !value.ok() ) throw std::invalid_argument( "bad value " + Gaudi::Utils::toString( value ) ); 0043 } 0044 // ============================================================================ 0045 } // namespace Property 0046 } // namespace Details 0047 } // namespace Gaudi 0048 // ============================================================================ 0049 /// the actual type of "histogram property" 0050 typedef Gaudi::Property<Gaudi::Histo1DDef> Histo1DProperty; 0051 // ============================================================================ 0052 /// the actual type of "histogram property reference" 0053 typedef Gaudi::Property<Gaudi::Histo1DDef&> Histo1DPropertyRef; 0054 // ============================================================================ 0055 0056 // ============================================================================ 0057 // The END 0058 // ============================================================================ 0059 #endif // GAUDIKERNEL_HISTOPROPERTY_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |