Skip to content
Snippets Groups Projects
Commit 0fc3afc7 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'chaincomp-dicts' into 'master'

TrigValTools: improve dictionary handling in chainComp.py

See merge request atlas/athena!38218
parents ece88f18 a8ea244f
No related branches found
No related tags found
No related merge requests found
...@@ -109,15 +109,13 @@ def print_event_diff(inp_data, ref_data, key): ...@@ -109,15 +109,13 @@ def print_event_diff(inp_data, ref_data, key):
def print_step_diff(inp_data, ref_data, key): def print_step_diff(inp_data, ref_data, key):
if key not in inp_data: inp_steps = inp_data.get(key, dict())
inp_data[key] = dict() ref_steps = ref_data.get(key, dict())
if key not in ref_data: if inp_steps != ref_steps:
ref_data[key] = dict()
if inp_data[key] != ref_data[key]:
logging.info(' %s:', key) logging.info(' %s:', key)
for step in range(max(len(inp_data[key]), len(ref_data[key]))): for step in range(max(len(inp_steps), len(ref_steps))):
inp_count = inp_data[key][step] if step in inp_data[key] else 0 inp_count = inp_steps.get(step, 0)
ref_count = ref_data[key][step] if step in ref_data[key] else 0 ref_count = ref_steps.get(step, 0)
if inp_count != ref_count: if inp_count != ref_count:
logging.info(' %d: %d -> %d', step, ref_count, inp_count) logging.info(' %d: %d -> %d', step, ref_count, inp_count)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment