18 #include <nlohmann/json.hpp>
33 auto jOut =
m_converter->materialMapsToJson(detMaterial);
38 std::ofstream ofj(fileName);
39 ofj << std::setw(4) << jOut << std::endl;
42 std::vector<uint8_t> cborOut = nlohmann::json::to_cbor(jOut);
45 std::ofstream ofj(fileName,
std::ios::out | std::ios::binary);
46 ofj.write((
char*)cborOut.data(), cborOut.size());
53 auto jOut =
m_converter->trackingGeometryToJson(tGeometry);
56 std::ofstream ofj(
m_cfg.fileName +
".json");
57 ofj << std::setw(4) << jOut << std::endl;
60 std::vector<uint8_t> cborOut = nlohmann::json::to_cbor(jOut);
61 std::ofstream ofj(
m_cfg.fileName +
".cbor",
63 ofj.write((
char*)cborOut.data(), cborOut.size());