CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Registry.cc
Go to the documentation of this file.
1 // ----------------------------------------------------------------------
2 // ----------------------------------------------------------------------
3 
6 
7 
8 namespace edm {
9  namespace pset {
12  ParameterSetID const& psetID = reg->extra().id();
13  if (!psetID.isValid()) {
15  << "Illegal attempt to access the process top level parameter set ID\n"
16  << "before that parameter set has been frozen and registered.\n"
17  << "The parameter set can be changed during module validation,\n"
18  << "which occurs concurrently with module construction.\n"
19  << "It is illegal to access the parameter set before it is frozen.\n";
20  }
21  return psetID;
22  }
23 
24  void fillMap(Registry* reg, regmap_type& fillme) {
25  typedef Registry::const_iterator iter;
26  fillme.clear();
27  // Note: The tracked part is in the registry.
28  for (iter i = reg->begin(), e = reg->end(); i != e; ++i) {
29  fillme[i->first].pset() = i->second.toString();
30  }
31  }
32  } // namespace pset
33 
37 
38  ParameterSet const* result;
39  if (0==(result=reg->getMapped(id))) {
40  throw edm::Exception(errors::EventCorruption, "Unknown ParameterSetID")
41  << "Unable to find the ParameterSet for id: "
42  << id
43  << ";\nthis was supposed to be the process ParameterSet\n";
44  }
45  return *result;
46  }
47 
48 } // namespace edm
49 
int i
Definition: DBlmapReader.cc:9
bool getMapped(key_type const &k, value_type &result) const
std::map< ParameterSetID, ParameterSetBlob > regmap_type
Definition: Registry.h:49
collection_type::const_iterator const_iterator
tuple result
Definition: query.py:137
tuple pset
Definition: CrabTask.py:85
Hash< ParameterSetType > ParameterSetID
ParameterSet const & getProcessParameterSet()
Definition: Registry.cc:34
bool isValid() const
Definition: Hash.h:136
ParameterSetID getProcessParameterSetID(Registry const *reg)
Associated free functions.
Definition: Registry.cc:11
static ThreadSafeRegistry * instance()
void fillMap(Registry *reg, regmap_type &fillme)
Definition: Registry.cc:24