Skip to content

TrigValTools: Fix unhandled case in chainComp.py

Rafal Bielski requested to merge rbielski/athena:fix-chaincomp into master

A case when chain step counts go from zero (i.e. skipped in the yaml file) to non-zero or the opposite direction was causing a crash in chainComp.py:

Traceback (most recent call last):
  File "/build2/ci-builds/master/Athena/build/Athena/x86_64-centos7-gcc8-opt/bin/chainComp.py", line 230, in <module>
    sys.exit(main())
  File "/build2/ci-builds/master/Athena/build/Athena/x86_64-centos7-gcc8-opt/bin/chainComp.py", line 219, in main
    retcode = print_diff(inp_dict, ref_dict)
  File "/build2/ci-builds/master/Athena/build/Athena/x86_64-centos7-gcc8-opt/bin/chainComp.py", line 153, in print_diff
    print_step_diff(inp_data, ref_data, 'stepCounts')
  File "/build2/ci-builds/master/Athena/build/Athena/x86_64-centos7-gcc8-opt/bin/chainComp.py", line 112, in print_step_diff
    if inp_data[key] != ref_data[key]:
KeyError: 'stepCounts'

Fixing this by creating empty entries for the missing keys (as the design assumed).

Flagging as urgent bugfix because it is a crucial element of Trigger CI tests.

Merge request reports