20#include "BDSException.hh"
21#include "BDSOutputType.hh"
22#include "BDSUtilities.hh"
32 new std::map<BDSOutputType,std::string> ({
33 {BDSOutputType::none,
"none"},
34 {BDSOutputType::rootevent,
"rootevent"}
39 std::map<G4String, BDSOutputType> types;
40 types[
"none"] = BDSOutputType::none;
41 types[
"rootevent"] = BDSOutputType::rootevent;
45 auto result = types.find(outputType);
46 if (result == types.end())
48 G4String msg =
"\"" + outputType +
"\" is not a valid output format\n";
49 msg +=
"Available output formats are:\n";
50 for (
const auto& it : types)
51 {msg +=
"\"" + it.first +
"\"\n";}
56 G4cout << __METHOD_NAME__ <<
"determined format \"" << outputType <<
"\" to be " << result->first << G4endl;
58 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.