19#include "BDSException.hh"
20#include "BDSOutputType.hh"
21#include "BDSUtilities.hh"
31 new std::map<BDSOutputType,std::string> ({
32 {BDSOutputType::none,
"none"},
33 {BDSOutputType::rootevent,
"rootevent"}
38 std::map<G4String, BDSOutputType> types;
39 types[
"none"] = BDSOutputType::none;
40 types[
"rootevent"] = BDSOutputType::rootevent;
44 auto result = types.find(outputType);
45 if (result == types.end())
47 G4String msg =
"\"" + outputType +
"\" is not a valid output format\n";
48 msg +=
"Available output formats are:\n";
49 for (
const auto& it : types)
50 {msg +=
"\"" + it.first +
"\"\n";}
55 G4cout << __METHOD_NAME__ <<
"determined format \"" << outputType <<
"\" to be " << result->first << G4endl;
57 return result->second;
General exception with possible name of object and message.
static std::map< BDSTypeSafeEnum< outputformats_def, int >, std::string > * dictionary
BDSOutputType DetermineOutputType(G4String outputType)
Determine the output format to be used from the input string.
G4String LowerCase(const G4String &str)
Utility function to simplify lots of syntax changes for pedantic g4 changes.