The Gaudi Framework
v28r2
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) {
9
return
Add(
std::move
(name), value,
Position
());
10
}
11
// ============================================================================
12
bool
gp::Units::Add(
std::string
name
,
double
value,
const
Position
& pos) {
13
return
units_.emplace(
std::move
(name),
ValueWithPosition
(value, pos) ).second;
14
}
15
// ============================================================================
16
bool
gp::Units::Find(
const
std::string
&
name
,
double
& result)
const
{
17
ValueWithPosition
r;
18
if
( !Find(name,r) )
return
false
;
19
result = r.first;
20
return
true
;
21
}
22
// ============================================================================
23
bool
gp::Units::Find(
const
std::string
&
name
,
24
ValueWithPosition
& result)
const
{
25
auto
it = units_.find(name);
26
if
(it == units_.end())
return
false
;
27
result = it->second;
28
return
true
;
29
}
gaudiComponentHelp.name
name
Definition:
gaudiComponentHelp.py:28
std::string
STL class.
Gaudi::Parsers::Position
Definition:
Position.h:12
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:20
GaudiCoreSvc
src
JobOptionsSvc
Units.cpp
Generated on Thu Mar 30 2017 15:42:46 for The Gaudi Framework by
1.8.11