Version: SMASH-2.0
icoutput.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2019-2020
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 <memory>
14 #include <string>
15 
16 #include <boost/filesystem.hpp>
17 
18 #include "file.h"
19 #include "outputinterface.h"
20 #include "outputparameters.h"
21 #include "smash/config.h"
22 
23 namespace smash {
24 
32 class ICOutput : public OutputInterface {
33  public:
41  ICOutput(const bf::path &path, const std::string &name,
42  const OutputParameters &out_par);
43  ~ICOutput();
44 
49  void at_eventstart(const Particles &, const int event_number,
50  const EventInfo &) override;
51 
57  void at_eventend(const Particles &particles, const int event_number,
58  const EventInfo &) 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_
smash
Definition: action.h:24
outputparameters.h
smash::ICOutput::at_interaction
void at_interaction(const Action &action, const double) override
Write particle data at the hypersurface crossing point to the IC output.
Definition: icoutput.cc:140
smash::DensityParameters
A class to pre-calculate and store parameters relevant for density calculation.
Definition: density.h:108
smash::ICOutput::ICOutput
ICOutput(const bf::path &path, const std::string &name, const OutputParameters &out_par)
Create a new IC output.
Definition: icoutput.cc:99
smash::ICOutput::at_intermediate_time
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:133
smash::EventInfo
Structure to contain custom data for output.
Definition: outputinterface.h:35
smash::ICOutput::at_eventstart
void at_eventstart(const Particles &, const int event_number, const EventInfo &) override
Write event start line.
Definition: icoutput.cc:114
outputinterface.h
smash::OutputParameters
Helper structure for Experiment to hold output options and parameters.
Definition: outputparameters.h:25
smash::ICOutput
Definition: icoutput.h:32
smash::OutputInterface
Abstraction of generic output.
Definition: outputinterface.h:65
smash::ICOutput::IC_proper_time_
double IC_proper_time_
Proper time of the particles removed when extracting initial conditions.
Definition: icoutput.h:88
smash::ICOutput::out_par_
const OutputParameters out_par_
Structure that holds all the information about what to printout.
Definition: icoutput.h:77
smash::ICOutput::at_eventend
void at_eventend(const Particles &particles, const int event_number, const EventInfo &) override
Write event end line.
Definition: icoutput.cc:119
smash::ICOutput::file_
RenamingFilePtr file_
Pointer to output file.
Definition: icoutput.h:75
smash::Particles
Definition: particles.h:33
smash::Action
Definition: action.h:35
smash::RenamingFilePtr
A RAII type to replace std::FILE *.
Definition: file.h:73
file.h
smash::ICOutput::~ICOutput
~ICOutput()
Definition: icoutput.cc:112