ATLAS Offline Software
MenuConfObj.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaCommon.Logging import logging
4 log = logging.getLogger(__name__)
5 
6 class TopoMenuDef:
7 
8  __slots__ = [ "algoname", "outputlines", "outputbits" ]
9  def __init__(self, algoname, outputlines = None, outputbits = None):
10 
11  if outputlines and len(outputlines) == 1 and algoname == outputlines[0]:
12  log.info("... outputlines can be ommitted for topo algo %s", algoname)
13 
14  if outputlines is None:
15  outputlines = [ algoname ]
16  # check that there is no ',' in any of the output names
17  if any([',' in x for x in outputlines]):
18  raise RuntimeError("One name in these outputlines contains a ',', which is not allowed: %r" % outputlines)
19  self.algoname = algoname
20  self.outputlines = outputlines
21  self.outputbits = outputbits
22 
23  def __str__(self):
24  return self.algoname
25 
26  def __repr__(self):
27  return f"name = {self.algoname}, outputlines = {self.outputlines}, outputbits = {self.outputbits}"
28 
30  return self.algoname.startswith("Mult")
python.L1.Base.MenuConfObj.TopoMenuDef.__str__
def __str__(self)
Definition: MenuConfObj.py:23
python.L1.Base.MenuConfObj.TopoMenuDef.algoname
algoname
Definition: MenuConfObj.py:19
python.L1.Base.MenuConfObj.TopoMenuDef.__init__
def __init__(self, algoname, outputlines=None, outputbits=None)
Definition: MenuConfObj.py:9
python.L1.Base.MenuConfObj.TopoMenuDef
Definition: MenuConfObj.py:6
python.L1.Base.MenuConfObj.TopoMenuDef.outputlines
outputlines
Definition: MenuConfObj.py:20
python.L1.Base.MenuConfObj.TopoMenuDef.outputbits
outputbits
Definition: MenuConfObj.py:21
python.L1.Base.MenuConfObj.TopoMenuDef.__repr__
def __repr__(self)
Definition: MenuConfObj.py:26
python.L1.Base.MenuConfObj.TopoMenuDef.isMultiplicityDefinition
def isMultiplicityDefinition(self)
Definition: MenuConfObj.py:29