36def makeChain( flags, name, L1Thresholds, ChainSteps, Streams="physics:Main", Groups=["RATE:TestRateGroup", "BW:TestBW"]):
37 """
38 In addition to making the chain object fills the flags that are used to generate MnuCOnfig JSON file
39 """
40 prop = ChainProp( name=name, l1SeedThresholds=L1Thresholds, groups=Groups )
41 chainDict = dictFromChainName( flags, prop )
42 global chainsCounter
43 chainDict["chainCounter"] = chainsCounter
44 chainsCounter += 1
45
46
47 chainDict['prescale'] = 1
48
49 listOfChainDicts = splitChainDictInLegs(chainDict)
50 L1decisions = [ mapThresholdToL1DecisionCollection(stri) for stri in L1Thresholds]
51
52 StepConfig = []
53 for step in ChainSteps:
54 StepConfig+=[ChainStep(step.name,
55 step.seq,
56 chainDicts=step.chainDicts if step.chainDicts else listOfChainDicts,
57 comboHypoCfg=step.comboHypoCfg,
58 comboToolConfs=step.comboToolConfs, isEmpty=step.isEmpty)]
59
60 chainConfig = Chain( name=name, L1decisions=L1decisions, ChainSteps=StepConfig )
61 HLTMenuConfig.registerChain( chainDict )
62
63 return chainConfig