#include <ThreadSafeRegistry.h>
Public Types | |
typedef std::map< key_type, value_type > | collection_type |
typedef KEY | key_type |
typedef collection_type::size_type | size_type |
typedef T | value_type |
typedef std::vector< value_type > | vector_type |
Public Member Functions | |
bool | empty () const |
Return true if there are no contained value_type objects. More... | |
bool | getMapped (key_type const &k, value_type &result) const |
value_type const * | getMapped (key_type const &k) const |
void | insertCollection (collection_type const &c) |
void | insertCollection (vector_type const &c) |
bool | insertMapped (value_type const &v) |
bool | notEmpty () const |
Return true if there are any contained value_type objects. More... | |
ThreadSafeRegistry< KEY, T > & | operator= (ThreadSafeRegistry< KEY, T > const &)=delete |
void | print (std::ostream &os) const |
Print the contents of this registry to the given ostream. More... | |
size_type | size () const |
Return the number of contained value_type objects. More... | |
ThreadSafeRegistry (ThreadSafeRegistry< KEY, T > const &)=delete | |
Static Public Member Functions | |
static ThreadSafeRegistry * | instance () |
Private Member Functions | |
ThreadSafeRegistry () | |
~ThreadSafeRegistry () | |
Private Attributes | |
collection_type | data_ |
std::mutex | mutex_ |
Definition at line 34 of file ThreadSafeRegistry.h.
typedef std::map<key_type, value_type> edm::detail::ThreadSafeRegistry< KEY, T >::collection_type |
Definition at line 38 of file ThreadSafeRegistry.h.
typedef KEY edm::detail::ThreadSafeRegistry< KEY, T >::key_type |
Definition at line 36 of file ThreadSafeRegistry.h.
typedef collection_type::size_type edm::detail::ThreadSafeRegistry< KEY, T >::size_type |
Definition at line 39 of file ThreadSafeRegistry.h.
typedef T edm::detail::ThreadSafeRegistry< KEY, T >::value_type |
Definition at line 37 of file ThreadSafeRegistry.h.
typedef std::vector<value_type> edm::detail::ThreadSafeRegistry< KEY, T >::vector_type |
Definition at line 41 of file ThreadSafeRegistry.h.
|
delete |
|
private |
Definition at line 143 of file ThreadSafeRegistry.h.
|
private |
Definition at line 146 of file ThreadSafeRegistry.h.
|
inline |
Return true if there are no contained value_type objects.
Definition at line 117 of file ThreadSafeRegistry.h.
bool edm::detail::ThreadSafeRegistry< KEY, T >::getMapped | ( | key_type const & | k, |
value_type & | result | ||
) | const |
Retrieve the value_type object with the given key. If we return 'true', then 'result' carries the value_type object. If we return 'false, no matching key was found, and the value of 'result' is undefined.
Referenced by HLTConfigProvider::getDataFrom().
value_type const* edm::detail::ThreadSafeRegistry< KEY, T >::getMapped | ( | key_type const & | k | ) | const |
Retrieve a pointer to the value_type object with the given key. If there is no object associated with the given key 0 is returned.
void edm::detail::ThreadSafeRegistry< KEY, T >::insertCollection | ( | collection_type const & | c | ) |
put the value_type objects in the given collection into the registry.
Definition at line 103 of file ThreadSafeRegistry.h.
References HltBtagPostValidation_cff::c, and B2GTnPMonitor_cfi::item.
void edm::detail::ThreadSafeRegistry< KEY, T >::insertCollection | ( | vector_type const & | c | ) |
Definition at line 110 of file ThreadSafeRegistry.h.
References HltBtagPostValidation_cff::c, and B2GTnPMonitor_cfi::item.
template bool edm::detail::ThreadSafeRegistry< KEY, T >::insertMapped | ( | value_type const & | v | ) |
Insert the given value_type object into the registry. If there was already a value_type object with the same key, we don't change it. This should be OK, since it should have the same contents if the key is the same. Return 'true' if we really added the new value_type object, and 'false' if the value_type object was already present.
Referenced by HLTConfigProvider::getDataFrom().
|
static |
Referenced by HLTConfigProvider::getDataFrom().
|
inline |
Return true if there are any contained value_type objects.
Definition at line 123 of file ThreadSafeRegistry.h.
References relativeConstraints::empty.
|
delete |
void edm::detail::ThreadSafeRegistry< KEY, T >::print | ( | std::ostream & | os | ) | const |
Print the contents of this registry to the given ostream.
Definition at line 134 of file ThreadSafeRegistry.h.
References B2GTnPMonitor_cfi::item, and findQualityFiles::size.
|
inline |
Return the number of contained value_type objects.
Definition at line 128 of file ThreadSafeRegistry.h.
Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().
|
private |
Definition at line 93 of file ThreadSafeRegistry.h.
|
mutableprivate |
Definition at line 92 of file ThreadSafeRegistry.h.