|
def | __init__ (self, name, ctpid=-1, group='1', prescale=1, psCut=None, verbose=False) |
|
def | __str__ (self) |
|
def | prescale (self) |
|
def | prescale (self, prescale) |
|
def | addMonitor (self, flag, frequency) |
|
def | setLogic (self, logic) |
|
def | setCtpid (self, x) |
|
def | thresholdNames (self, include_bgrp=False) |
|
def | conditions (self, include_internal=False) |
|
def | setTriggerType (self, ttype) |
|
def | markLegacy (self, legacyThresholdsSet) |
|
def | binary_trigger_type (self, width=8) |
|
def | json (self) |
|
Definition at line 79 of file Items.py.
◆ __init__()
def python.L1.Base.Items.MenuItem.__init__ |
( |
|
self, |
|
|
|
name, |
|
|
|
ctpid = -1 , |
|
|
|
group = '1' , |
|
|
|
prescale = 1 , |
|
|
|
psCut = None , |
|
|
|
verbose = False |
|
) |
| |
Definition at line 92 of file Items.py.
92 def __init__(self, name, ctpid=-1, group='1', prescale=1, psCut=None, verbose=False):
95 self.ctpid =
int(ctpid)
98 self.partition = MenuItem.currentPartition
102 self.verbose = verbose
103 self.bunchGroups =
None
106 if MenuItem.l1configForRegistration:
107 MenuItem.l1configForRegistration.registerItem(self.name, self)
◆ __str__()
def python.L1.Base.Items.MenuItem.__str__ |
( |
|
self | ) |
|
Definition at line 109 of file Items.py.
110 s =
"Item %s (ctp id=%i) [%s]" % (self.name, self.ctpid, self.logic)
◆ addMonitor()
def python.L1.Base.Items.MenuItem.addMonitor |
( |
|
self, |
|
|
|
flag, |
|
|
|
frequency |
|
) |
| |
Definition at line 122 of file Items.py.
122 def addMonitor(self, flag, frequency):
123 if frequency == MonitorDef.LOW_FREQ:
124 self.monitorsLF |= flag
125 if frequency == MonitorDef.HIGH_FREQ:
126 self.monitorsHF |= flag
◆ binary_trigger_type()
def python.L1.Base.Items.MenuItem.binary_trigger_type |
( |
|
self, |
|
|
|
width = 8 |
|
) |
| |
Turns integer triggertype in a binary string of given width
Definition at line 158 of file Items.py.
158 def binary_trigger_type(self, width=8):
159 """Turns integer triggertype in a binary string of given width"""
160 return binstr(self.trigger_type, width=width)
◆ conditions()
def python.L1.Base.Items.MenuItem.conditions |
( |
|
self, |
|
|
|
include_internal = False |
|
) |
| |
Definition at line 145 of file Items.py.
145 def conditions(self, include_internal=False):
146 if self.logic
is not None:
147 return self.logic.conditions(include_internal)
◆ json()
def python.L1.Base.Items.MenuItem.json |
( |
|
self | ) |
|
Definition at line 162 of file Items.py.
164 confObj[
"name"] = self.name
166 confObj[
"legacy"] = self.legacy
167 confObj[
"ctpid"] = self.ctpid
168 confObj[
"definition"] =
str(self.logic)
170 confObj[
"bunchgroups"] = self.bunchGroups
171 confObj[
"triggerType"] = self.binary_trigger_type(8
if self.partition==1
else 4)
172 confObj[
"partition"] = self.partition
173 confObj[
"monitor"] =
'LF:{0:03b}|HF:{1:03b}'.
format(self.monitorsLF,self.monitorsHF)
◆ markLegacy()
def python.L1.Base.Items.MenuItem.markLegacy |
( |
|
self, |
|
|
|
legacyThresholdsSet |
|
) |
| |
Definition at line 155 of file Items.py.
155 def markLegacy(self,legacyThresholdsSet):
156 self.legacy = bool ( legacyThresholdsSet.intersection(self.logic.thresholdNames()) )
◆ prescale() [1/2]
def python.L1.Base.Items.MenuItem.prescale |
( |
|
self | ) |
|
◆ prescale() [2/2]
def python.L1.Base.Items.MenuItem.prescale |
( |
|
self, |
|
|
|
prescale |
|
) |
| |
Definition at line 118 of file Items.py.
118 def prescale(self, prescale):
◆ setCtpid()
def python.L1.Base.Items.MenuItem.setCtpid |
( |
|
self, |
|
|
|
x |
|
) |
| |
Definition at line 135 of file Items.py.
135 def setCtpid(self, x):
◆ setLogic()
def python.L1.Base.Items.MenuItem.setLogic |
( |
|
self, |
|
|
|
logic |
|
) |
| |
Definition at line 128 of file Items.py.
128 def setLogic(self, logic):
129 if MenuItemsCollection.splitBunchGroups:
130 (self.logic, self.bunchGroups) = logic.stripBunchGroups(logic)
◆ setMenuConfig()
def python.L1.Base.Items.MenuItem.setMenuConfig |
( |
|
mc | ) |
|
|
static |
Definition at line 85 of file Items.py.
85 def setMenuConfig(mc):
86 MenuItem.l1configForRegistration = mc
◆ setTriggerType()
def python.L1.Base.Items.MenuItem.setTriggerType |
( |
|
self, |
|
|
|
ttype |
|
) |
| |
Definition at line 151 of file Items.py.
151 def setTriggerType(self, ttype):
152 self.trigger_type =
int(ttype) & 0xff
◆ thresholdNames()
def python.L1.Base.Items.MenuItem.thresholdNames |
( |
|
self, |
|
|
|
include_bgrp = False |
|
) |
| |
Definition at line 139 of file Items.py.
139 def thresholdNames(self, include_bgrp=False):
140 if self.logic
is not None:
141 return self.logic.thresholdNames(include_bgrp)
◆ __slots__
python.L1.Base.Items.MenuItem.__slots__ |
|
staticprivate |
◆ bunchGroups
python.L1.Base.Items.MenuItem.bunchGroups |
◆ ctpid
python.L1.Base.Items.MenuItem.ctpid |
◆ currentPartition
python.L1.Base.Items.MenuItem.currentPartition |
|
static |
◆ group
python.L1.Base.Items.MenuItem.group |
◆ l1configForRegistration
python.L1.Base.Items.MenuItem.l1configForRegistration |
|
static |
◆ legacy
python.L1.Base.Items.MenuItem.legacy |
◆ logic
python.L1.Base.Items.MenuItem.logic |
◆ monitorsHF
python.L1.Base.Items.MenuItem.monitorsHF |
◆ monitorsLF
python.L1.Base.Items.MenuItem.monitorsLF |
◆ name
python.L1.Base.Items.MenuItem.name |
◆ partition
python.L1.Base.Items.MenuItem.partition |
◆ psCut
python.L1.Base.Items.MenuItem.psCut |
◆ trigger_type
python.L1.Base.Items.MenuItem.trigger_type |
◆ verbose
python.L1.Base.Items.MenuItem.verbose |
The documentation for this class was generated from the following file: