Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework
v31r0 (aeb156f0)
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Units.cpp
Go to the documentation of this file.
1
// ============================================================================
2
// Include files
3
// ============================================================================
4
#include "
Units.h
"
5
// ============================================================================
6
namespace
gp
=
Gaudi::Parsers
;
7
// ============================================================================
8
bool
gp::Units::Add(
std::string
name
,
double
value ) {
return
Add(
std::move
( name ), value,
Position
() ); }
9
// ============================================================================
10
bool
gp::Units::Add(
std::string
name
,
double
value,
const
Position
& pos ) {
11
return
units_.emplace(
std::move
( name ),
ValueWithPosition
( value, pos ) ).second;
12
}
13
// ============================================================================
14
bool
gp::Units::Find(
const
std::string
&
name
,
double
& result )
const
{
15
ValueWithPosition
r;
16
if
( !Find( name, r ) )
return
false
;
17
result = r.first;
18
return
true
;
19
}
20
// ============================================================================
21
bool
gp::Units::Find(
const
std::string
&
name
,
ValueWithPosition
& result )
const
{
22
auto
it = units_.find( name );
23
if
( it == units_.end() )
return
false
;
24
result = it->second;
25
return
true
;
26
}
gaudiComponentHelp.name
name
Definition:
gaudiComponentHelp.py:41
std::string
STL class.
Gaudi::Parsers::Position
Definition:
Position.h:13
std::move
T move(T...args)
Units.h
Gaudi::Parsers
Definition:
DODBasicMapper.cpp:7
Gaudi::Parsers::Units::ValueWithPosition
Container::mapped_type ValueWithPosition
Definition:
Units.h:21
GaudiCoreSvc
src
JobOptionsSvc
Units.cpp
Generated on Mon Feb 11 2019 17:48:12 for The Gaudi Framework by
1.8.11