Skip to content

Fix off-by-one errors in 'trigger_stats_xml_from_xml'

Patrick Clearwater requested to merge pwc_calcfap_fixes into master

The condition in trigger_stats_xml_from_xml was:

if ((combo + 1) & (icombo + 1) == combo + 1) {

This doesn't seem right - first there should be brackets around the LHS of the conditional, but it also doesn't express the desired loop conditional, which is (I think?) either of: all active detectors, or a single active detector (so for H1L1V1, select H1, L1, V1 and H1L1V1, but not the cross-terms H1L1, H1V1, L1V1).

There are also a couple more off-by-one problems which should be resolved.

Merge request reports