Definition at line 8 of file CTPCondition.py.
◆ __init__()
def python.L1.Base.CTPCondition.ThrCondition.__init__ |
( |
|
self, |
|
|
|
threshold, |
|
|
|
multiplicity = 1 |
|
) |
| |
Reimplemented from python.L1.Base.Logic.Logic.
Definition at line 9 of file CTPCondition.py.
9 def __init__(self, threshold, multiplicity=1):
10 super(ThrCondition, self).
__init__( logicType = LogicType.THRESHOLD,
11 content = {
"threshold" : threshold,
12 "multiplicity" : multiplicity } )
◆ __and__()
def python.L1.Base.Logic.Logic.__and__ |
( |
|
self, |
|
|
|
x |
|
) |
| |
|
inherited |
Definition at line 82 of file Logic.py.
83 newLogic =
Logic( logicType = LogicType.AND )
85 if self.logicType
is LogicType.AND:
86 newLogic.subConditions +=
copy(self.subConditions)
88 newLogic.subConditions += [
copy(self)]
90 if x.logicType
is LogicType.AND:
91 newLogic.subConditions +=
copy(x.subConditions)
93 newLogic.subConditions += [
copy(x)]
◆ __not__()
def python.L1.Base.Logic.Logic.__not__ |
( |
|
self, |
|
|
|
x |
|
) |
| |
|
inherited |
Definition at line 97 of file Logic.py.
98 if self.logicType
is LogicType.NONE:
99 self.logicType = LogicType.NOT
100 if self.logicType
is LogicType.NOT:
101 if len(self.subConditions) == 1:
102 log.debug(
'not is a unary operator, ignore it')
104 self.subConditions.
append(x)
◆ __or__()
def python.L1.Base.Logic.Logic.__or__ |
( |
|
self, |
|
|
|
x |
|
) |
| |
|
inherited |
Definition at line 66 of file Logic.py.
67 newLogic =
Logic( logicType = LogicType.OR )
69 if self.logicType
is LogicType.OR:
70 newLogic.subConditions +=
copy(self.subConditions)
72 newLogic.subConditions += [
copy(self)]
74 if x.logicType
is LogicType.OR:
75 newLogic.subConditions +=
copy(x.subConditions)
77 newLogic.subConditions += [
copy(x)]
◆ __str__()
def python.L1.Base.CTPCondition.ThrCondition.__str__ |
( |
|
self | ) |
|
◆ conditions()
def python.L1.Base.Logic.Logic.conditions |
( |
|
self, |
|
|
|
include_internal = False |
|
) |
| |
|
inherited |
Definition at line 151 of file Logic.py.
151 def conditions(self, include_internal=False):
153 if hasattr(self,
'condition')
and self.condition
is not None:
154 from .CTPCondition
import InternalTrigger
155 if isinstance(self.condition, InternalTrigger):
157 cond.add(self.condition)
159 cond.add( self.condition )
161 for sc
in self.subConditions:
162 cond.update( sc.conditions(include_internal) )
◆ multiplicity()
def python.L1.Base.CTPCondition.ThrCondition.multiplicity |
( |
|
self | ) |
|
Definition at line 23 of file CTPCondition.py.
23 def multiplicity(self):
24 return self.content[
"multiplicity"]
◆ name()
def python.L1.Base.CTPCondition.ThrCondition.name |
( |
|
self | ) |
|
Definition at line 26 of file CTPCondition.py.
27 return "%s_x%i" % (self.threshold().name, self.multiplicity())
◆ normalize()
def python.L1.Base.Logic.Logic.normalize |
( |
|
self | ) |
|
|
inherited |
Definition at line 166 of file Logic.py.
167 if self.logicType
in (LogicType.AND, LogicType.OR):
168 mylogic = self.logicType
170 for c
in self.subConditions:
171 if c.logicType == mylogic:
174 newconditions.extend(c.subConditions)
176 newconditions.append(c)
177 self.subConditions = newconditions
◆ Not()
def python.L1.Base.Logic.Logic.Not |
( |
|
x | ) |
|
|
staticinherited |
Definition at line 33 of file Logic.py.
35 a.logicType = LogicType.NOT
36 a.subConditions.append(x)
◆ stripBunchGroups()
def python.L1.Base.Logic.Logic.stripBunchGroups |
( |
|
theLogic | ) |
|
|
staticinherited |
Definition at line 40 of file Logic.py.
40 def stripBunchGroups(theLogic):
43 for sc
in theLogic.subConditions:
44 if sc.logicType
is LogicType.INTERNAL
and sc.name().startswith(
'BGRP'):
45 bunchGroups.append(sc.name())
50 theLogic.subConditions = subConds
51 return (theLogic, bunchGroups)
54 return (subConds[0], bunchGroups)
56 raise RuntimeError(
"Item with logic '%s' has only internal triggers defined" % theLogic)
◆ threshold()
def python.L1.Base.CTPCondition.ThrCondition.threshold |
( |
|
self | ) |
|
◆ thresholdNames()
def python.L1.Base.CTPCondition.ThrCondition.thresholdNames |
( |
|
self, |
|
|
|
include_bgrp = False |
|
) |
| |
◆ x()
def python.L1.Base.CTPCondition.ThrCondition.x |
( |
|
self, |
|
|
|
multiplicity |
|
) |
| |
Definition at line 14 of file CTPCondition.py.
14 def x(self, multiplicity):
15 return ThrCondition(self.threshold(), multiplicity)
◆ __slots__
python.L1.Base.Logic.Logic.__slots__ |
|
staticprivateinherited |
◆ content
python.L1.Base.Logic.Logic.content |
|
inherited |
◆ logicType
python.L1.Base.Logic.Logic.logicType |
|
inherited |
◆ subConditions
python.L1.Base.Logic.Logic.subConditions |
|
inherited |
The documentation for this class was generated from the following file:
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.