7 #include <boost/property_tree/json_parser.hpp>
9 using boost::property_tree::json_parser_error;
18 const string& idealFile,
19 const string& checkFile) {
20 ptree qa, ideal, check;
23 read_json(qaFile.c_str(), qa);
24 }
catch (json_parser_error& error) { cout << error.what(); }
27 read_json(idealFile.c_str(), ideal);
28 }
catch (json_parser_error& error) { cout << error.what(); }
33 write_json(checkFile.c_str(), check);
34 }
catch (json_parser_error& error) { cout << error.what(); }
41 map<string, Double_t> mymap;
45 for (map<string, Double_t>::const_iterator it = mymap.begin();
48 map<string, Double_t>::value_type
v = *it;
50 boost::optional<Double_t> vmin =
51 ideal.get_optional<Double_t>(
v.first +
".min");
52 boost::optional<Double_t> vmax =
53 ideal.get_optional<Double_t>(
v.first +
".max");
59 out.put(
v.first, -1.f);
63 if (
v.second >= vmin &&
v.second <= vmax) {
65 out.put(
v.first, 1.f);
68 out.put(
v.first, 0.f);
77 map<string, Double_t>& mymap)
const {
79 mymap.insert(pair<string, Double_t>(path, pt.get_value(-1.f)));
82 for (ptree::const_iterator it = pt.begin(); it != pt.end(); it++) {
83 ptree::value_type
v = *it;
84 string path1 = (path !=
"") ? (path +
"." +
v.first) :
v.first;