2#include "SimCore/Geo/ParserFactory.h"
5#include "Framework/Exception/Exception.h"
8#include "SimCore/Geo/GDMLParser.h"
9#include "SimCore/Geo/Parser.h"
22 parser_map[name] = create;
28 auto it{parser_map.find(name)};
29 if (it == parser_map.end())
30 EXCEPTION_RAISE(
"ParserNotFound",
"The parser " + name +
" was not found.");
32 return it->second(parameters, ci);
Class encapsulating parameters for configuring a processor.
Handle to the conditions system, provided at construction to classes which require it.
static Parser * create(framework::config::Parameters ¶meters, simcore::ConditionsInterface &ci)
Create an instance of this parser.
void registerParser(const std::string &name, createFunc create)
Register the parser with this factory.
Parser * createParser(const std::string &name, framework::config::Parameters ¶meters, simcore::ConditionsInterface &ci)
Create an instance of the parser of the given type.
static ParserFactory & getInstance()
Get the instance to this factory.
ParserFactory()
Default constructor.
Interface for a parser used to load a geometry into Geant4.