This MR fixes crash in SPCountHypoTool when running Athena with debug logging. I've also made applyInverseCut function a template and made same changes, just in case same crash happens in the future.
SPCountHypoTool
applyInverseCut
CC: @campanel @dbogavac @tbold