17 [[cms::thread_safe]]
static Registry s_reg;
23 auto it =
m_map.find(k);
33 auto it =
m_map.find(k);
35 return found? &(it->second) : static_cast<value_type const*>(
nullptr);
40 return m_map.insert(std::make_pair(v.
id(),
v)).second;
52 for (
auto const& item :
m_map) {
53 fillme[item.first].pset() = item.second.toString();
59 os <<
"Registry with " <<
size() <<
" entries\n";
60 for(
auto const& item : *
this) {
61 os << item.first <<
" " << item.second <<
'\n';
67 std::lock_guard<std::mutex> guard(
s_mutex);
70 <<
"Illegal attempt to access the process top level parameter set ID\n"
71 <<
"before that parameter set has been frozen and registered.\n"
72 <<
"The parameter set can be changed during module validation,\n"
73 <<
"which occurs concurrently with module construction.\n"
74 <<
"It is illegal to access the parameter set before it is frozen.\n";
94 <<
"Illegal attempt to access the process top level parameter set ID\n"
95 <<
"before that parameter set has been frozen and registered.\n"
96 <<
"The parameter set can be changed during module validation,\n"
97 <<
"which occurs concurrently with module construction.\n"
98 <<
"It is illegal to access the parameter set before it is frozen.\n";
103 if (
nullptr == (result = reg.
getMapped(p))) {
105 <<
"Unable to find the ParameterSet for id: "
107 <<
";\nthis was supposed to be the process ParameterSet\n";
ParameterSetID getProcessParameterSetID()
static boost::mutex mutex
ParameterSetID id() const
std::map< ParameterSetID, ParameterSetBlob > regmap_type
static std::mutex s_mutex
void clear()
Not thread safe.
bool getMapped(key_type const &k, value_type &result) const
void setProcessParameterSetID(ParameterSetID const &id)
Associated free functions.
static ParameterSetID s_ProcessParameterSetID
ParameterSet const & getProcessParameterSet()
void print(std::ostream &os) const
bool insertMapped(value_type const &v)
void fillMap(regmap_type &fillme) const
static Registry * instance()