10 #ifndef SRC_INCLUDE_SMASH_BINARYOUTPUT_H_ 
   11 #define SRC_INCLUDE_SMASH_BINARYOUTPUT_H_ 
   16 #include <boost/numeric/conversion/cast.hpp> 
   40                             const std::string &name, 
bool extended_format);
 
   46   void write(
const char c);
 
   52   void write(
const std::string &s);
 
   58   void write(
const double x);
 
   70   void write(
const std::int32_t x) {
 
   71     std::fwrite(&x, 
sizeof(x), 1, 
file_.
get());
 
   78   void write(
const std::uint32_t x) {
 
   79     std::fwrite(&x, 
sizeof(x), 1, 
file_.
get());
 
   86   void write(
const std::uint16_t x) {
 
   87     std::fwrite(&x, 
sizeof(x), 1, 
file_.
get());
 
   94   void write(
const size_t x) { 
write(boost::numeric_cast<uint32_t>(x)); }
 
  106   void write(
const ParticleList &particles);
 
  234                             const std::unique_ptr<Clock> &clock,
 
Action is the base class for a generic process that takes a number of incoming particles and transfor...
 
Base class for SMASH binary output.
 
BinaryOutputBase(const bf::path &path, const std::string &mode, const std::string &name, bool extended_format)
Create binary output base.
 
void write(const std::uint16_t x)
Write unsigned integer (16 bit) to binary output.
 
bool extended_
Option for extended output.
 
void write(const char c)
Write byte to binary output.
 
void write_particledata(const ParticleData &p)
Write particle data to binary output.
 
const uint16_t format_version_
Binary file format version number.
 
RenamingFilePtr file_
Binary particles output file path.
 
void write(const std::int32_t x)
Write integer (32 bit) to binary output.
 
void write(const size_t x)
Write a std::size_t to binary output.
 
void write(const std::uint32_t x)
Write unsigned integer (32 bit) to binary output.
 
Saves SMASH collision history to binary file.
 
void at_interaction(const Action &action, const double density) override
Writes an interaction block, including information about the incoming and outgoing particles,...
 
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.
 
bool print_start_end_
Write initial and final particles additonally to collisions?
 
BinaryOutputCollisions(const bf::path &path, std::string name, const OutputParameters &out_par)
Create binary particle output.
 
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.
 
Writes the particles when crossing the hypersurface to the binary file.
 
void at_eventstart(const Particles &, const int, const EventInfo &) override
Writes the initial particle information of an event to the binary output.
 
void at_interaction(const Action &action, const double) override
Writes particles that are removed when crossing the hypersurface to the output.
 
void at_eventend(const Particles &particles, const int event_number, const EventInfo &event) override
Writes the final particle information of an event to the binary output.
 
BinaryOutputInitialConditions(const bf::path &path, std::string name, const OutputParameters &out_par)
Create binary initial conditions particle output.
 
Writes the particle list at specific times to the binary file.
 
void at_eventstart(const Particles &particles, const int event_number, const EventInfo &event) override
Writes the initial particle information of an event to the binary output.
 
OutputOnlyFinal only_final_
Whether final- or initial-state particles should be written.
 
void at_intermediate_time(const Particles &particles, const std::unique_ptr< Clock > &clock, const DensityParameters &dens_param, const EventInfo &event) override
Writes particles at each time interval; fixed by option OUTPUT_INTERVAL.
 
BinaryOutputParticles(const bf::path &path, std::string name, const OutputParameters &out_par)
Create binary particle output.
 
void at_eventend(const Particles &particles, const int event_number, const EventInfo &event) override
Writes the final particle information of an event to the binary output.
 
A class to pre-calculate and store parameters relevant for density calculation.
 
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
 
Abstraction of generic output.
 
ParticleData contains the dynamic information of a certain particle.
 
The Particles class abstracts the storage and manipulation of particles.
 
A RAII type to replace std::FILE *.
 
FILE * get()
Get the underlying FILE* pointer.
 
OutputOnlyFinal
Whether and when only final state particles should be printed.
 
Structure to contain custom data for output.
 
Helper structure for Experiment to hold output options and parameters.