Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F7877378
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
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 <cstdlib>
#include <iostream>
#include <highfive/H5File.hpp>
#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<double> result;
// hdf data in form
// { 0, 1, 2, 3,...}
// {fkl, uno, qqbar, non-resummable,...}
- dataset.select({0}).read(result);
+ const std::vector<size_t> fkl_xs_idx{0};
+ dataset.select(fkl_xs_idx).read(result);
double xs = result[0];
- dataset.select({3}).read(result);
+ const std::vector<size_t> 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;
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Nov 19, 3:31 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3796032
Default Alt Text
(1 KB)
Attached To
rHEJ HEJ
Event Timeline
Log In to Comment