ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TriggerCommon
TriggerMenuMT
python
L1
Base
GlobalAlgorithmsCollection.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaCommon.Logging
import
logging
4
log = logging.getLogger(__name__)
5
6
from
.GlobalAlgorithm
import
GlobalAlgorithm
7
8
class
GlobalAlgorithmsCollection
:
9
"""Wrapper class for encapsulating the list of all global algorithms."""
10
def
__init__
(self):
11
# all algos that are in menu (new and legacy)
12
self.
globalAlgos
: dict[str, GlobalAlgorithm] = {}
13
14
def
addAlgo
(self, algo: GlobalAlgorithm):
15
if
algo.name
in
self.
globalAlgos
:
16
raise
RuntimeError(
"Trying to add topo algorithm %s a second time"
% algo.name)
17
self.
globalAlgos
[algo.name] = algo
18
19
def
json
(self):
20
confObj = {}
21
for
alg
in
self.
globalAlgos
.values():
22
algType = alg.alg_type
23
if
algType.key
not
in
confObj:
24
confObj[algType.key] = {}
25
confObj[algType.key][alg.name] = alg.json()
26
return
confObj
json
nlohmann::json json
Definition
HistogramDef.cxx:9
python.L1.Base.GlobalAlgorithmsCollection.GlobalAlgorithmsCollection
Definition
GlobalAlgorithmsCollection.py:8
python.L1.Base.GlobalAlgorithmsCollection.GlobalAlgorithmsCollection.addAlgo
addAlgo(self, GlobalAlgorithm algo)
Definition
GlobalAlgorithmsCollection.py:14
python.L1.Base.GlobalAlgorithmsCollection.GlobalAlgorithmsCollection.__init__
__init__(self)
Definition
GlobalAlgorithmsCollection.py:10
python.L1.Base.GlobalAlgorithmsCollection.GlobalAlgorithmsCollection.globalAlgos
dict globalAlgos
Definition
GlobalAlgorithmsCollection.py:12
Generated on
for ATLAS Offline Software by
1.17.0