#include <EventSetupProvider.h>
Public Types | |
typedef std::pair< DataType, DataLabel > | DataKeyInfo |
typedef std::string | DataLabel |
typedef std::string | DataType |
typedef std::map < ComponentDescription, RecordToDataMap > | PreferredProviderInfo |
typedef std::string | RecordName |
typedef std::multimap < RecordName, DataKeyInfo > | RecordToDataMap |
Public Member Functions | |
void | add (boost::shared_ptr< DataProxyProvider >) |
void | add (boost::shared_ptr< EventSetupRecordIntervalFinder >) |
void | addRecordToEventSetup (EventSetupRecord &iRecord) |
void | checkESProducerSharing (EventSetupProvider &precedingESProvider, std::set< ParameterSetIDHolder > &sharingCheckDone, std::map< EventSetupRecordKey, std::vector< ComponentDescription const * > > &referencedESProducers, EventSetupsController &esController) |
void | clearInitializationData () |
bool | doRecordsMatch (EventSetupProvider &precedingESProvider, EventSetupRecordKey const &eventSetupRecordKey, std::map< EventSetupRecordKey, bool > &allComponentsMatch, EventSetupsController const &esController) |
EventSetup const & | eventSetup () const |
EventSetup const & | eventSetupForInstance (IOVSyncValue const &) |
EventSetupProvider (unsigned subProcessIndex=0U, PreferredProviderInfo const *iInfo=0) | |
void | fillReferencedDataKeys (EventSetupRecordKey const &eventSetupRecordKey) |
void | finishConfiguration () |
void | forceCacheClear () |
Used when testing that all code properly updates on IOV changes of all Records. | |
std::set< ComponentDescription > | proxyProviderDescriptions () const |
void | replaceExisting (boost::shared_ptr< DataProxyProvider >) |
void | resetRecordPlusDependentRecords (EventSetupRecordKey const &) |
Used when we need to force a Record to reset all its proxies. | |
void | resetRecordToProxyPointers () |
unsigned | subProcessIndex () const |
virtual | ~EventSetupProvider () |
Static Public Member Functions | |
static void | logInfoWhenSharing (ParameterSet const &iConfiguration) |
Protected Member Functions | |
template<typename T > | |
void | insert (std::auto_ptr< T > iRecordProvider) |
Private Types | |
typedef std::map < EventSetupRecordKey, boost::shared_ptr < EventSetupRecordProvider > > | Providers |
Private Member Functions | |
EventSetupProvider (EventSetupProvider const &) | |
void | insert (EventSetupRecordKey const &, std::auto_ptr< EventSetupRecordProvider >) |
EventSetupProvider const & | operator= (EventSetupProvider const &) |
Private Attributes | |
std::unique_ptr< std::vector < boost::shared_ptr < DataProxyProvider > > > | dataProviders_ |
EventSetup | eventSetup_ |
std::unique_ptr< std::vector < boost::shared_ptr < EventSetupRecordIntervalFinder > > > | finders_ |
bool | mustFinishConfiguration_ |
std::unique_ptr < PreferredProviderInfo > | preferredProviderInfo_ |
Providers | providers_ |
std::unique_ptr< std::map < ParameterSetIDHolder, std::set< EventSetupRecordKey > > > | psetIDToRecordKey_ |
std::unique_ptr< std::set < EventSetupRecordKey > > | recordsWithALooperProxy_ |
std::unique_ptr< std::map < EventSetupRecordKey, std::vector< boost::shared_ptr < EventSetupRecordIntervalFinder > > > > | recordToFinders_ |
std::unique_ptr< std::map < EventSetupRecordKey, std::map< DataKey, ComponentDescription > > > | recordToPreferred_ |
std::unique_ptr< std::map < EventSetupRecordKey, std::map< DataKey, ComponentDescription const * > > > | referencedDataKeys_ |
unsigned | subProcessIndex_ |
Definition at line 50 of file EventSetupProvider.h.
typedef std::pair<DataType, DataLabel> edm::eventsetup::EventSetupProvider::DataKeyInfo |
Definition at line 56 of file EventSetupProvider.h.
typedef std::string edm::eventsetup::EventSetupProvider::DataLabel |
Definition at line 55 of file EventSetupProvider.h.
typedef std::string edm::eventsetup::EventSetupProvider::DataType |
Definition at line 54 of file EventSetupProvider.h.
typedef std::map<ComponentDescription, RecordToDataMap> edm::eventsetup::EventSetupProvider::PreferredProviderInfo |
Definition at line 58 of file EventSetupProvider.h.
typedef std::map<EventSetupRecordKey, boost::shared_ptr<EventSetupRecordProvider> > edm::eventsetup::EventSetupProvider::Providers [private] |
Definition at line 128 of file EventSetupProvider.h.
typedef std::string edm::eventsetup::EventSetupProvider::RecordName |
Definition at line 53 of file EventSetupProvider.h.
typedef std::multimap<RecordName, DataKeyInfo> edm::eventsetup::EventSetupProvider::RecordToDataMap |
Definition at line 57 of file EventSetupProvider.h.
EventSetupProvider::EventSetupProvider | ( | unsigned | subProcessIndex = 0U , |
PreferredProviderInfo const * | iInfo = 0 |
||
) |
Definition at line 48 of file EventSetupProvider.cc.
: eventSetup_(), providers_(), mustFinishConfiguration_(true), subProcessIndex_(subProcessIndex), preferredProviderInfo_((0!=iInfo) ? (new PreferredProviderInfo(*iInfo)): 0), finders_(new std::vector<boost::shared_ptr<EventSetupRecordIntervalFinder> >() ), dataProviders_(new std::vector<boost::shared_ptr<DataProxyProvider> >() ), referencedDataKeys_(new std::map<EventSetupRecordKey, std::map<DataKey, ComponentDescription const*> >), recordToFinders_(new std::map<EventSetupRecordKey, std::vector<boost::shared_ptr<EventSetupRecordIntervalFinder> > >), psetIDToRecordKey_(new std::map<ParameterSetIDHolder, std::set<EventSetupRecordKey> >), recordToPreferred_(new std::map<EventSetupRecordKey, std::map<DataKey, ComponentDescription> >), recordsWithALooperProxy_(new std::set<EventSetupRecordKey>) { }
EventSetupProvider::~EventSetupProvider | ( | ) | [virtual] |
Definition at line 69 of file EventSetupProvider.cc.
{ }
edm::eventsetup::EventSetupProvider::EventSetupProvider | ( | EventSetupProvider const & | ) | [private] |
void EventSetupProvider::add | ( | boost::shared_ptr< DataProxyProvider > | iProvider | ) |
Definition at line 97 of file EventSetupProvider.cc.
References dataProviders_.
Referenced by edm::eventsetup::looper::addFinderTo(), edm::eventsetup::looper::addProviderTo(), edm::eventsetup::addProviderTo(), edm::eventsetup::SourceMakerTraits::addTo(), and edm::eventsetup::ModuleMakerTraits::addTo().
{ assert(&(*iProvider) != 0); dataProviders_->push_back(iProvider); }
void EventSetupProvider::add | ( | boost::shared_ptr< EventSetupRecordIntervalFinder > | iFinder | ) |
Definition at line 115 of file EventSetupProvider.cc.
References finders_.
{ assert(&(*iFinder) != 0); finders_->push_back(iFinder); }
void EventSetupProvider::addRecordToEventSetup | ( | EventSetupRecord & | iRecord | ) |
Definition at line 717 of file EventSetupProvider.cc.
References edm::EventSetup::add(), eventSetup_, and edm::eventsetup::EventSetupRecord::setEventSetup().
Referenced by edm::eventsetup::EventSetupRecordProvider::addRecordTo().
{ iRecord.setEventSetup(&eventSetup_); eventSetup_.add(iRecord); }
void EventSetupProvider::checkESProducerSharing | ( | EventSetupProvider & | precedingESProvider, |
std::set< ParameterSetIDHolder > & | sharingCheckDone, | ||
std::map< EventSetupRecordKey, std::vector< ComponentDescription const * > > & | referencedESProducers, | ||
EventSetupsController & | esController | ||
) |
Definition at line 434 of file EventSetupProvider.cc.
References doRecordsMatch(), reco::get(), edm::eventsetup::EventSetupsController::getESProducerPSet(), edm::eventsetup::EventSetupsController::isFirstMatch(), edm::eventsetup::EventSetupsController::isLastMatch(), combine::key, logInfoWhenSharing(), edm::eventsetup::EventSetupsController::lookForMatches(), edm::match(), providers_, psetIDToRecordKey_, subProcessIndex(), and subProcessIndex_.
{ edm::LogVerbatim("EventSetupSharing") << "EventSetupProvider::checkESProducerSharing: Checking processes with SubProcess Indexes " << subProcessIndex() << " and " << precedingESProvider.subProcessIndex(); if (referencedESProducers.empty()) { for (auto const& recordProvider : providers_) { recordProvider.second->getReferencedESProducers(referencedESProducers); } } // This records whether the configurations of all the DataProxyProviders // and finders matches for a particular pair of processes and // a particular record and also the records it depends on. std::map<EventSetupRecordKey, bool> allComponentsMatch; std::map<ParameterSetID, bool> candidateNotRejectedYet; // Loop over all the ESProducers which have a DataProxy // referenced by any EventSetupRecord in this EventSetupProvider for (auto const& iRecord : referencedESProducers) { for (auto const& iComponent : iRecord.second) { ParameterSetID const& psetID = iComponent->pid_; ParameterSetIDHolder psetIDHolder(psetID); if (sharingCheckDone.find(psetIDHolder) != sharingCheckDone.end()) continue; bool firstProcessWithThisPSet = false; bool precedingHasMatchingPSet = false; esController.lookForMatches(psetID, subProcessIndex_, precedingESProvider.subProcessIndex_, firstProcessWithThisPSet, precedingHasMatchingPSet); if (firstProcessWithThisPSet) { sharingCheckDone.insert(psetIDHolder); allComponentsMatch[iRecord.first] = false; continue; } if (!precedingHasMatchingPSet) { allComponentsMatch[iRecord.first] = false; continue; } // An ESProducer that survives to this point is a candidate. // It was shared with some other process in the first pass where // ESProducers were constructed and one of three possibilities exists: // 1) It should not have been shared and a new ESProducer needs // to be created and the proper pointers set. // 2) It should have been shared with a different preceding process // in which case some pointers need to be modified. // 3) It was originally shared which the correct prior process // in which case nothing needs to be done, but we do need to // do some work to verify that. // Make an entry in a map for each of these ESProducers. We // will set the value to false if and when we determine // the ESProducer cannot be shared between this pair of processes. auto iCandidateNotRejectedYet = candidateNotRejectedYet.find(psetID); if (iCandidateNotRejectedYet == candidateNotRejectedYet.end()) { candidateNotRejectedYet[psetID] = true; iCandidateNotRejectedYet = candidateNotRejectedYet.find(psetID); } // At this point we know that the two processes both // have an ESProducer matching the type and label in // iComponent and also with exactly the same configuration. // And there was not an earlier preceding process // where the same instance of the ESProducer could // have been shared. And this ESProducer was referenced // by the later process's EventSetupRecord (prefered or // or just the only thing that could have made the data). // To determine if sharing is allowed, now we need to // check if all the DataProxyProviders and all the // finders are the same for this record and also for // all records this record depends on. And even // if this is true, we have to wait until the loop // ends because some other DataProxy associated with // the ESProducer could write to a different record where // the same determination will need to be repeated. Only if // all of the the DataProxy's can be shared, can the ESProducer // instance be shared across processes. if (iCandidateNotRejectedYet->second == true) { auto iAllComponentsMatch = allComponentsMatch.find(iRecord.first); if (iAllComponentsMatch == allComponentsMatch.end()) { // We do not know the value in AllComponents yet and // we need it now so we have to do the difficult calculation // now. bool match = doRecordsMatch(precedingESProvider, iRecord.first, allComponentsMatch, esController); allComponentsMatch[iRecord.first] = match; iAllComponentsMatch = allComponentsMatch.find(iRecord.first); } if (!iAllComponentsMatch->second) { iCandidateNotRejectedYet->second = false; } } } // end loop over components used by record } // end loop over records // Loop over candidates for (auto const& candidate : candidateNotRejectedYet) { ParameterSetID const& psetID = candidate.first; bool canBeShared = candidate.second; if (canBeShared) { ParameterSet const& pset = *esController.getESProducerPSet(psetID, subProcessIndex_); logInfoWhenSharing(pset); ParameterSetIDHolder psetIDHolder(psetID); sharingCheckDone.insert(psetIDHolder); if (esController.isFirstMatch(psetID, subProcessIndex_, precedingESProvider.subProcessIndex_)) { continue; // Proper sharing was already done. Nothing more to do. } // Need to reset the pointer from the EventSetupRecordProvider to the // the DataProxyProvider so these two processes share an ESProducer. boost::shared_ptr<DataProxyProvider> dataProxyProvider; std::set<EventSetupRecordKey> const& keysForPSetID1 = (*precedingESProvider.psetIDToRecordKey_)[psetIDHolder]; for (auto const& key : keysForPSetID1) { boost::shared_ptr<EventSetupRecordProvider> const& recordProvider = precedingESProvider.providers_[key]; dataProxyProvider = recordProvider->proxyProvider(psetIDHolder); assert(dataProxyProvider); break; } std::set<EventSetupRecordKey> const& keysForPSetID2 = (*psetIDToRecordKey_)[psetIDHolder]; for (auto const& key : keysForPSetID2) { boost::shared_ptr<EventSetupRecordProvider> const& recordProvider = providers_[key]; recordProvider->resetProxyProvider(psetIDHolder, dataProxyProvider); } } else { if (esController.isLastMatch(psetID, subProcessIndex_, precedingESProvider.subProcessIndex_)) { ParameterSet const& pset = *esController.getESProducerPSet(psetID, subProcessIndex_); ModuleFactory::get()->addTo(esController, *this, pset, true); } } } }
void EventSetupProvider::clearInitializationData | ( | ) |
Definition at line 707 of file EventSetupProvider.cc.
References preferredProviderInfo_, psetIDToRecordKey_, recordsWithALooperProxy_, recordToFinders_, recordToPreferred_, and referencedDataKeys_.
{ preferredProviderInfo_.reset(); referencedDataKeys_.reset(); recordToFinders_.reset(); psetIDToRecordKey_.reset(); recordToPreferred_.reset(); recordsWithALooperProxy_.reset(); }
bool EventSetupProvider::doRecordsMatch | ( | EventSetupProvider & | precedingESProvider, |
EventSetupRecordKey const & | eventSetupRecordKey, | ||
std::map< EventSetupRecordKey, bool > & | allComponentsMatch, | ||
EventSetupsController const & | esController | ||
) |
Definition at line 594 of file EventSetupProvider.cc.
References fillReferencedDataKeys(), edm::eventsetup::EventSetupsController::isMatchingESProducer(), edm::eventsetup::EventSetupsController::isMatchingESSource(), edm::match(), providers_, recordsWithALooperProxy_, recordToFinders_, referencedDataKeys_, findQualityFiles::size, and subProcessIndex_.
Referenced by checkESProducerSharing().
{ // first check if this record matches. If not just return false // then find the directly dependent records and iterate over them // recursively call this function on them. If they return false // set allComponentsMatch to false for them and return false. // if they all return true then set allComponents to true // and return true. if (precedingESProvider.recordsWithALooperProxy_->find(eventSetupRecordKey) != precedingESProvider.recordsWithALooperProxy_->end()) { return false; } if ((*recordToFinders_)[eventSetupRecordKey].size() != (*precedingESProvider.recordToFinders_)[eventSetupRecordKey].size()) { return false; } for (auto const& finder : (*recordToFinders_)[eventSetupRecordKey]) { ParameterSetID const& psetID = finder->descriptionForFinder().pid_; bool itMatches = esController.isMatchingESSource(psetID, subProcessIndex_, precedingESProvider.subProcessIndex_); if (!itMatches) { return false; } } fillReferencedDataKeys(eventSetupRecordKey); precedingESProvider.fillReferencedDataKeys(eventSetupRecordKey); std::map<DataKey, ComponentDescription const*> const& dataItems = (*referencedDataKeys_)[eventSetupRecordKey]; std::map<DataKey, ComponentDescription const*> const& precedingDataItems = (*precedingESProvider.referencedDataKeys_)[eventSetupRecordKey]; if (dataItems.size() != precedingDataItems.size()) { return false; } for (auto const& dataItem : dataItems) { auto precedingDataItem = precedingDataItems.find(dataItem.first); if (precedingDataItem == precedingDataItems.end()) { return false; } if (dataItem.second->pid_ != precedingDataItem->second->pid_) { return false; } // Check that the configurations match exactly for the ESProducers // (We already checked the ESSources above and there should not be // any loopers) if (!dataItem.second->isSource_ && !dataItem.second->isLooper_) { bool itMatches = esController.isMatchingESProducer(dataItem.second->pid_, subProcessIndex_, precedingESProvider.subProcessIndex_); if (!itMatches) { return false; } } } Providers::iterator itFound = providers_.find(eventSetupRecordKey); if (itFound != providers_.end()) { std::set<EventSetupRecordKey> dependentRecords = itFound->second->dependentRecords(); for (auto const& dependentRecord : dependentRecords) { auto iter = allComponentsMatch.find(dependentRecord); if (iter != allComponentsMatch.end()) { if (iter->second) { continue; } else { return false; } } bool match = doRecordsMatch(precedingESProvider, dependentRecord, allComponentsMatch, esController); allComponentsMatch[dependentRecord] = match; if (!match) return false; } } return true; }
EventSetup const& edm::eventsetup::EventSetupProvider::eventSetup | ( | ) | const [inline] |
EventSetup const & EventSetupProvider::eventSetupForInstance | ( | IOVSyncValue const & | iValue | ) |
Definition at line 726 of file EventSetupProvider.cc.
References edm::EventSetup::clear(), eventSetup_, finishConfiguration(), mustFinishConfiguration_, providers_, and edm::EventSetup::setIOVSyncValue().
{ eventSetup_.setIOVSyncValue(iValue); eventSetup_.clear(); // In a cmsRun job this does nothing because the EventSetupsController // will have already called finishConfiguration, but some tests will // call finishConfiguration here. if(mustFinishConfiguration_) { finishConfiguration(); } for(Providers::iterator itProvider = providers_.begin(), itProviderEnd = providers_.end(); itProvider != itProviderEnd; ++itProvider) { itProvider->second->addRecordToIfValid(*this, iValue); } return eventSetup_; }
void EventSetupProvider::fillReferencedDataKeys | ( | EventSetupRecordKey const & | eventSetupRecordKey | ) |
Definition at line 679 of file EventSetupProvider.cc.
References providers_, and referencedDataKeys_.
Referenced by doRecordsMatch().
{ if (referencedDataKeys_->find(eventSetupRecordKey) != referencedDataKeys_->end()) return; auto recordProvider = providers_.find(eventSetupRecordKey); if (recordProvider == providers_.end()) { (*referencedDataKeys_)[eventSetupRecordKey]; return; } if (recordProvider->second) { recordProvider->second->fillReferencedDataKeys((*referencedDataKeys_)[eventSetupRecordKey]); } }
void EventSetupProvider::finishConfiguration | ( | ) |
Definition at line 263 of file EventSetupProvider.cc.
References dataProviders_, edm::eventsetup::determinePreferred(), finders_, insert(), edm::eventsetup::EventSetupRecordProviderFactoryManager::instance(), mustFinishConfiguration_, preferredProviderInfo_, providers_, psetIDToRecordKey_, recordsWithALooperProxy_, recordToFinders_, recordToPreferred_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by eventSetupForInstance().
{ //we delayed adding finders to the system till here so that everything would be loaded first recordToFinders_->clear(); for(std::vector<boost::shared_ptr<EventSetupRecordIntervalFinder> >::iterator itFinder=finders_->begin(), itEnd = finders_->end(); itFinder != itEnd; ++itFinder) { typedef std::set<EventSetupRecordKey> Keys; const Keys recordsUsing = (*itFinder)->findingForRecords(); for(Keys::const_iterator itKey = recordsUsing.begin(), itKeyEnd = recordsUsing.end(); itKey != itKeyEnd; ++itKey) { (*recordToFinders_)[*itKey].push_back(*itFinder); Providers::iterator itFound = providers_.find(*itKey); if(providers_.end() == itFound) { //create a provider for this record insert(*itKey, EventSetupRecordProviderFactoryManager::instance().makeRecordProvider(*itKey)); itFound = providers_.find(*itKey); } itFound->second->addFinder(*itFinder); } } //we've transfered our ownership so this is no longer needed finders_.reset(); //Now handle providers since sources can also be finders and the sources can delay registering // their Records and therefore could delay setting up their Proxies psetIDToRecordKey_->clear(); typedef std::set<EventSetupRecordKey> Keys; for(std::vector<boost::shared_ptr<DataProxyProvider> >::iterator itProvider=dataProviders_->begin(), itEnd = dataProviders_->end(); itProvider != itEnd; ++itProvider) { ParameterSetIDHolder psetID((*itProvider)->description().pid_); const Keys recordsUsing = (*itProvider)->usingRecords(); for(Keys::const_iterator itKey = recordsUsing.begin(), itKeyEnd = recordsUsing.end(); itKey != itKeyEnd; ++itKey) { if ((*itProvider)->description().isLooper_) { recordsWithALooperProxy_->insert(*itKey); } (*psetIDToRecordKey_)[psetID].insert(*itKey); Providers::iterator itFound = providers_.find(*itKey); if(providers_.end() == itFound) { //create a provider for this record insert(*itKey, EventSetupRecordProviderFactoryManager::instance().makeRecordProvider(*itKey)); itFound = providers_.find(*itKey); } itFound->second->add(*itProvider); } } dataProviders_.reset(); //used for the case where no preferred Providers have been specified for the Record static const EventSetupRecordProvider::DataToPreferredProviderMap kEmptyMap; *recordToPreferred_ = determinePreferred(preferredProviderInfo_.get(),providers_); //For each Provider, find all the Providers it depends on. If a dependent Provider // can not be found pass in an empty list //CHANGE: now allow for missing Providers for(Providers::iterator itProvider = providers_.begin(), itProviderEnd = providers_.end(); itProvider != itProviderEnd; ++itProvider) { const EventSetupRecordProvider::DataToPreferredProviderMap* preferredInfo = &kEmptyMap; RecordToPreferred::const_iterator itRecordFound = recordToPreferred_->find(itProvider->first); if(itRecordFound != recordToPreferred_->end()) { preferredInfo = &(itRecordFound->second); } //Give it our list of preferred itProvider->second->usePreferred(*preferredInfo); std::set<EventSetupRecordKey> records = itProvider->second->dependentRecords(); if(records.size() != 0) { std::string missingRecords; std::vector<boost::shared_ptr<EventSetupRecordProvider> > depProviders; depProviders.reserve(records.size()); bool foundAllProviders = true; for(std::set<EventSetupRecordKey>::iterator itRecord = records.begin(), itRecordEnd = records.end(); itRecord != itRecordEnd; ++itRecord) { Providers::iterator itFound = providers_.find(*itRecord); if(itFound == providers_.end()) { foundAllProviders = false; if(missingRecords.size() == 0) { missingRecords = itRecord->name(); } else { missingRecords += ", "; missingRecords += itRecord->name(); } //break; } else { depProviders.push_back(itFound->second); } } if(!foundAllProviders) { edm::LogInfo("EventSetupDependency")<<"The EventSetup record "<<itProvider->second->key().name() <<" depends on at least one Record \n ("<<missingRecords<<") which is not present in the job." "\n This may lead to an exception begin thrown during event processing.\n If no exception occurs during the job than it is usually safe to ignore this message."; //depProviders.clear(); //NOTE: should provide a warning } itProvider->second->setDependentProviders(depProviders); } } mustFinishConfiguration_ = false; }
void EventSetupProvider::forceCacheClear | ( | ) |
Used when testing that all code properly updates on IOV changes of all Records.
Definition at line 424 of file EventSetupProvider.cc.
References providers_.
{ for(Providers::iterator it=providers_.begin(), itEnd = providers_.end(); it != itEnd; ++it) { it->second->resetProxies(); } }
void edm::eventsetup::EventSetupProvider::insert | ( | std::auto_ptr< T > | iRecordProvider | ) | [inline, protected] |
Definition at line 111 of file EventSetupProvider.h.
References edm::eventsetup::heterocontainer::makeKey(), and groupFilesInBlocks::temp.
Referenced by finishConfiguration().
{ std::auto_ptr<EventSetupRecordProvider> temp(iRecordProvider.release()); insert(eventsetup::heterocontainer::makeKey< typename T::RecordType, eventsetup::EventSetupRecordKey>(), temp); }
void EventSetupProvider::insert | ( | EventSetupRecordKey const & | iKey, |
std::auto_ptr< EventSetupRecordProvider > | iProvider | ||
) | [private] |
Definition at line 89 of file EventSetupProvider.cc.
References providers_, and groupFilesInBlocks::temp.
{ boost::shared_ptr<EventSetupRecordProvider> temp(iProvider.release()); providers_[iKey] = temp; //temp->addRecordTo(*this); }
void EventSetupProvider::logInfoWhenSharing | ( | ParameterSet const & | iConfiguration | ) | [static] |
Definition at line 785 of file EventSetupProvider.cc.
References edm::ParameterSet::getParameter(), diffTwoXMLs::label, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by checkESProducerSharing().
{ std::string edmtype = iConfiguration.getParameter<std::string>("@module_edm_type"); std::string modtype = iConfiguration.getParameter<std::string>("@module_type"); std::string label = iConfiguration.getParameter<std::string>("@module_label"); edm::LogVerbatim("EventSetupSharing") << "Sharing " << edmtype << ": class=" << modtype << " label='" << label << "'"; }
EventSetupProvider const& edm::eventsetup::EventSetupProvider::operator= | ( | EventSetupProvider const & | ) | [private] |
std::set< ComponentDescription > EventSetupProvider::proxyProviderDescriptions | ( | ) | const |
Definition at line 759 of file EventSetupProvider.cc.
References dataProviders_, edm::for_all(), providers_, edm::eventsetup::EventSetupRecordProvider::proxyProviderDescriptions(), and edm::second().
{ using boost::bind; typedef std::set<ComponentDescription> Set; Set descriptions; for_all(providers_, bind(InsertAll(descriptions), bind(&EventSetupRecordProvider::proxyProviderDescriptions, bind(&Providers::value_type::second,_1)))); if(dataProviders_.get()) { for(std::vector<boost::shared_ptr<DataProxyProvider> >::const_iterator it = dataProviders_->begin(), itEnd = dataProviders_->end(); it != itEnd; ++it) { descriptions.insert((*it)->description()); } } return descriptions; }
void EventSetupProvider::replaceExisting | ( | boost::shared_ptr< DataProxyProvider > | dataProxyProvider | ) |
Definition at line 104 of file EventSetupProvider.cc.
References combine::key, and providers_.
Referenced by edm::eventsetup::ModuleMakerTraits::replaceExisting().
{ ParameterSetIDHolder psetID(dataProxyProvider->description().pid_); std::set<EventSetupRecordKey> const& keysForPSetID = (*psetIDToRecordKey_)[psetID]; for (auto const& key : keysForPSetID) { boost::shared_ptr<EventSetupRecordProvider> const& recordProvider = providers_[key]; recordProvider->resetProxyProvider(psetID, dataProxyProvider); } }
void EventSetupProvider::resetRecordPlusDependentRecords | ( | EventSetupRecordKey const & | iKey | ) |
Used when we need to force a Record to reset all its proxies.
Definition at line 404 of file EventSetupProvider.cc.
References edm::eventsetup::findDependents(), edm::for_all(), providers_, and edm::eventsetup::EventSetupRecordProvider::resetProxies().
Referenced by edm::EDLooperBase::prepareForNextLoop().
{ Providers::iterator itFind = providers_.find(iKey); if(itFind == providers_.end()) { return; } std::vector<boost::shared_ptr<EventSetupRecordProvider> > dependents; findDependents(iKey, providers_.begin(), providers_.end(), dependents); dependents.erase(std::unique(dependents.begin(),dependents.end()), dependents.end()); itFind->second->resetProxies(); for_all(dependents, boost::bind(&EventSetupRecordProvider::resetProxies, _1)); }
void EventSetupProvider::resetRecordToProxyPointers | ( | ) |
Definition at line 694 of file EventSetupProvider.cc.
References providers_, and recordToPreferred_.
{ for (auto const& recordProvider : providers_) { static const EventSetupRecordProvider::DataToPreferredProviderMap kEmptyMap; const EventSetupRecordProvider::DataToPreferredProviderMap* preferredInfo = &kEmptyMap; RecordToPreferred::const_iterator itRecordFound = recordToPreferred_->find(recordProvider.first); if(itRecordFound != recordToPreferred_->end()) { preferredInfo = &(itRecordFound->second); } recordProvider.second->resetRecordToProxyPointers(*preferredInfo); } }
unsigned edm::eventsetup::EventSetupProvider::subProcessIndex | ( | ) | const [inline] |
Definition at line 104 of file EventSetupProvider.h.
References subProcessIndex_.
Referenced by checkESProducerSharing().
{ return subProcessIndex_; }
std::unique_ptr<std::vector<boost::shared_ptr<DataProxyProvider> > > edm::eventsetup::EventSetupProvider::dataProviders_ [private] |
Definition at line 137 of file EventSetupProvider.h.
Referenced by add(), finishConfiguration(), and proxyProviderDescriptions().
Definition at line 127 of file EventSetupProvider.h.
Referenced by addRecordToEventSetup(), eventSetup(), and eventSetupForInstance().
std::unique_ptr<std::vector<boost::shared_ptr<EventSetupRecordIntervalFinder> > > edm::eventsetup::EventSetupProvider::finders_ [private] |
Definition at line 136 of file EventSetupProvider.h.
Referenced by add(), and finishConfiguration().
Definition at line 130 of file EventSetupProvider.h.
Referenced by eventSetupForInstance(), and finishConfiguration().
std::unique_ptr<PreferredProviderInfo> edm::eventsetup::EventSetupProvider::preferredProviderInfo_ [private] |
Definition at line 135 of file EventSetupProvider.h.
Referenced by clearInitializationData(), and finishConfiguration().
Definition at line 129 of file EventSetupProvider.h.
Referenced by checkESProducerSharing(), doRecordsMatch(), eventSetupForInstance(), fillReferencedDataKeys(), finishConfiguration(), forceCacheClear(), insert(), proxyProviderDescriptions(), replaceExisting(), resetRecordPlusDependentRecords(), and resetRecordToProxyPointers().
std::unique_ptr<std::map<ParameterSetIDHolder, std::set<EventSetupRecordKey> > > edm::eventsetup::EventSetupProvider::psetIDToRecordKey_ [private] |
Definition at line 140 of file EventSetupProvider.h.
Referenced by checkESProducerSharing(), clearInitializationData(), and finishConfiguration().
std::unique_ptr<std::set<EventSetupRecordKey> > edm::eventsetup::EventSetupProvider::recordsWithALooperProxy_ [private] |
Definition at line 142 of file EventSetupProvider.h.
Referenced by clearInitializationData(), doRecordsMatch(), and finishConfiguration().
std::unique_ptr<std::map<EventSetupRecordKey, std::vector<boost::shared_ptr<EventSetupRecordIntervalFinder> > > > edm::eventsetup::EventSetupProvider::recordToFinders_ [private] |
Definition at line 139 of file EventSetupProvider.h.
Referenced by clearInitializationData(), doRecordsMatch(), and finishConfiguration().
std::unique_ptr<std::map<EventSetupRecordKey, std::map<DataKey, ComponentDescription> > > edm::eventsetup::EventSetupProvider::recordToPreferred_ [private] |
Definition at line 141 of file EventSetupProvider.h.
Referenced by clearInitializationData(), finishConfiguration(), and resetRecordToProxyPointers().
std::unique_ptr<std::map<EventSetupRecordKey, std::map<DataKey, ComponentDescription const*> > > edm::eventsetup::EventSetupProvider::referencedDataKeys_ [private] |
Definition at line 138 of file EventSetupProvider.h.
Referenced by clearInitializationData(), doRecordsMatch(), and fillReferencedDataKeys().
unsigned edm::eventsetup::EventSetupProvider::subProcessIndex_ [private] |
Definition at line 131 of file EventSetupProvider.h.
Referenced by checkESProducerSharing(), doRecordsMatch(), and subProcessIndex().