15 #include "ActsExamples/EventData/DataContainers.hpp"
21 namespace ActsExamples {
62 :
Base(cfg.collection,
"JsonSpacePointWriter", level), m_cfg(cfg) {
64 throw std::invalid_argument(
"Missing input collection");
75 std::ofstream os(path, std::ofstream::out | std::ofstream::trunc);
77 throw std::ios_base::failure(
"Could not open '" + path +
"' to write");
80 os << std::setprecision(m_cfg.outputPrecision);
83 bool firstVolume =
true;
84 for (
auto& volumeData : spacePoints) {
85 geo_id_value volumeID = volumeData.first;
89 os <<
" \"SpacePoints_" << volumeID <<
"\" : [\n";
91 bool firstPoint =
true;
92 for (
auto& layerData : volumeData.second) {
93 for (
auto& moduleData : layerData.second) {
94 for (
auto&
data : moduleData.second) {