Round non-integer lumi counter values rather than truncating them
Currently non-integer values to be stored in a lumi counter are simply truncated by static_cast<unsigned>
. This can cause problems for the test_lumi
test in MooreOnline, which decodes an Allen LumiSummary bank, re-encodes it using the LHCb writer and then re-decodes it. As all values decoded from the initial bank have already been truncated to an integer in the first encoding, any loss of precision in the second encoding (caused by applying the scale and shift) can cause the encoded counter to be reduced by one.
This MR adds a std::round
to the Allen writer to remain consistent with the LHCb version.
Addresses MooreOnline#32 (closed)
Goes with LHCb!4152 (merged)