CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
WriterOff.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 
13 namespace corsika {
14 
21  class WriterOff : public BaseOutput {
22 
23  public:
28  template <typename... TArgs>
29  WriterOff(TArgs&&...) {}
30 
31  virtual ~WriterOff() {}
32 
33  void startOfLibrary(boost::filesystem::path const&) override {}
34 
35  void endOfShower(unsigned int const) override {}
36 
37  void endOfLibrary() override {}
38 
43  template <typename... TArgs>
44  void write(TArgs&&...) {}
45 
46  virtual YAML::Node getConfig() const { return YAML::Node(); }
47 
48  }; // class WriterOff
49 
50 } // namespace corsika
void write(TArgs &&...)
The purpose of this catch-all method is to discard all data.
Definition: WriterOff.hpp:44
Generic class to switch off any output.
Definition: WriterOff.hpp:21
WriterOff(TArgs &&...)
The purpose of this catch-all constructor is to discard all parameters.
Definition: WriterOff.hpp:29
`, since they are used everywhere as integral part of the framework.
virtual YAML::Node getConfig() const
Provide YAML configuration for this BaseOutput.
Definition: WriterOff.hpp:46
This is the base class for all outputs so that they can be stored in homogeneous containers.
Definition: BaseOutput.hpp:21
void endOfShower(unsigned int const) override
Called at the end of each event/shower.
Definition: WriterOff.hpp:35
void endOfLibrary() override
Called at the end of each run.
Definition: WriterOff.hpp:37
void startOfLibrary(boost::filesystem::path const &) override
Called at the start of each run.
Definition: WriterOff.hpp:33