Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
PhysicsAnalysis
CommonTools
ExpressionEvaluation
Root
IUnitInterpreter.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// IUnitInterpreter.cxx, (c) ATLAS Detector software
8
// Author: Thomas Gillam (thomas.gillam@cern.ch)
9
// ExpressionParsing library
11
12
#include "
ExpressionEvaluation/IUnitInterpreter.h
"
13
14
#include <stdexcept>
15
16
namespace
ExpressionParsing
{
17
bool
IUnitInterpreter::isKnownUnit
(
const
std::string &unitname)
const
18
{
19
return
(
unitMap
().
count
(unitname) > 0);
20
}
21
22
double
IUnitInterpreter::unitValue
(
const
std::string &unitname)
const
23
{
24
typedef
std::map<std::string, double>::const_iterator Iterator;
25
const
std::map<std::string, double> &theMap =
unitMap
();
26
for
(Iterator
it
= theMap.begin();
it
!= theMap.end(); ++
it
) {
27
if
(
it
->first == unitname) {
28
return
it
->second;
29
}
30
}
31
32
throw
std::runtime_error(
"Trying to access unknown unit: "
+unitname);
33
}
34
}
ExpressionParsing::IUnitInterpreter::unitMap
virtual const std::map< std::string, double > & unitMap() const =0
skel.it
it
Definition:
skel.GENtoEVGEN.py:407
XMLtoHeader.count
count
Definition:
XMLtoHeader.py:85
ExpressionParsing::IUnitInterpreter::isKnownUnit
bool isKnownUnit(const std::string &unitname) const
Definition:
IUnitInterpreter.cxx:17
ExpressionParsing
Namespace holding all the expression evaluation code.
Definition:
ExpressionParser.h:26
ExpressionParsing::IUnitInterpreter::unitValue
double unitValue(const std::string &unitname) const
Definition:
IUnitInterpreter.cxx:22
IUnitInterpreter.h
Generated on Mon Mar 31 2025 21:12:28 for ATLAS Offline Software by
1.8.18