4 from DecisionHandling.DecisionHandlingConfig
import ComboHypoCfg
5 from TriggerMenuMT.HLT.Config.MenuComponents
import Chain, ChainStep
6 from TriggerMenuMT.HLT.Config.Utility.ChainDefInMenu
import ChainProp
7 from TriggerMenuMT.HLT.Config.Utility.ChainDictTools
import splitChainDictInLegs
8 from TriggerMenuMT.HLT.Config.Utility.DictFromChainName
import dictFromChainName
9 from TriggerMenuMT.HLT.Config.Utility.HLTMenuConfig
import HLTMenuConfig
10 from HLTSeeding.HLTSeedingConfig
import mapThresholdToL1DecisionCollection
13 """Writes emulation files. key in the dict is a file name (+.dat), list which is value of each dict el is enetered into the file, one el. per line"""
14 for name, d
in data.items():
15 with open(name+
".dat",
"w")
as f:
22 """Used to store the step info, regardless of the chainDict"""
23 def __init__(self, name, seq=[], comboHypoCfg=ComboHypoCfg, comboToolConfs=[], chainDicts=None, isEmpty=False):
34 def makeChain( flags, name, L1Thresholds, ChainSteps, Streams="physics:Main
", Groups=["RATE:TestRateGroup
", "BW:TestBW
"]):
36 In addition to making the chain object fills the flags that are used to generate MnuCOnfig JSON file
38 prop = ChainProp( name=name, l1SeedThresholds=L1Thresholds, groups=Groups )
41 chainDict[
"chainCounter"] = chainsCounter
45 chainDict[
'prescale'] = 1
51 for step
in ChainSteps:
52 StepConfig+=[ChainStep(step.name,
54 chainDicts=step.chainDicts
if step.chainDicts
else listOfChainDicts,
55 comboHypoCfg=step.comboHypoCfg,
56 comboToolConfs=step.comboToolConfs, isEmpty=step.isEmpty)]
58 chainConfig = Chain( name=name, L1decisions=L1decisions, ChainSteps=StepConfig )
59 HLTMenuConfig.registerChain( chainDict )