31 nlohmann::json subjson;
33 j[
"subdata"] = subjson;
37 bins -=
static_cast<int>(subjson[
"bins"]) + 1;
39 bins /=
static_cast<int>(subjson[
"bins"]);
44 j[
"type"] =
"equidistant";
46 j[
"type"] =
"arbitrary";
59 if (bins == 1 and not(j[
"type"] ==
"arbitrary")) {
67 std::unique_ptr<BinningData> subBinning =
nullptr;
68 bool subBinningAdditive =
false;
69 if (j.find(
"subdata") != j.end()) {
70 subBinningAdditive = j[
"subadditive"];
77 std::vector<float> boundaries = j[
"boundaries"];
83 nlohmann::json jbindata;
85 jbindata.push_back(nlohmann::json(bdata));
87 j[
"binningdata"] = jbindata;
88 if (not bu.
transform().isApprox(Transform3::Identity())) {
90 j[
"transform"] = jtrf;
96 if (j.find(
"transform") != j.end() and not j[
"transform"].empty()) {
100 for (
const auto& jdata : j[
"binningdata"]) {