#include <ESProxyFactoryProducer.h>
Definition at line 76 of file ESProxyFactoryProducer.h.
ESProxyFactoryProducer::ESProxyFactoryProducer |
( |
| ) |
|
Definition at line 39 of file ESProxyFactoryProducer.cc.
std::multimap< eventsetup::EventSetupRecordKey, eventsetup::FactoryInfo > record2Factories_
ESProxyFactoryProducer::~ESProxyFactoryProducer |
( |
| ) |
|
|
overridenoexcept |
template<class TFactory >
void edm::ESProxyFactoryProducer::registerFactory |
( |
std::unique_ptr< TFactory > |
iFactory, |
|
|
const std::string & |
iLabel = std::string() |
|
) |
| |
|
inlineprotected |
- Parameters
-
iFactory | unique_ptr holding a new instance of a Factory |
iLabel | extra string label used to get data (optional) Producer takes ownership of the Factory and uses it create the appropriate Proxy which is then registered with the EventSetup. If used, this method should be called in inheriting class' constructor. |
Definition at line 100 of file ESProxyFactoryProducer.h.
References eostools::move(), AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.
101 std::unique_ptr<eventsetup::ProxyFactoryBase>
temp(iFactory.release());
103 eventsetup::EventSetupRecordKey::makeKey<typename TFactory::record_type>(),
std::move(
temp), iLabel);
virtual void registerFactoryWithKey(const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
Reimplemented in edm::ESProducerLooper.
Definition at line 74 of file ESProxyFactoryProducer.cc.
References Exception, cmsRelvalreport::exit, info(), eostools::move(), record2Factories_, groupFilesInBlocks::temp, and edm::eventsetup::DataProxyProvider::usingRecordWithKey().
Referenced by edm::ESProducerLooper::registerFactoryWithKey().
77 if (
nullptr == iFactory.get()) {
78 assert(
false &&
"Factor pointer was null");
84 std::shared_ptr<ProxyFactoryBase>
temp(iFactory.release());
88 std::pair<Record2Factories::const_iterator, Record2Factories::const_iterator> range =
91 std::find_if(range.first, range.second, [&
info](
const auto& r2f) { return r2f.second.key_ == info.key_; })) {
93 <<
"Producer has been asked to produce " <<
info.key_.type().name() <<
" \"" <<
info.key_.name().value()
94 <<
"\" multiple times.\n Please modify the code.";
void usingRecordWithKey(const EventSetupRecordKey &)
Container::value_type value_type
std::multimap< eventsetup::EventSetupRecordKey, eventsetup::FactoryInfo > record2Factories_
override DataProxyProvider method
Implements edm::eventsetup::DataProxyProvider.
Definition at line 63 of file ESProxyFactoryProducer.cc.
References record2Factories_.
64 typedef Record2Factories::iterator
Iterator;
66 for (Iterator it = range.first; it != range.second; ++it) {
67 std::shared_ptr<DataProxy> proxy(it->second.factory_->makeProxy().release());
68 if (
nullptr != proxy.get()) {
Container::value_type value_type
std::multimap< eventsetup::EventSetupRecordKey, eventsetup::FactoryInfo > record2Factories_