Fix test_egamma_run_data.sh ESD checks
NOTE: This MR branches off of !21313 (merged)
It adds one extra commit: 6e6399b2
This is to follow up ATR-19507
I suggest this is merged immediately following on from !21313 (merged) as the extra changes on top are trivial.