Version: SMASH-3.1
icoutput.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2019-2020,2022-2023
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_SMASH_ICOUTPUT_H_
11 #define SRC_INCLUDE_SMASH_ICOUTPUT_H_
12 
13 #include <filesystem>
14 #include <memory>
15 #include <string>
16 
17 #include "file.h"
18 #include "outputinterface.h"
19 #include "outputparameters.h"
20 #include "smash/config.h"
21 
22 namespace smash {
23 
31 class ICOutput : public OutputInterface {
32  public:
40  ICOutput(const std::filesystem::path &path, const std::string &name,
41  const OutputParameters &out_par);
42  ~ICOutput();
43 
48  void at_eventstart(const Particles &, const int event_number,
49  const EventInfo &) override;
50 
57  void at_eventend(const Particles &particles, const int event_number,
58  const EventInfo &event) override;
59 
63  void at_intermediate_time(const Particles &, const std::unique_ptr<Clock> &,
64  const DensityParameters &,
65  const EventInfo &) override;
71  void at_interaction(const Action &action, const double) override;
72 
73  private:
78 
88  double IC_proper_time_ = -1.0;
89 };
90 
91 } // namespace smash
92 
93 #endif // SRC_INCLUDE_SMASH_ICOUTPUT_H_
Action is the base class for a generic process that takes a number of incoming particles and transfor...
Definition: action.h:35
A class to pre-calculate and store parameters relevant for density calculation.
Definition: density.h:108
SMASH output in ASCII format containing initial conditions for hydrodynamic codes.
Definition: icoutput.h:31
RenamingFilePtr file_
Pointer to output file.
Definition: icoutput.h:75
ICOutput(const std::filesystem::path &path, const std::string &name, const OutputParameters &out_par)
Create a new IC output.
Definition: icoutput.cc:101
double IC_proper_time_
Proper time of the particles removed when extracting initial conditions.
Definition: icoutput.h:88
void at_eventend(const Particles &particles, const int event_number, const EventInfo &event) override
Write event end line.
Definition: icoutput.cc:125
void at_interaction(const Action &action, const double) override
Write particle data at the hypersurface crossing point to the IC output.
Definition: icoutput.cc:146
const OutputParameters out_par_
Structure that holds all the information about what to printout.
Definition: icoutput.h:77
void at_eventstart(const Particles &, const int event_number, const EventInfo &) override
Write event start line.
Definition: icoutput.cc:120
void at_intermediate_time(const Particles &, const std::unique_ptr< Clock > &, const DensityParameters &, const EventInfo &) override
Unused, but needed since virtually declared in mother class.
Definition: icoutput.cc:139
Abstraction of generic output.
The Particles class abstracts the storage and manipulation of particles.
Definition: particles.h:33
A RAII type to replace std::FILE *.
Definition: file.h:72
Definition: action.h:24
Structure to contain custom data for output.
Helper structure for Experiment to hold output options and parameters.