83 all_tla_chain_configs = [ch
for ch
in chain_configs
if 'PhysicsTLA' in chain_dicts[ch.name][
'eventBuildType']]
85 def getTLAStepPosition(chainConfig):
87 log.debug(
'getTLAStepPosition found step %s and return %d',tlaStep,chainConfig.steps.index(tlaStep) + 1)
88 return chainConfig.steps.index(tlaStep) + 1
91 maxTLAStepPosition = 0
92 for chain
in all_tla_chain_configs:
93 tlaStepPosition = getTLAStepPosition(chain)
94 if tlaStepPosition > maxTLAStepPosition:
95 maxTLAStepPosition = tlaStepPosition
97 log.debug(
'maxTLAStepPosition=%d',maxTLAStepPosition)
100 for chain
in all_tla_chain_configs:
101 tlaStepPosition = getTLAStepPosition(chain)
102 log.debug(
'Aligning TLA step at step %d for chain %s ', tlaStepPosition, chain.name)
103 if tlaStepPosition < maxTLAStepPosition:
104 numStepsNeeded = maxTLAStepPosition - tlaStepPosition
105 log.debug(
'Aligning TLA step for chain %s by adding %d empty steps', chain.name, numStepsNeeded)
106 chain.insertEmptySteps(
'EmptyTLAAlign', numStepsNeeded, tlaStepPosition-1)
107 chain.numberAllSteps()