ATLAS Offline Software
Trigger
TrigHypothesis
TrigHLTJetHypo
python
HelperConfigToolParams.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaCommon.Logging
import
logging
4
from
AthenaCommon.Constants
import
DEBUG
5
6
logger = logging.getLogger( __name__)
7
logger.setLevel(DEBUG)
8
9
class
HelperConfigToolParams
:
10
"""Class used to transport parameters required to construct
11
a HelperConfigTool object.
12
This includes the tree_vector, leaf_vector and parameters
13
for the RepeatedConditions, both for FastReduction Condition nodes,
14
and Conditions that will filter for the node.
15
"""
16
17
def
__init__
(self,
18
treevec=[],
19
repcondargs=[],
20
filterparams=[],
21
filterparam_inds=[]):
22
23
24
self.
treevec
= treevec
25
self.
repcondargs
= repcondargs
26
self.
filterparams
= filterparams
27
self.
filterparam_inds
= filterparam_inds
28
29
@property
30
def
treevec
(self):
31
return
self.
__treevec
32
33
@property
34
def
leafvec
(self):
35
return
self.
__leafvec
36
37
@treevec.setter
38
def
treevec
(self, treevec):
39
40
if
not
treevec:
41
self.
__treevec
= []
42
self.
__leafVec
= []
43
return
44
45
assert
len(treevec) > 1
# root plus at least one node
46
assert
treevec[0] == 0
47
for
i
in
range
(1, len(treevec)):
48
assert
treevec[i] >= 0,
'bad tree vec: %s'
%
str
(treevec)
49
assert
treevec[i] < i,
'bad tree vec: %s'
%
str
(treevec)
50
51
is_leaf = [
True
for
i
in
range
(len(treevec))]
52
is_leaf[0] =
False
53
for
i
in
treevec[1:]:
54
is_leaf[i] =
False
55
56
self.
__leafvec
= [i
for
i
in
range
(len(is_leaf))
if
is_leaf[i]]
57
self.
__treevec
= treevec
58
59
@property
60
def
repcondargs
(self):
61
return
self.
__repcondargs
62
63
@repcondargs.setter
64
def
repcondargs
(self, repcondargs):
65
for
ca
in
repcondargs:
66
assert
ca.tree_id <= len(self.
treevec
)
67
assert
ca.tree_pid <= len(self.
treevec
) - 1
68
self.
__repcondargs
= repcondargs
69
70
@property
71
def
filterparams
(self):
72
return
self.
__filterparams
73
74
@filterparams.setter
75
def
filterparams
(self, filterparams):
76
self.
__filterparams
= filterparams
77
78
79
@property
80
def
filterparam_inds
(self):
81
return
self.
__filterparam_inds
82
83
@filterparam_inds.setter
84
def
filterparam_inds
(self, filterparam_inds):
85
self.
__filterparam_inds
= filterparam_inds
86
87
88
def
__str__
(self):
89
90
s = [self.__class__.__name__ +
':'
]
91
to_show = [
'treevec'
,
'leafvec'
,
'repcondargs'
,
'filterparams'
,
92
'filterparam_inds'
]
93
width =
max
([len(a)
for
a
in
to_show])
94
[s.append(
'%s %s'
% (a.ljust(width), getattr(self, a)))
for
a
in
to_show]
95
return
'\n'
.
join
(s)
python.HelperConfigToolParams.HelperConfigToolParams.repcondargs
repcondargs
Definition:
HelperConfigToolParams.py:21
python.HelperConfigToolParams.HelperConfigToolParams.__filterparam_inds
__filterparam_inds
Definition:
HelperConfigToolParams.py:85
python.HelperConfigToolParams.HelperConfigToolParams
Definition:
HelperConfigToolParams.py:9
python.HelperConfigToolParams.HelperConfigToolParams.__str__
def __str__(self)
Definition:
HelperConfigToolParams.py:88
max
constexpr double max()
Definition:
ap_fixedTest.cxx:33
python.HelperConfigToolParams.HelperConfigToolParams.__leafvec
__leafvec
Definition:
HelperConfigToolParams.py:56
python.HelperConfigToolParams.HelperConfigToolParams.__leafVec
__leafVec
Definition:
HelperConfigToolParams.py:42
python.HelperConfigToolParams.HelperConfigToolParams.__treevec
__treevec
Definition:
HelperConfigToolParams.py:41
python.HelperConfigToolParams.HelperConfigToolParams.__init__
def __init__(self, treevec=[], repcondargs=[], filterparams=[], filterparam_inds=[])
Definition:
HelperConfigToolParams.py:17
python.HelperConfigToolParams.HelperConfigToolParams.__filterparams
__filterparams
Definition:
HelperConfigToolParams.py:76
python.HelperConfigToolParams.HelperConfigToolParams.filterparams
filterparams
Definition:
HelperConfigToolParams.py:22
python.HelperConfigToolParams.HelperConfigToolParams.leafvec
def leafvec(self)
Definition:
HelperConfigToolParams.py:34
plotBeamSpotVxVal.range
range
Definition:
plotBeamSpotVxVal.py:195
python.HelperConfigToolParams.HelperConfigToolParams.treevec
treevec
Definition:
HelperConfigToolParams.py:20
Constants
some useful constants -------------------------------------------------—
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.HelperConfigToolParams.HelperConfigToolParams.filterparam_inds
filterparam_inds
Definition:
HelperConfigToolParams.py:23
str
Definition:
BTagTrackIpAccessor.cxx:11
python.HelperConfigToolParams.HelperConfigToolParams.__repcondargs
__repcondargs
Definition:
HelperConfigToolParams.py:68
Generated on Wed Jan 8 2025 21:10:33 for ATLAS Offline Software by
1.8.18