Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
StdArrayAsProperty.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_STDARRAYASPROPERTY_H
2 #define GAUDIKERNEL_STDARRAYASPROPERTY_H 1
3 // ============================================================================
4 // Include files
5 // ============================================================================
6 // STD & STL
7 // ============================================================================
8 #include "GaudiKernel/ToStream.h"
9 #include <algorithm>
10 #include <array>
11 // ============================================================================
23 // ============================================================================
25 // ============================================================================
26 namespace Gaudi {
27  // ==========================================================================
28  namespace Parsers {
29  // ========================================================================
37  template <class TYPE, std::size_t N>
38  StatusCode parse( std::array<TYPE, N>& result, const std::string& input ) {
40  StatusCode sc = parse( tmp, input );
41  if ( sc.isFailure() ) return sc; // RETURN
42  if ( N != tmp.size() ) return StatusCode( StatusCode::FAILURE, true );
43  std::copy( tmp.begin(), tmp.end(), result.begin() );
44  return StatusCode::SUCCESS;
45  }
46  // ========================================================================
47  } // namespace Parsers
48  // ==========================================================================
49 } // end of namespace Gaudi
50 // ============================================================================
51 // The END
52 // ============================================================================
53 #endif // GAUDIKERNEL_STDARRAYASPROPERTY_H
T copy(T...args)
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
T end(T...args)
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
bool isFailure() const
Definition: StatusCode.h:130
STL class.
int N
Definition: IOTest.py:99
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
T size(T...args)
STL class.
T begin(T...args)
STL class.
constexpr static const auto FAILURE
Definition: StatusCode.h:86
implementation of various functions for streaming.
Helper functions to set/get the application return code.
Definition: __init__.py:1