ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes | List of all members
python.L1.Base.Items.MenuItem Class Reference
Inheritance diagram for python.L1.Base.Items.MenuItem:
Collaboration diagram for python.L1.Base.Items.MenuItem:

Public Member Functions

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)
 

Static Public Member Functions

def setMenuConfig (mc)
 

Public Attributes

 name
 
 group
 
 ctpid
 
 psCut
 
 trigger_type
 
 partition
 
 logic
 
 monitorsLF
 
 monitorsHF
 
 verbose
 
 bunchGroups
 
 legacy
 

Static Public Attributes

 l1configForRegistration
 
 currentPartition
 

Static Private Attributes

 __slots__
 

Detailed Description

Definition at line 79 of file Items.py.

Constructor & Destructor Documentation

◆ __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):
93  self.name = name
94  self.group = group
95  self.ctpid = int(ctpid)
96  self.psCut = psCut if psCut is not None else getCutFromPrescale(prescale)
97  self.trigger_type = 0
98  self.partition = MenuItem.currentPartition
99  self.logic = None
100  self.monitorsLF = 0
101  self.monitorsHF = 0
102  self.verbose = verbose
103  self.bunchGroups = None
104  self.legacy = False
105 
106  if MenuItem.l1configForRegistration:
107  MenuItem.l1configForRegistration.registerItem(self.name, self)
108 

Member Function Documentation

◆ __str__()

def python.L1.Base.Items.MenuItem.__str__ (   self)

Definition at line 109 of file Items.py.

109  def __str__(self):
110  s = "Item %s (ctp id=%i) [%s]" % (self.name, self.ctpid, self.logic)
111  return s
112 

◆ 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
127 

◆ 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)
161 

◆ 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)
148  else:
149  return []
150 

◆ json()

def python.L1.Base.Items.MenuItem.json (   self)

Definition at line 162 of file Items.py.

162  def json(self):
163  confObj = odict()
164  confObj["name"] = self.name
165  if self.legacy:
166  confObj["legacy"] = self.legacy
167  confObj["ctpid"] = self.ctpid
168  confObj["definition"] = str(self.logic)
169  if self.bunchGroups:
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)
174  return confObj
175 
176 
177 
178 

◆ 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()) )
157 

◆ prescale() [1/2]

def python.L1.Base.Items.MenuItem.prescale (   self)

Definition at line 114 of file Items.py.

114  def prescale(self):
115  return getPrescaleFromCut(self.psCut)
116 

◆ 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):
119  self.psCut = getCutFromPrescale(prescale)
120  return self
121 

◆ setCtpid()

def python.L1.Base.Items.MenuItem.setCtpid (   self,
  x 
)

Definition at line 135 of file Items.py.

135  def setCtpid(self, x):
136  self.ctpid = int(x)
137  return self
138 

◆ 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)
131  else:
132  self.logic = logic
133  return self
134 

◆ 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
87 

◆ 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
153  return self
154 

◆ 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)
142  else:
143  return []
144 

Member Data Documentation

◆ __slots__

python.L1.Base.Items.MenuItem.__slots__
staticprivate

Definition at line 91 of file Items.py.

◆ bunchGroups

python.L1.Base.Items.MenuItem.bunchGroups

Definition at line 103 of file Items.py.

◆ ctpid

python.L1.Base.Items.MenuItem.ctpid

Definition at line 95 of file Items.py.

◆ currentPartition

python.L1.Base.Items.MenuItem.currentPartition
static

Definition at line 89 of file Items.py.

◆ group

python.L1.Base.Items.MenuItem.group

Definition at line 94 of file Items.py.

◆ l1configForRegistration

python.L1.Base.Items.MenuItem.l1configForRegistration
static

Definition at line 82 of file Items.py.

◆ legacy

python.L1.Base.Items.MenuItem.legacy

Definition at line 104 of file Items.py.

◆ logic

python.L1.Base.Items.MenuItem.logic

Definition at line 99 of file Items.py.

◆ monitorsHF

python.L1.Base.Items.MenuItem.monitorsHF

Definition at line 101 of file Items.py.

◆ monitorsLF

python.L1.Base.Items.MenuItem.monitorsLF

Definition at line 100 of file Items.py.

◆ name

python.L1.Base.Items.MenuItem.name

Definition at line 93 of file Items.py.

◆ partition

python.L1.Base.Items.MenuItem.partition

Definition at line 98 of file Items.py.

◆ psCut

python.L1.Base.Items.MenuItem.psCut

Definition at line 96 of file Items.py.

◆ trigger_type

python.L1.Base.Items.MenuItem.trigger_type

Definition at line 97 of file Items.py.

◆ verbose

python.L1.Base.Items.MenuItem.verbose

Definition at line 102 of file Items.py.


The documentation for this class was generated from the following file:
vtune_athena.format
format
Definition: vtune_athena.py:14
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
json
nlohmann::json json
Definition: HistogramDef.cxx:9
python.TrigConfigSvcUtils.getPrescaleFromCut
def getPrescaleFromCut(cut)
Definition: TrigConfigSvcUtils.py:761
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.L1.Base.MenuUtils.binstr
def binstr(value, width)
Definition: MenuUtils.py:27
python.L1.Base.PrescaleHelper.getCutFromPrescale
def getCutFromPrescale(prescale)
Definition: PrescaleHelper.py:24
str
Definition: BTagTrackIpAccessor.cxx:11