The Gaudi Framework  v30r5 (c7afbd0d)
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  // ==========================================================================
29  namespace Parsers
30  {
31  // ========================================================================
39  template <class TYPE, std::size_t N>
41  {
43  StatusCode sc = parse( tmp, input );
44  if ( sc.isFailure() ) return sc; // RETURN
45  if ( N != tmp.size() ) return StatusCode( StatusCode::FAILURE, true );
46  std::copy( tmp.begin(), tmp.end(), result.begin() );
47  return StatusCode::SUCCESS;
48  }
49  // ========================================================================
50  } // end of namespace Gaudi::Parsers
51  // ==========================================================================
52 } // end of namespace Gaudi
53 // ============================================================================
54 // The END
55 // ============================================================================
56 #endif // GAUDIKERNEL_STDARRAYASPROPERTY_H
57 // ============================================================================
constexpr static const auto FAILURE
Definition: StatusCode.h:88
T copy(T...args)
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:139
STL class.
int N
Definition: IOTest.py:101
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
T size(T...args)
STL class.
T begin(T...args)
STL class.
implementation of various functions for streaming.
Helper functions to set/get the application return code.
Definition: __init__.py:1