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

Functions

template<int Contents>
std::unique_ptr< OutputInterfacecreate_selected_format (const std::filesystem::path &path, const std::string &name, bool modern_format, bool extended_format, bool custom_format, const std::vector< std::string > &quantities)
 Helper function that creates the oscar output with the format selected by create_oscar_output. More...
 

Function Documentation

◆ create_selected_format()

template<int Contents>
std::unique_ptr<OutputInterface> smash::anonymous_namespace{oscaroutput.cc}::create_selected_format ( const std::filesystem::path &  path,
const std::string &  name,
bool  modern_format,
bool  extended_format,
bool  custom_format,
const std::vector< std::string > &  quantities 
)

Helper function that creates the oscar output with the format selected by create_oscar_output.

Template Parameters
ContentsDetermines what information will be written to the output
Parameters
[in]pathPath of output
[in]name(File)name of ouput
[in]modern_formatUse the 1999 or 2013 format
[in]extended_formatWhether the format is extended
[in]custom_formatWhether the output has user-defined quantities
[in]quantitiesThe user-defined quantities
Returns
Unique pointer to oscar output

Definition at line 890 of file oscaroutput.cc.

893  {
894  if (custom_format) {
895  return std::make_unique<OscarOutput<ASCII, Contents>>(path, name,
896  quantities);
897  } else {
898  if (modern_format && extended_format) {
899  return std::make_unique<OscarOutput<OscarFormat2013Extended, Contents>>(
900  path, name);
901  } else if (modern_format && !extended_format) {
902  return std::make_unique<OscarOutput<OscarFormat2013, Contents>>(path,
903  name);
904  } else if (!modern_format && !extended_format) {
905  return std::make_unique<OscarOutput<OscarFormat1999, Contents>>(path,
906  name);
907  } else {
908  // Only remaining possibility: (!modern_format && extended_format)
909  logg[LOutput].warn() << "There is no extended Oscar1999 format, creating "
910  "a regular Oscar1999 output instead.";
911  return std::make_unique<OscarOutput<OscarFormat1999, Contents>>(path,
912  name);
913  }
914  }
915 }
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:40
static constexpr int LOutput