From b3ac61119c12a41f62d1f57467a5721bfb06dcaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Schmidt?= <upwli@student.kit.edu> Date: Mon, 20 Sep 2021 14:04:37 +0200 Subject: [PATCH] Replace TrackWriterParquet.inl --- corsika/detail/modules/writers/TrackWriterParquet.inl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/corsika/detail/modules/writers/TrackWriterParquet.inl b/corsika/detail/modules/writers/TrackWriterParquet.inl index 26c62bdf0..304426489 100644 --- a/corsika/detail/modules/writers/TrackWriterParquet.inl +++ b/corsika/detail/modules/writers/TrackWriterParquet.inl @@ -30,12 +30,16 @@ namespace corsika { parquet::ConvertedType::NONE); output_.addField("start_z", parquet::Repetition::REQUIRED, parquet::Type::FLOAT, parquet::ConvertedType::NONE); + output_.addField("start_t", parquet::Repetition::REQUIRED, parquet::Type::FLOAT, + parquet::ConvertedType::NONE); output_.addField("end_x", parquet::Repetition::REQUIRED, parquet::Type::FLOAT, parquet::ConvertedType::NONE); output_.addField("end_y", parquet::Repetition::REQUIRED, parquet::Type::FLOAT, parquet::ConvertedType::NONE); output_.addField("end_z", parquet::Repetition::REQUIRED, parquet::Type::FLOAT, parquet::ConvertedType::NONE); + output_.addField("end_t", parquet::Repetition::REQUIRED, parquet::Type::FLOAT, + parquet::ConvertedType::NONE); // and build the streamer output_.buildStreamer(); @@ -46,8 +50,8 @@ namespace corsika { inline void TrackWriterParquet::endOfLibrary() { output_.closeStreamer(); } inline void TrackWriterParquet::write(Code const& pid, HEPEnergyType const& energy, - QuantityVector<length_d> const& start, - QuantityVector<length_d> const& end) { + QuantityVector<length_d> const& start, TimeType const& t_start, + QuantityVector<length_d> const& end, TimeType const& t_end) { // write the next row - we must write `shower_` first. // clang-format off @@ -58,9 +62,11 @@ namespace corsika { << static_cast<float>(start[0] / 1_m) << static_cast<float>(start[1] / 1_m) << static_cast<float>(start[2] / 1_m) + << static_cast<float>(t_start / 1_s) << static_cast<float>(end[0] / 1_m) << static_cast<float>(end[1] / 1_m) << static_cast<float>(end[2] / 1_m) + << static_cast<float>(t_end / 1_s) << parquet::EndRow; // clang-format on } -- GitLab