From 6a8dcda9c86dcb965bd7e39c8bb84a22aa1cfe4c Mon Sep 17 00:00:00 2001 From: Remy Prechelt <prechelt@hawaii.edu> Date: Mon, 29 Mar 2021 23:41:34 -1000 Subject: [PATCH] Path std::filesystem directly to ofstream. --- .../modules/writers/ObservationPlaneWriterParquet.inl | 8 ++++++-- corsika/detail/output/OutputManager.inl | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/corsika/detail/modules/writers/ObservationPlaneWriterParquet.inl b/corsika/detail/modules/writers/ObservationPlaneWriterParquet.inl index 76ae3af1c..5eb2ce5b2 100644 --- a/corsika/detail/modules/writers/ObservationPlaneWriterParquet.inl +++ b/corsika/detail/modules/writers/ObservationPlaneWriterParquet.inl @@ -44,8 +44,12 @@ namespace corsika { using namespace units::si; // write the next row - we must write `shower_` first. - (*writer_) << shower_ << static_cast<int>(get_PDG(pid)) << energy / 1_eV << x / 1_m - << y / 1_m << parquet::EndRow; + (*writer_) << shower_ + << static_cast<int>(get_PDG(pid)) + << static_cast<float>(energy / 1_eV) + << static_cast<float>(x / 1_m) + << static_cast<float>(y / 1_m) + << parquet::EndRow; } } // namespace corsika diff --git a/corsika/detail/output/OutputManager.inl b/corsika/detail/output/OutputManager.inl index ead11a08f..20ed3798a 100644 --- a/corsika/detail/output/OutputManager.inl +++ b/corsika/detail/output/OutputManager.inl @@ -30,7 +30,7 @@ namespace corsika { out << node; // open the output file - this is <output name>.yaml - std::ofstream file(path.string()); + std::ofstream file(path); // dump the YAML to the file file << out.c_str() << std::endl; -- GitLab