Version: SMASH-2.0
smash::anonymous_namespace{oscaroutput.cc} Namespace Reference

Functions

template<int Contents>
std::unique_ptr< OutputInterfacecreate_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 for dileptons and photons). More...
 

Function Documentation

◆ create_select_format()

template<int Contents>
std::unique_ptr<OutputInterface> smash::anonymous_namespace{oscaroutput.cc}::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 for dileptons and photons).

Template Parameters
ContentsDetermines what infomration will be written to the output
Parameters
[in]modern_formatUse the 1999 or 2013 format
[in]pathPath of output
[in]out_parOutput parameters that hold the output configuration
[in]name(File)name of ouput
Returns
Unique pointer to oscar output

Definition at line 748 of file oscaroutput.cc.

750  {
751  bool extended_format = (Contents & OscarInteractions) ? out_par.coll_extended
752  : out_par.part_extended;
753  if (modern_format && extended_format) {
754  return make_unique<OscarOutput<OscarFormat2013Extended, Contents>>(path,
755  name);
756  } else if (modern_format && !extended_format) {
757  return make_unique<OscarOutput<OscarFormat2013, Contents>>(path, name);
758  } else if (!modern_format && !extended_format) {
759  return make_unique<OscarOutput<OscarFormat1999, Contents>>(path, name);
760  } else {
761  // Only remaining possibility: (!modern_format && extended_format)
762  logg[LOutput].warn() << "Creating Oscar output: "
763  << "There is no extended Oscar1999 format.";
764  return make_unique<OscarOutput<OscarFormat1999, Contents>>(path, name);
765  }
766 }
Here is the caller graph for this function:
smash::LOutput
static constexpr int LOutput
Definition: oscaroutput.cc:23
smash::logg
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:39
smash::OscarInteractions
store interaction information (write_interaction)
Definition: oscaroutput.h:44