Version: SMASH-1.7
Output Classes

Classes

class  smash::BinaryOutputBase
 Base class for SMASH binary output. More...
 
class  smash::BinaryOutputCollisions
 Saves SMASH collision history to binary file. More...
 
class  smash::BinaryOutputParticles
 Writes the particle list at specific times to the binary file. More...
 
class  smash::BinaryOutputInitialConditions
 Writes the particles when crossing the hypersurface to the binary file. More...
 
class  smash::ICOutput
 SMASH output in ASCII format containing initial conditions for hydrodynamic codes. More...
 
class  smash::OscarOutput< Format, Contents >
 
class  smash::OutputInterface
 Abstraction of generic output. More...
 
class  smash::RootOutput
 

SMASH output to ROOT file

SMASH supports ROOT output as an option (see http://root.cern.ch). More...
 
class  smash::ThermodynamicOutput
 Writes the thermodynamic quantities at a specified point versus time. More...
 
class  smash::VtkOutput
 SMASH output in a paraview format, intended for simple visualization. More...
 

Enumerations

enum  smash::OscarOutputFormat { smash::OscarFormat2013, smash::OscarFormat2013Extended, smash::OscarFormat1999 }
 Selector for the output format of OscarOutput. More...
 
enum  smash::OscarOutputContents {
  smash::OscarInteractions = 0x001, smash::OscarTimesteps = 0x002, smash::OscarAtEventstart = 0x004, smash::OscarParticlesAtEventend = 0x008,
  smash::OscarParticlesIC = 0x016
}
 Flags for the Contents template parameter of OscarOutput. More...
 

Functions

std::unique_ptr< OutputInterface > smash::create_oscar_output (const std::string &format, const std::string &content, const bf::path &path, const OutputParameters &out_par)
 

Enumeration Type Documentation

Selector for the output format of OscarOutput.

Enumerator
OscarFormat2013 
OscarFormat2013Extended 
OscarFormat1999 

Definition at line 29 of file oscaroutput.h.

Flags for the Contents template parameter of OscarOutput.

Flags can be combined with binary OR operators to some arbitrary int. That's why the values of the enumerators are written out (in hexadecimal), to ensure every flag occupies a single bit.

Enumerator
OscarInteractions 

store interaction information (write_interaction)

OscarTimesteps 

store the state after N timesteps (after_Nth_timestep)

OscarAtEventstart 

store the state at the start of each event (at_eventstart)

OscarParticlesAtEventend 

store the state at the end of each event (at_eventend)

OscarParticlesIC 

store the particles that are removed on the hypersurface

Definition at line 42 of file oscaroutput.h.

42  {
44  OscarInteractions = 0x001,
46  OscarTimesteps = 0x002,
48  OscarAtEventstart = 0x004,
52  OscarParticlesIC = 0x016
53 };
store the state at the end of each event (at_eventend)
Definition: oscaroutput.h:50
store the state after N timesteps (after_Nth_timestep)
Definition: oscaroutput.h:46
store the particles that are removed on the hypersurface
Definition: oscaroutput.h:52
store the state at the start of each event (at_eventstart)
Definition: oscaroutput.h:48
store interaction information (write_interaction)
Definition: oscaroutput.h:44

Function Documentation

std::unique_ptr< OutputInterface > smash::create_oscar_output ( const std::string &  format,
const std::string &  content,
const bf::path &  path,
const OutputParameters out_par 
)
Returns
A new OscarOutput object using information from config to select the correct implementation.
Parameters
[in]formatA string: "Oscar2013" or "Oscar1999"
[in]contentA string: "Particles", "Collisions", "Photons" or "Dileptons".
[in]pathThe path to the output directory where the file(s) will be placed.
[in]out_parA structure containing parameters of the output, in particular if it is extended or not, if printing only final particles in event, etc.

Definition at line 765 of file oscaroutput.cc.

767  {
768  const auto &log = logger<LogArea::Output>();
769  if (format != "Oscar2013" && format != "Oscar1999") {
770  throw std::invalid_argument("Creating Oscar output: unknown format");
771  }
772  const bool modern_format = (format == "Oscar2013");
773  if (content == "Particles") {
774  if (out_par.part_only_final) {
775  return create_select_format<OscarParticlesAtEventend>(
776  modern_format, path, out_par, "particle_lists");
777  } else {
780  modern_format, path, out_par, "particle_lists");
781  }
782  } else if (content == "Collisions") {
783  if (out_par.coll_printstartend) {
786  modern_format, path, out_par, "full_event_history");
787  } else {
788  return create_select_format<OscarInteractions>(
789  modern_format, path, out_par, "full_event_history");
790  }
791  } else if (content == "Dileptons") {
792  if (modern_format && out_par.dil_extended) {
793  return make_unique<
794  OscarOutput<OscarFormat2013Extended, OscarInteractions>>(path,
795  "Dileptons");
796  } else if (modern_format && !out_par.dil_extended) {
797  return make_unique<OscarOutput<OscarFormat2013, OscarInteractions>>(
798  path, "Dileptons");
799  } else if (!modern_format && !out_par.dil_extended) {
800  return make_unique<OscarOutput<OscarFormat1999, OscarInteractions>>(
801  path, "Dileptons");
802  } else if (!modern_format && out_par.dil_extended) {
803  log.warn() << "Creating Oscar output: "
804  << "There is no extended Oscar1999 (dileptons) format.";
805  }
806  } else if (content == "Photons") {
807  if (modern_format && !out_par.photons_extended) {
808  return make_unique<OscarOutput<OscarFormat2013, OscarInteractions>>(
809  path, "Photons");
810  } else if (modern_format && out_par.photons_extended) {
811  return make_unique<
812  OscarOutput<OscarFormat2013Extended, OscarInteractions>>(path,
813  "Photons");
814  } else if (!modern_format && !out_par.photons_extended) {
815  return make_unique<OscarOutput<OscarFormat1999, OscarInteractions>>(
816  path, "Photons");
817  } else if (!modern_format && out_par.photons_extended) {
818  log.warn() << "Creating Oscar output: "
819  << "There is no extended Oscar1999 (photons) format.";
820  }
821  } else if (content == "Initial_Conditions") {
822  if (modern_format && !out_par.ic_extended) {
823  return make_unique<OscarOutput<OscarFormat2013, OscarParticlesIC>>(
824  path, "SMASH_IC");
825  } else if (modern_format && out_par.ic_extended) {
826  return make_unique<
827  OscarOutput<OscarFormat2013Extended, OscarParticlesIC>>(path,
828  "SMASH_IC");
829  } else if (!modern_format && !out_par.ic_extended) {
830  return make_unique<OscarOutput<OscarFormat1999, OscarParticlesIC>>(
831  path, "SMASH_IC");
832  } else if (!modern_format && out_par.ic_extended) {
833  log.warn()
834  << "Creating Oscar output: "
835  << "There is no extended Oscar1999 (initial conditions) format.";
836  }
837  }
838 
839  throw std::invalid_argument("Create_oscar_output got unknown content.");
840 }
FormattingHelper< T > format(const T &value, const char *unit, int width=-1, int precision=-1)
Acts as a stream modifier for std::ostream to output an object with an optional suffix string and wit...
Definition: logging.h:317
store the state at the end of each event (at_eventend)
Definition: oscaroutput.h:50
std::unique_ptr< T > make_unique(Args &&...args)
Definition for make_unique Is in C++14&#39;s standard library; necessary for older compilers.
Definition: cxx14compat.h:25
store the state after N timesteps (after_Nth_timestep)
Definition: oscaroutput.h:46
store the state at the start of each event (at_eventstart)
Definition: oscaroutput.h:48
std::unique_ptr< OutputInterface > create_select_format(bool modern_format, const bf::path &path, const OutputParameters &out_par, const std::string &name)
Helper function that creates the oscar output with the format selected by create_oscar_output (except...
Definition: oscaroutput.cc:743
store interaction information (write_interaction)
Definition: oscaroutput.h:44

Here is the call graph for this function:

Here is the caller graph for this function: