15 #include "tbb/concurrent_unordered_map.h"
32 typedef tbb::concurrent_unordered_map<edm::ParameterSetID, edm::TriggerNames, key_hash> TriggerNamesMap;
33 [[cms::thread_safe]]
static TriggerNamesMap triggerNamesMap;
52 TriggerNamesMap::const_iterator iter =
54 if (iter != triggerNamesMap.end()) {
64 if (pset->
existsAs<std::vector<std::string> >(
"@trigger_paths",
true)) {
68 if (triggerNames.
size() != triggerResults.
size()) {
70 <<
"edm::EventBase::triggerNames_ Encountered vector\n"
71 "of trigger names and a TriggerResults object with\n"
72 "different sizes. This should be impossible.\n"
73 "Please send information to reproduce this problem to\n"
74 "the edm developers.\n";
77 std::pair<TriggerNamesMap::iterator, bool>
ret =
79 return &(ret.first->second);
90 if (triggerNames.
size() != triggerResults.
size()) {
92 <<
"edm::EventBase::triggerNames_ Encountered vector\n"
93 "of trigger names and a TriggerResults object with\n"
94 "different sizes. This should be impossible.\n"
95 "Please send information to reproduce this problem to\n"
96 "the edm developers (2).\n";
99 std::pair<TriggerNamesMap::iterator, bool>
ret =
100 triggerNamesMap.insert(std::pair<edm::ParameterSetID, edm::TriggerNames>(fakePset.
id(),
triggerNames));
101 return &(ret.first->second);
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
ParameterSetID id() const
Strings::size_type size() const
const std::vector< std::string > & getTriggerNames() const
Obsolete.
unsigned int size() const
Get number of paths stored.
void addParameter(std::string const &name, T const &value)
bool getMapped(key_type const &k, value_type &result) const
static TriggerNames const * triggerNames_(edm::TriggerResults const &triggerResults)
static std::string const triggerResults("TriggerResults")
size_t smallHash() const
returns a short hash which can be used with hashing containers
virtual TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const =0
ParameterSet const & registerIt()
const ParameterSetID & parameterSetID() const
Get stored parameter set id.
static Registry * instance()