CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
EnergyLossWriterParquet.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/media/ShowerAxis.hpp>
16 
17 #include <array>
18 
19 namespace corsika {
20 
34  template <size_t NColumns>
36 
37  public:
41  EnergyLossWriterParquet(std::array<const char*, NColumns> const& colNames);
42 
46  void startOfLibrary(boost::filesystem::path const& directory) override;
47 
51  void startOfShower(unsigned int const showerId) override;
52 
56  void endOfShower(unsigned int const showerId) override;
57 
64  void endOfLibrary() override;
65 
69  void write(unsigned int const showerId, GrammageType const grammage,
70  std::array<HEPEnergyType, NColumns> const& data);
71 
72  private:
73  std::array<const char*, NColumns> columns_;
74  ParquetStreamer output_;
75 
76  }; // namespace corsika
77 
78 } // namespace corsika
79 
80 #include <corsika/detail/modules/writers/EnergyLossWriterParquet.inl>
Import and extend the phys::units package.
This class automates the construction of simple tabular Parquet files using the parquet::StreamWriter...
void write(unsigned int const showerId, GrammageType const grammage, std::array< HEPEnergyType, NColumns > const &data)
Write energy lost to the file.
`, since they are used everywhere as integral part of the framework.
This is the base class for all outputs so that they can be stored in homogeneous containers.
Definition: BaseOutput.hpp:21
EnergyLossWriterParquet(std::array< const char *, NColumns > const &colNames)
Construct a new writer.
Interface to particle properties.
The actual writer to save dEdX data to disk.
void startOfShower(unsigned int const showerId) override
Called at the start of each shower.
void endOfShower(unsigned int const showerId) override
Called at the end of each shower.
void startOfLibrary(boost::filesystem::path const &directory) override
Called at the start of each library.
void endOfLibrary() override
Called at the end of each library.