The Gaudi Framework
master (37c0b60a)
StdArrayAsProperty.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#ifndef GAUDIKERNEL_STDARRAYASPROPERTY_H
12
#define GAUDIKERNEL_STDARRAYASPROPERTY_H 1
13
// ============================================================================
14
// Include files
15
// ============================================================================
16
// STD & STL
17
// ============================================================================
18
#include <
GaudiKernel/ToStream.h
>
19
#include <algorithm>
20
#include <array>
21
// ============================================================================
33
// ============================================================================
34
#include <
Gaudi/Parsers/CommonParsers.h
>
35
// ============================================================================
36
namespace
Gaudi
{
37
// ==========================================================================
38
namespace
Parsers {
39
// ========================================================================
47
template
<
class
TYPE, std::
size_t
N>
48
StatusCode
parse
(
std::array<TYPE, N>
& result, std::string_view input ) {
49
std::vector<TYPE>
tmp;
50
StatusCode
sc =
parse
( tmp, input );
51
if
( sc.
isFailure
() )
return
sc;
52
if
(
N
!= tmp.
size
() )
return
StatusCode::FAILURE
;
53
std::copy
( tmp.
begin
(), tmp.
end
(), result.
begin
() );
54
return
StatusCode::SUCCESS
;
55
}
56
// ========================================================================
57
}
// namespace Parsers
58
// ==========================================================================
59
}
// end of namespace Gaudi
60
// ============================================================================
61
// The END
62
// ============================================================================
63
#endif // GAUDIKERNEL_STDARRAYASPROPERTY_H
IOTest.N
N
Definition:
IOTest.py:112
Gaudi::Parsers::parse
StatusCode parse(GaudiUtils::HashMap< K, V > &result, std::string_view input)
Basic parser for the types of HashMap used in DODBasicMapper.
Definition:
DODBasicMapper.cpp:21
std::vector
STL class.
std::vector::size
T size(T... args)
ToStream.h
StatusCode
Definition:
StatusCode.h:65
std::array
STL class.
std::copy
T copy(T... args)
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition:
__init__.py:1
StatusCode::isFailure
bool isFailure() const
Definition:
StatusCode.h:129
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition:
StatusCode.h:100
CommonParsers.h
std::vector::begin
T begin(T... args)
std::vector::end
T end(T... args)
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition:
StatusCode.h:101
GaudiKernel
include
GaudiKernel
StdArrayAsProperty.h
Generated on Thu Dec 19 2024 15:35:02 for The Gaudi Framework by
1.8.18