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
InnerDetector
InDetConditions
TRT_ConditionsData
TRT_ConditionsData
LinearPacker.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRTCONDITIONSDATA_LINEARPACKER_H
6
#define TRTCONDITIONSDATA_LINEARPACKER_H
7
8
#include <limits>
9
10
namespace
TRTCond
11
{
15
template
<
class
UnpackedType,
class
PackedType>
16
class
LinearPacker
17
{
18
public
:
19
21
LinearPacker
() :
m_xmin
(1),
m_xmax
(0) {}
22
24
LinearPacker
(UnpackedType
xmin
, UnpackedType
xmax
) :
m_xmin
(
xmin
),
m_xmax
(
xmax
) {}
25
27
UnpackedType
unpack
(PackedType
val
)
const
{
return
m_xmin
+ (
val
-
valmin
()) *
dx
() ; }
28
30
PackedType
pack
(UnpackedType
x
)
const
{
31
return
x
>=
m_xmax
?
valmax
() : (
x
<=
m_xmin
?
valmin
() :
valmin
() + PackedType((
x
-
m_xmin
) /
dx
() + 0.5) ) ;
32
}
33
34
private
:
35
37
PackedType
valmax
()
const
{
return
std::numeric_limits<PackedType>::max
() ; }
38
40
PackedType
valmin
()
const
{
return
std::numeric_limits<PackedType>::min
() ; }
41
43
UnpackedType
dx
()
const
{
return
(
m_xmax
-
m_xmin
)/(UnpackedType(
valmax
()-
valmin
())+1) ; }
44
private
:
45
UnpackedType
m_xmin
;
46
UnpackedType
m_xmax
;
47
} ;
48
49
}
50
51
#endif
max
constexpr double max()
Definition:
ap_fixedTest.cxx:33
min
constexpr double min()
Definition:
ap_fixedTest.cxx:26
x
#define x
TRTCond::LinearPacker::LinearPacker
LinearPacker()
default constructor
Definition:
LinearPacker.h:21
TRTCond::LinearPacker::m_xmax
UnpackedType m_xmax
maximum data value
Definition:
LinearPacker.h:46
TRTCond::LinearPacker::m_xmin
UnpackedType m_xmin
minimum data value
Definition:
LinearPacker.h:45
TRTCond::LinearPacker::valmax
PackedType valmax() const
returns numeric upper limit of packed type
Definition:
LinearPacker.h:37
xmin
double xmin
Definition:
listroot.cxx:60
TRTCond::LinearPacker
Definition:
LinearPacker.h:17
TRTCond::LinearPacker::unpack
UnpackedType unpack(PackedType val) const
Unpack method.
Definition:
LinearPacker.h:27
TRTCond::LinearPacker::valmin
PackedType valmin() const
returns numeric lower limit of packed type
Definition:
LinearPacker.h:40
TRTCond::LinearPacker::dx
UnpackedType dx() const
returns precision of the packed data
Definition:
LinearPacker.h:43
TRTCond
Definition:
BasicRtRelation.cxx:8
Pythia8_RapidityOrderMPI.val
val
Definition:
Pythia8_RapidityOrderMPI.py:14
xmax
double xmax
Definition:
listroot.cxx:61
TRTCond::LinearPacker::pack
PackedType pack(UnpackedType x) const
Pack method.
Definition:
LinearPacker.h:30
TRTCond::LinearPacker::LinearPacker
LinearPacker(UnpackedType xmin, UnpackedType xmax)
normal constructor
Definition:
LinearPacker.h:24
Generated on Sun Apr 20 2025 21:14:21 for ATLAS Offline Software by
1.8.18