CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
TrackWriterParquet.hpp
1 /*
2  * (c) Copyright 2021 CORSIKA Project, corsika-project@lists.kit.edu
3  *
4  * This software is distributed under the terms of the GNU General Public
5  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
6  * the license.
7  */
8 
9 #pragma once
10 
11 #include <corsika/output/BaseOutput.hpp>
12 #include <corsika/output/ParquetStreamer.hpp>
15 #include <corsika/framework/geometry/QuantityVector.hpp>
16 
17 namespace corsika {
18 
19  class TrackWriterParquet : public BaseOutput {
20 
21  public:
28 
32  void startOfLibrary(boost::filesystem::path const& directory) final override;
33 
37  void endOfShower() final override;
38 
45  void endOfLibrary() final override;
46 
47  protected:
51  void write(Code const& pid, units::si::HEPEnergyType const& energy,
52  QuantityVector<length_d> const& start,
53  QuantityVector<length_d> const& end);
54 
55  private:
56  ParquetStreamer output_;
57 
58  }; // class TrackWriterParquet
59 
60 } // namespace corsika
61 
62 #include <corsika/detail/modules/writers/TrackWriterParquet.inl>
Import and extend the phys::units package.
void write(Code const &pid, units::si::HEPEnergyType const &energy, QuantityVector< length_d > const &start, QuantityVector< length_d > const &end)
Write a track to the file.
This class automates the construction of simple tabular Parquet files using the parquet::StreamWriter...
TrackWriterParquet()
Construct a new writer.
The cascade namespace assembles all objects needed to simulate full particles cascades.
This is the base class for all outputs so that they can be stored in homogeneous containers.
Definition: BaseOutput.hpp:20
void endOfLibrary() final override
Called at the end of each library.
Interface to particle properties.
void startOfLibrary(boost::filesystem::path const &directory) final override
Called at the start of each library.
void endOfShower() final override
Called at the end of each shower.