24 The function returns those items where the items triggertype, after applying the mask, matches the pattern.
25 With this one can also select items where a certain bit is disabled
26 """
27if triggertype_pattern<0 or triggertype_pattern>0xFF:
28raise RuntimeError('TriggerPythonConfig.Lvl1ItemByTriggerType(triggertype_pattern,triggertype_bitmask) needs to be called with 0<=triggertype_pattern<=0xFF, ' + \
29 + 'but is called with triggertype_pattern=%i' % triggertype_pattern)
30if triggertype_bitmask<0 or triggertype_bitmask>0xFF:
31raise RuntimeError('TriggerPythonConfig.Lvl1ItemByTriggerType(triggertype_pattern,triggertype_bitmask) needs to be called with 0<=triggertype_bitmask<=0xFF, ' + \
32 + 'but is called with triggertype_bitmask=%i' % triggertype_bitmask)
33 itemsForMenu = [item for item in l1object if l1object[item]['ctpid'] != -1]
34ifnot itemsForMenu:
35 log.error('No item defined for the L1 Menu, the TriggerConfL1 object does not contain items')
36 res = [item for item in itemsForMenu if ( (triggertype_bitmask & int(l1object[item]['triggerType'],2)) == triggertype_pattern)]
214'L1_eTAU60_2cTAU20M_jXE80', # legacy 'L1_TAU40_2TAU12IM_XE40', TriggerMenuMT:L1Seeds ERROR L1 item L1_eTAU60_2cTAU20M_jXE80 from L1_BKeePrimary seeds is not in current L1 menu