#include <FWCore/Framework/interface/ESProxyFactoryProducer.h>
Public Member Functions | ||||
ESProxyFactoryProducer () | ||||
virtual void | newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) | |||
overrides DataProxyProvider method | ||||
virtual | ~ESProxyFactoryProducer () | |||
Protected Member Functions | ||||
template<class TFactory> | ||||
void | registerFactory (TFactory *iFactory, const std::string &iLabel=std::string()) | |||
| ||||
template<class TFactory> | ||||
void | registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string()) | |||
| ||||
virtual void | registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string()) | |||
virtual void | registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) | |||
override DataProxyProvider method | ||||
Private Member Functions | ||||
ESProxyFactoryProducer (const ESProxyFactoryProducer &) | ||||
const ESProxyFactoryProducer & | operator= (const ESProxyFactoryProducer &) | |||
Private Attributes | ||||
std::multimap < eventsetup::EventSetupRecordKey, eventsetup::FactoryInfo > | record2Factories_ |
Definition at line 78 of file ESProxyFactoryProducer.h.
ESProxyFactoryProducer::ESProxyFactoryProducer | ( | ) |
Definition at line 38 of file ESProxyFactoryProducer.cc.
00038 : record2Factories_() 00039 { 00040 }
ESProxyFactoryProducer::~ESProxyFactoryProducer | ( | ) | [virtual] |
edm::ESProxyFactoryProducer::ESProxyFactoryProducer | ( | const ESProxyFactoryProducer & | ) | [private] |
void ESProxyFactoryProducer::newInterval | ( | const eventsetup::EventSetupRecordKey & | iRecordType, | |
const ValidityInterval & | iInterval | |||
) | [virtual] |
overrides DataProxyProvider method
Implements edm::eventsetup::DataProxyProvider.
Definition at line 117 of file ESProxyFactoryProducer.cc.
00119 { 00120 invalidateProxies(iRecordType); 00121 }
const ESProxyFactoryProducer& edm::ESProxyFactoryProducer::operator= | ( | const ESProxyFactoryProducer & | ) | [private] |
void edm::ESProxyFactoryProducer::registerFactory | ( | TFactory * | iFactory, | |
const std::string & | iLabel = std::string() | |||
) | [inline, protected] |
iFactory | pointer to 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 121 of file ESProxyFactoryProducer.h.
References registerFactory(), and pyDBSRunClass::temp.
00122 { 00123 std::auto_ptr<TFactory> temp(iFactory); 00124 registerFactory(temp,iLabel); 00125 }
void edm::ESProxyFactoryProducer::registerFactory | ( | std::auto_ptr< TFactory > | iFactory, | |
const std::string & | iLabel = std::string() | |||
) | [inline, protected] |
iFactory | auto_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 106 of file ESProxyFactoryProducer.h.
References registerFactoryWithKey(), and pyDBSRunClass::temp.
Referenced by registerFactory(), and edm::ESProducer::registerProduct().
00107 { 00108 std::auto_ptr<eventsetup::ProxyFactoryBase> temp(iFactory.release()); 00109 registerFactoryWithKey( 00110 eventsetup::EventSetupRecordKey::makeKey<typename TFactory::record_type>(), 00111 temp, 00112 iLabel); 00113 }
virtual void edm::ESProxyFactoryProducer::registerFactoryWithKey | ( | const eventsetup::EventSetupRecordKey & | iRecord, | |
std::auto_ptr< eventsetup::ProxyFactoryBase > & | iFactory, | |||
const std::string & | iLabel = std::string() | |||
) | [protected, virtual] |
void ESProxyFactoryProducer::registerProxies | ( | const eventsetup::EventSetupRecordKey & | iRecord, | |
KeyedProxies & | aProxyList | |||
) | [protected, virtual] |
override DataProxyProvider method
Definition at line 67 of file ESProxyFactoryProducer.cc.
00069 { 00070 typedef Record2Factories::iterator Iterator; 00071 std::pair< Iterator, Iterator > range = record2Factories_.equal_range(iRecord); 00072 for(Iterator it = range.first; it != range.second; ++it) { 00073 00074 boost::shared_ptr<DataProxy> proxy(it->second.factory_->makeProxy().release()); 00075 if(0 != proxy.get()) { 00076 iProxies.push_back(KeyedProxies::value_type((*it).second.key_, 00077 proxy)); 00078 } 00079 } 00080 }
std::multimap< eventsetup::EventSetupRecordKey, eventsetup::FactoryInfo > edm::ESProxyFactoryProducer::record2Factories_ [private] |
Definition at line 138 of file ESProxyFactoryProducer.h.