25 using namespace edm::eventsetup;
35 unsigned int iovIndex) {
37 using Iterator = Record2Factories::iterator;
39 for (
Iterator it = range.first; it != range.second; ++it) {
40 std::shared_ptr<DataProxy>
proxy(it->second.factory_->makeProxy(iovIndex).release());
41 if (
nullptr !=
proxy.get()) {
42 keyedProxiesVector.emplace_back((*it).second.key_,
proxy);
45 return keyedProxiesVector;
49 std::unique_ptr<ProxyFactoryBase> iFactory,
51 if (
nullptr == iFactory.get()) {
52 assert(
false &&
"Factor pointer was null");
58 std::shared_ptr<ProxyFactoryBase>
temp(iFactory.release());
62 std::pair<Record2Factories::const_iterator, Record2Factories::const_iterator>
range =
65 std::find_if(range.first, range.second, [&
info](
const auto& r2f) {
return r2f.second.key_ ==
info.key_; })) {
67 <<
"Producer has been asked to produce " <<
info.key_.type().name() <<
" \"" <<
info.key_.name().value()
68 <<
"\" multiple times.\n Please modify the code.";
void usingRecordWithKey(const EventSetupRecordKey &key)
virtual void registerFactoryWithKey(const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
KeyedProxiesVector registerProxies(const EventSetupRecordKey &, unsigned int iovIndex) override
const uint16_t range(const Frame &aFrame)
Container::value_type value_type
~ESProxyFactoryProducer() noexcept(false) override
std::multimap< EventSetupRecordKey, eventsetup::FactoryInfo > record2Factories_
std::multimap< EventSetupRecordKey, FactoryInfo > Record2Factories
std::vector< std::pair< DataKey, std::shared_ptr< DataProxy >>> KeyedProxiesVector