CMS 3D CMS Logo

EDMModuleType.cc
Go to the documentation of this file.
1 #include <string>
2 
7 
8 namespace edm {
9 
11 {
12  auto const & registry = * edm::pset::Registry::instance();
13  auto const & pset = * registry.getMapped(module.parameterSetID());
14 
15  if (not pset.existsAs<std::string>("@module_edm_type"))
17 
18  std::string const & t = pset.getParameter<std::string>("@module_edm_type");
19  for (EDMModuleType v: {
27  }) {
28  if (t == module_type_desc[static_cast<std::underlying_type_t<EDMModuleType>>(v)])
29  return v;
30  }
32 }
33 
34 
36 {
37  return module_type_desc[static_cast<std::underlying_type_t<EDMModuleType>>(edmModuleTypeEnum(module))];
38 }
39 
40 } // namespace edm
EDMModuleType
Definition: EDMModuleType.h:8
constexpr const char * module_type_desc[]
Definition: EDMModuleType.h:20
EDMModuleType edmModuleTypeEnum(edm::ModuleDescription const &module)
HLT enums.
ParameterSetID const & parameterSetID() const
static Interceptor::Registry registry("Interceptor")
Definition: vlib.h:208
const char * edmModuleType(edm::ModuleDescription const &module)
static Registry * instance()
Definition: Registry.cc:12