ATLAS Offline Software
CTPCondition.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 from .Logic import Logic, LogicType
7 
9  def __init__(self, threshold, multiplicity=1):
10  super(ThrCondition, self).__init__( logicType = LogicType.THRESHOLD,
11  content = { "threshold" : threshold,
12  "multiplicity" : multiplicity } )
13 
14  def x(self, multiplicity):
15  return ThrCondition(self.threshold(), multiplicity) # provide a copy
16 
17  def __str__(self):
18  return str(self.threshold()) + '[x' + str(self.multiplicity())+']'
19 
20  def threshold(self):
21  return self.content["threshold"]
22 
23  def multiplicity(self):
24  return self.content["multiplicity"]
25 
26  def name(self):
27  return "%s_x%i" % (self.threshold().name, self.multiplicity())
28 
29  def thresholdNames(self, include_bgrp=False):
30  return [ self.threshold().name ]
31 
32 
34  def __init__(self, name):
35  super(InternalTrigger, self).__init__( logicType = LogicType.INTERNAL, content = name )
36 
37  def __str__(self):
38  return self.name()
39 
40  def name(self):
41  return str(self.content)
42 
43  def thresholdNames(self, include_bgrp=False):
44  if include_bgrp:
45  return [ self.name() ]
46  else:
47  return []
48 
python.L1.Base.CTPCondition.InternalTrigger.name
def name(self)
Definition: CTPCondition.py:40
python.L1.Base.CTPCondition.InternalTrigger.__init__
def __init__(self, name)
Definition: CTPCondition.py:34
python.L1.Base.CTPCondition.ThrCondition.__str__
def __str__(self)
Definition: CTPCondition.py:17
python.L1.Base.CTPCondition.ThrCondition.multiplicity
def multiplicity(self)
Definition: CTPCondition.py:23
python.L1.Base.Logic.Logic.content
content
Definition: Logic.py:61
python.L1.Base.CTPCondition.InternalTrigger.__str__
def __str__(self)
Definition: CTPCondition.py:37
python.L1.Base.CTPCondition.ThrCondition.threshold
def threshold(self)
Definition: CTPCondition.py:20
python.L1.Base.CTPCondition.ThrCondition.thresholdNames
def thresholdNames(self, include_bgrp=False)
Definition: CTPCondition.py:29
python.L1.Base.CTPCondition.ThrCondition.x
def x(self, multiplicity)
Definition: CTPCondition.py:14
python.L1.Base.CTPCondition.ThrCondition.name
def name(self)
Definition: CTPCondition.py:26
python.L1.Base.CTPCondition.InternalTrigger.thresholdNames
def thresholdNames(self, include_bgrp=False)
Definition: CTPCondition.py:43
python.L1.Base.CTPCondition.ThrCondition.__init__
def __init__(self, threshold, multiplicity=1)
Definition: CTPCondition.py:9
python.L1.Base.CTPCondition.InternalTrigger
Definition: CTPCondition.py:33
str
Definition: BTagTrackIpAccessor.cxx:11
python.L1.Base.Logic.Logic
Definition: Logic.py:28
python.L1.Base.CTPCondition.ThrCondition
Definition: CTPCondition.py:8