9#include <nlohmann/json.hpp>
40 nlohmann::json chunks = nlohmann::json::array();
41 for (
const auto& chunk : file.
chunks)
43 chunks.push_back(chunkToJson(chunk));
46 nlohmann::json cw_segments = nlohmann::json::array();
49 cw_segments.push_back(cwSegmentToJson(segment));
64 {
"cw_segments", cw_segments}};
69 nlohmann::json files = nlohmann::json::array();
70 for (
const auto& file : metadata.
files)
72 files.push_back(fileToJson(file));
98 std::scoped_lock lock(_mutex);
99 _metadata.
files.push_back(std::move(file_metadata));
104 std::scoped_lock lock(_mutex);
110 return fileToJson(metadata).dump(2);
std::string outputFileMetadataToJsonString(const OutputFileMetadata &metadata)
std::string outputMetadataToJsonString(const OutputMetadata &metadata)
RealType endTime() noexcept
Get the end time for the simulation.
RealType rate() noexcept
Get the rendering sample rate.
RealType startTime() noexcept
Get the start time for the simulation.
unsigned oversampleRatio() noexcept
Get the oversampling ratio.
Defines the Parameters struct and provides methods for managing simulation parameters.
std::string simulation_name
The name of the simulation, from the XML.