CMS 3D CMS Logo

getProducerParameterSet.cc
Go to the documentation of this file.
2 
11 
12 #include <string>
13 
14 namespace edm {
15 
17  const std::shared_ptr<BranchDescription const>& branchDescription = provenance.constBranchDescriptionPtr();
18 
19  if (branchDescription) {
20  std::string const& process = branchDescription->processName();
21  std::string const& label = branchDescription->moduleLabel();
22 
23  for (ProcessConfiguration const& pc : processHistory) {
24  if (pc.processName() == process) {
25  ParameterSetID const& psetID = pc.parameterSetID();
26  pset::Registry const* psetRegistry = pset::Registry::instance();
27  ParameterSet const* processPset = psetRegistry->getMapped(psetID);
28  if (processPset) {
29  return &processPset->getParameterSet(label);
30  }
31  }
32  }
33  }
34  // This should never happen
35  throw cms::Exception("LogicError") << "getProducerParameterSet failed";
36  return nullptr;
37  }
38 } // namespace edm
bool getMapped(key_type const &k, value_type &result) const
Definition: Registry.cc:17
Definition: Hash.h:43
ParameterSet const & getParameterSet(std::string const &) const
char const * label
ParameterSet const * getProducerParameterSet(Provenance const &provenance, ProcessHistory const &)
HLT enums.
static Registry * instance()
Definition: Registry.cc:12