28 :
WriterT(config.inputSpacepoints,
"RootSpacepointWriter", level),
32 throw std::invalid_argument(
"Missing file path");
35 throw std::invalid_argument(
"Missing tree name");
41 throw std::ios_base::failure(
"Could not open '" +
m_cfg.
filePath +
"'");
46 throw std::bad_alloc();
61 if (m_outputFile !=
nullptr) {
62 m_outputFile->Close();
68 m_outputTree->Write();
69 m_outputFile->Close();
72 <<
m_cfg.filePath <<
"'");
81 std::lock_guard<std::mutex> lock(m_writeMutex);
85 for (
const auto& sp : spacepoints) {
87 m_measurementId = slinkPtr.
index();
88 m_geometryId = slinkPtr.geometryId().value();