#include <binaryoutput.h>
Saves SMASH collision history to binary file.
This class writes each collision, decay and box wall crossing to the output file. Optionally, one can also write the initial and final particle lists to the same file. The output file is binary and has a block structure.
Details of the output format can be found on the wiki in the User Guide section, look for binary output.
Definition at line 136 of file binaryoutput.h.
Public Member Functions | |
BinaryOutputCollisions (const std::filesystem::path &path, std::string name, const OutputParameters &out_par) | |
Create binary particle output. More... | |
void | at_eventstart (const Particles &particles, const int event_number, const EventInfo &event) override |
Writes the initial particle information list of an event to the binary output. More... | |
void | at_eventend (const Particles &particles, const int32_t event_number, const EventInfo &event) override |
Writes the final particle information list of an event to the binary output. More... | |
void | at_interaction (const Action &action, const double density) override |
Writes an interaction block, including information about the incoming and outgoing particles, to the binary output. More... | |
![]() | |
OutputInterface (std::string name) | |
Construct output interface. More... | |
virtual | ~OutputInterface ()=default |
virtual void | at_eventstart (const std::vector< Particles > &ensembles, int event_number) |
Output launched at event start after initialization, when particles are generated but not yet propagated. More... | |
virtual void | at_eventstart (const int event_number, const ThermodynamicQuantity tq, const DensityType dens_type, RectangularLattice< DensityOnLattice > lattice) |
Output launched at event start after initialization, when particles are generated but not yet propagated. More... | |
virtual void | at_eventstart (const int event_number, const ThermodynamicQuantity tq, const DensityType dens_type, RectangularLattice< EnergyMomentumTensor > lattice) |
Output launched atevent start after initialization, when particles are generated but not yet propagated. More... | |
virtual void | at_eventend (const int event_number, const ThermodynamicQuantity tq, const DensityType dens_type) |
Output launched at event end. More... | |
virtual void | at_eventend (const ThermodynamicQuantity tq) |
Output launched at event end. More... | |
virtual void | at_eventend (const Particles &particles, const int event_number, const EventInfo &info) |
Output launched at event end. More... | |
virtual void | at_eventend (const std::vector< Particles > &ensembles, const int event_number) |
Output launched at event end. More... | |
virtual void | at_intermediate_time (const Particles &particles, const std::unique_ptr< Clock > &clock, const DensityParameters &dens_param, const EventInfo &info) |
Output launched after every N'th timestep. More... | |
virtual void | at_intermediate_time (const std::vector< Particles > &ensembles, const std::unique_ptr< Clock > &clock, const DensityParameters &dens_param) |
Output launched after every N'th timestep. More... | |
virtual void | thermodynamics_output (const ThermodynamicQuantity tq, const DensityType dt, RectangularLattice< DensityOnLattice > &lattice) |
Output to write thermodynamics from the lattice. More... | |
virtual void | thermodynamics_output (const ThermodynamicQuantity tq, const DensityType dt, RectangularLattice< EnergyMomentumTensor > &lattice) |
Output to write energy-momentum tensor and related quantities from the lattice. More... | |
virtual void | thermodynamics_lattice_output (RectangularLattice< DensityOnLattice > &lattice, const double current_time) |
Output to write thermodynamics from the lattice. More... | |
virtual void | thermodynamics_lattice_output (RectangularLattice< DensityOnLattice > &lattice, const double current_time, const std::vector< Particles > &ensembles, const DensityParameters &dens_param) |
Output to write thermodynamics from the lattice. More... | |
virtual void | thermodynamics_lattice_output (const ThermodynamicQuantity tq, RectangularLattice< EnergyMomentumTensor > &lattice, const double current_time) |
Output to write energy-momentum tensor and related quantities from the lattice. More... | |
virtual void | thermodynamics_output (const GrandCanThermalizer &gct) |
Output to write energy-momentum tensor and related quantities from the thermalizer class. More... | |
virtual void | fields_output (const std::string name1, const std::string name2, RectangularLattice< std::pair< ThreeVector, ThreeVector >> &lat) |
Write fields in vtk output. More... | |
bool | is_dilepton_output () const |
Get, whether this is the dilepton output? More... | |
bool | is_photon_output () const |
Get, whether this is the photon output? More... | |
bool | is_IC_output () const |
Get, whether this is the IC output? More... | |
const char * | to_string (const ThermodynamicQuantity tq) |
Convert thermodynamic quantities to strings. More... | |
const char * | to_string (const DensityType dens_type) |
Convert density types to strings. More... | |
Private Attributes | |
bool | print_start_end_ |
Write initial and final particles additonally to collisions? More... | |
Additional Inherited Members | |
![]() | |
BinaryOutputBase (const std::filesystem::path &path, const std::string &mode, const std::string &name, bool extended_format) | |
Create binary output base. More... | |
void | write (const char c) |
Write byte to binary output. More... | |
void | write (const std::string &s) |
Write string to binary output. More... | |
void | write (const double x) |
Write double to binary output. More... | |
void | write (const FourVector &v) |
Write four-vector to binary output. More... | |
void | write (const std::int32_t x) |
Write integer (32 bit) to binary output. More... | |
void | write (const std::uint32_t x) |
Write unsigned integer (32 bit) to binary output. More... | |
void | write (const std::uint16_t x) |
Write unsigned integer (16 bit) to binary output. More... | |
void | write (const size_t x) |
Write a std::size_t to binary output. More... | |
void | write (const Particles &particles) |
Write particle data of each particle in particles to binary output. More... | |
void | write (const ParticleList &particles) |
Write each particle data entry to binary output. More... | |
void | write_particledata (const ParticleData &p) |
Write particle data to binary output. More... | |
![]() | |
RenamingFilePtr | file_ |
Binary particles output file path. More... | |
![]() | |
const bool | is_dilepton_output_ |
Is this the dilepton output? More... | |
const bool | is_photon_output_ |
Is this the photon output? More... | |
const bool | is_IC_output_ |
Is this the IC output? More... | |
smash::BinaryOutputCollisions::BinaryOutputCollisions | ( | const std::filesystem::path & | path, |
std::string | name, | ||
const OutputParameters & | out_par | ||
) |
Create binary particle output.
[in] | path | Output path. |
[in] | name | Name of the output. |
[in] | out_par | A structure containing parameters of the output. |
Definition at line 200 of file binaryoutput.cc.
|
overridevirtual |
Writes the initial particle information list of an event to the binary output.
[in] | particles | Current list of all particles. |
[in] | event_number | Unused, needed since inherited. |
[in] | event | Event info, see event_info |
Reimplemented from smash::OutputInterface.
Definition at line 208 of file binaryoutput.cc.
|
override |
Writes the final particle information list of an event to the binary output.
[in] | particles | Current list of particles. |
[in] | event_number | Number of event. |
[in] | event | Event info, see event_info |
Definition at line 218 of file binaryoutput.cc.
|
overridevirtual |
Writes an interaction block, including information about the incoming and outgoing particles, to the binary output.
[in] | action | Action that holds the information of the interaction. |
[in] | density | Density at the interaction point. |
Reimplemented from smash::OutputInterface.
Definition at line 240 of file binaryoutput.cc.
|
private |
Write initial and final particles additonally to collisions?
Definition at line 178 of file binaryoutput.h.