CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ParentageRegistry.cc
Go to the documentation of this file.
2 
3 namespace edm {
4  ParentageRegistry*
6  static ParentageRegistry s_reg;
7  return &s_reg;
8  }
9 
10  bool
12  {
13  auto it = m_map.find(k);
14  bool found = it != m_map.end();
15  if(found) {
16  result = it->second;
17  }
18  return found;
19  }
20 
23  {
24  auto it = m_map.find(k);
25  bool found = it != m_map.end();
26  return found? &(it->second) : static_cast<value_type const*>(nullptr);
27  }
28 
29  bool
31  return m_map.insert(std::make_pair(v.id(),v)).second;
32  }
33 
34  void
36  m_map.clear();
37  }
38 }
void clear()
Not thread safe.
Definition: Hash.h:42
ParentageID id() const
Definition: Parentage.cc:19
bool getMapped(key_type const &k, value_type &result) const
tuple result
Definition: query.py:137
tbb::concurrent_unordered_map< key_type, value_type, key_hash > m_map
static ParentageRegistry * instance()
bool insertMapped(value_type const &v)