diff --git a/t/check_highfive.cc b/t/check_highfive.cc index b58a79b..9de22b2 100644 --- a/t/check_highfive.cc +++ b/t/check_highfive.cc @@ -1,39 +1,41 @@ /** * \authors The HEJ collaboration (see AUTHORS for details) * \date 2019-2023 * \copyright GPLv2 or later */ #include #include #include #include "HEJ/exceptions.hh" using namespace HighFive; int main(int argn, char** argv) { constexpr double EP = 1e-3; if(argn != 3){ std::cerr << "Usage: check_highfive hdf5_file XS_test_value\n"; return EXIT_FAILURE; } const double xstest = std::stod(argv[2]); File file(argv[1], File::ReadOnly); auto dataset = file.getDataSet("procInfo/xSection"); std::vector result; // hdf data in form // { 0, 1, 2, 3,...} // {fkl, uno, qqbar, non-resummable,...} - dataset.select({0}).read(result); + const std::vector fkl_xs_idx{0}; + dataset.select(fkl_xs_idx).read(result); double xs = result[0]; - dataset.select({3}).read(result); + const std::vector nonresum_xs_idx{3}; + dataset.select(nonresum_xs_idx).read(result); xs += result[0]; if(std::abs(xs-xstest) > EP*xs){ std::cerr << "Total XS deviates substantially from ref value: " << xs << " vs " << xstest << "\n"; return EXIT_FAILURE; } return EXIT_SUCCESS; }