CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
edm::eventsetup::EventSetupProvider Class Reference

#include <EventSetupProvider.h>

Public Types

typedef std::pair< DataType, DataLabelDataKeyInfo
 
typedef std::string DataLabel
 
typedef std::string DataType
 
typedef std::map< ComponentDescription, RecordToDataMapPreferredProviderInfo
 
typedef std::string RecordName
 
typedef std::multimap< RecordName, DataKeyInfoRecordToDataMap
 

Public Member Functions

void add (std::shared_ptr< DataProxyProvider >)
 
void add (std::shared_ptr< EventSetupRecordIntervalFinder >)
 
void addRecord (const EventSetupRecordKey &iKey)
 Intended for use only in tests. More...
 
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)
 
bool doWeNeedToWaitForIOVsToFinish (IOVSyncValue const &) const
 
std::shared_ptr< const EventSetupImpleventSetupForInstance (IOVSyncValue const &, bool &newEventSetupImpl)
 
EventSetupImpl const & eventSetupImpl () const
 
 EventSetupProvider (ActivityRegistry const *, unsigned subProcessIndex=0U, PreferredProviderInfo const *iInfo=nullptr)
 
 EventSetupProvider (EventSetupProvider const &)=delete
 
void fillKeys (std::set< EventSetupRecordKey > &keys) const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
void fillReferencedDataKeys (EventSetupRecordKey const &eventSetupRecordKey)
 
void finishConfiguration (NumberOfConcurrentIOVs const &, bool &hasNonconcurrentFinder)
 
void forceCacheClear ()
 Used when testing that all code properly updates on IOV changes of all Records. More...
 
EventSetupProvider const & operator= (EventSetupProvider const &)=delete
 
std::set< ComponentDescriptionproxyProviderDescriptions () const
 
ESRecordsToProxyIndices recordsToProxyIndices () const
 
void replaceExisting (std::shared_ptr< DataProxyProvider >)
 
void resetRecordPlusDependentRecords (EventSetupRecordKey const &)
 Used when we need to force a Record to reset all its proxies. More...
 
void resetRecordToProxyPointers ()
 
void setAllValidityIntervals (const IOVSyncValue &iValue)
 Set the validity intervals in all EventSetupRecordProviders. More...
 
void setPreferredProviderInfo (PreferredProviderInfo const &iInfo)
 
unsigned subProcessIndex () const
 
EventSetupRecordProvidertryToGetRecordProvider (const EventSetupRecordKey &iKey)
 
 ~EventSetupProvider ()
 

Static Public Member Functions

static void logInfoWhenSharing (ParameterSet const &iConfiguration)
 

Private Types

using RecordKeys = std::vector< EventSetupRecordKey >
 
using RecordProviders = std::vector< std::shared_ptr< EventSetupRecordProvider > >
 

Private Member Functions

void determinePreferred ()
 
void insert (EventSetupRecordKey const &, std::unique_ptr< EventSetupRecordProvider >)
 
std::shared_ptr< EventSetupRecordProvider > & recordProvider (const EventSetupRecordKey &iKey)
 

Private Attributes

ActivityRegistry const * activityRegistry_
 
std::unique_ptr< std::vector< std::shared_ptr< DataProxyProvider > > > dataProviders_
 
propagate_const< std::shared_ptr< EventSetupImpl > > eventSetupImpl_
 
std::unique_ptr< std::vector< std::shared_ptr< EventSetupRecordIntervalFinder > > > finders_
 
bool mustFinishConfiguration_
 
std::unique_ptr< PreferredProviderInfopreferredProviderInfo_
 
std::unique_ptr< std::map< ParameterSetIDHolder, std::set< EventSetupRecordKey > > > psetIDToRecordKey_
 
RecordKeys recordKeys_
 
RecordProviders recordProviders_
 
std::unique_ptr< std::set< EventSetupRecordKey > > recordsWithALooperProxy_
 
std::unique_ptr< std::map< EventSetupRecordKey, std::vector< std::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_
 

Detailed Description

Description: Factory for a EventSetup

Usage: <usage>

Definition at line 49 of file EventSetupProvider.h.

Member Typedef Documentation

◆ DataKeyInfo

Definition at line 54 of file EventSetupProvider.h.

◆ DataLabel

Definition at line 53 of file EventSetupProvider.h.

◆ DataType

Definition at line 52 of file EventSetupProvider.h.

◆ PreferredProviderInfo

Definition at line 56 of file EventSetupProvider.h.

◆ RecordKeys

Definition at line 130 of file EventSetupProvider.h.

◆ RecordName

Definition at line 51 of file EventSetupProvider.h.

◆ RecordProviders

Definition at line 133 of file EventSetupProvider.h.

◆ RecordToDataMap

Definition at line 55 of file EventSetupProvider.h.

Constructor & Destructor Documentation

◆ EventSetupProvider() [1/2]

edm::eventsetup::EventSetupProvider::EventSetupProvider ( ActivityRegistry const *  activityRegistry,
unsigned  subProcessIndex = 0U,
PreferredProviderInfo const *  iInfo = nullptr 
)

Definition at line 40 of file EventSetupProvider.cc.

43  : activityRegistry_(activityRegistry),
46  preferredProviderInfo_((nullptr != iInfo) ? (new PreferredProviderInfo(*iInfo)) : nullptr),
47  finders_(new std::vector<std::shared_ptr<EventSetupRecordIntervalFinder>>()),
48  dataProviders_(new std::vector<std::shared_ptr<DataProxyProvider>>()),
49  referencedDataKeys_(new std::map<EventSetupRecordKey, std::map<DataKey, ComponentDescription const*>>),
51  new std::map<EventSetupRecordKey, std::vector<std::shared_ptr<EventSetupRecordIntervalFinder>>>),
52  psetIDToRecordKey_(new std::map<ParameterSetIDHolder, std::set<EventSetupRecordKey>>),
53  recordToPreferred_(new std::map<EventSetupRecordKey, std::map<DataKey, ComponentDescription>>),
54  recordsWithALooperProxy_(new std::set<EventSetupRecordKey>) {}

◆ EventSetupProvider() [2/2]

edm::eventsetup::EventSetupProvider::EventSetupProvider ( EventSetupProvider const &  )
delete

◆ ~EventSetupProvider()

edm::eventsetup::EventSetupProvider::~EventSetupProvider ( )

Definition at line 56 of file EventSetupProvider.cc.

56 { forceCacheClear(); }

References forceCacheClear().

Member Function Documentation

◆ add() [1/2]

void edm::eventsetup::EventSetupProvider::add ( std::shared_ptr< DataProxyProvider iProvider)

◆ add() [2/2]

void edm::eventsetup::EventSetupProvider::add ( std::shared_ptr< EventSetupRecordIntervalFinder iFinder)

Definition at line 102 of file EventSetupProvider.cc.

102  {
103  assert(iFinder.get() != nullptr);
104  finders_->push_back(iFinder);
105  }

References cms::cuda::assert(), and finders_.

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ addRecord()

void edm::eventsetup::EventSetupProvider::addRecord ( const EventSetupRecordKey iKey)

Intended for use only in tests.

Definition at line 736 of file EventSetupProvider.cc.

736  {
737  insert(iKey, std::unique_ptr<EventSetupRecordProvider>());
738  eventSetupImpl_->setKeyIters(recordKeys_.begin(), recordKeys_.end());
739  }

References eventSetupImpl_, insert(), and recordKeys_.

◆ checkESProducerSharing()

void edm::eventsetup::EventSetupProvider::checkESProducerSharing ( EventSetupProvider precedingESProvider,
std::set< ParameterSetIDHolder > &  sharingCheckDone,
std::map< EventSetupRecordKey, std::vector< ComponentDescription const * >> &  referencedESProducers,
EventSetupsController esController 
)

Definition at line 392 of file EventSetupProvider.cc.

396  {
397  edm::LogVerbatim("EventSetupSharing")
398  << "EventSetupProvider::checkESProducerSharing: Checking processes with SubProcess Indexes "
399  << subProcessIndex() << " and " << precedingESProvider.subProcessIndex();
400 
401  if (referencedESProducers.empty()) {
402  for (auto& recProvider : recordProviders_) {
403  recProvider->getReferencedESProducers(referencedESProducers);
404  }
405  }
406 
407  // This records whether the configurations of all the DataProxyProviders
408  // and finders matches for a particular pair of processes and
409  // a particular record and also the records it depends on.
410  std::map<EventSetupRecordKey, bool> allComponentsMatch;
411 
412  std::map<ParameterSetID, bool> candidateNotRejectedYet;
413 
414  // Loop over all the ESProducers which have a DataProxy
415  // referenced by any EventSetupRecord in this EventSetupProvider
416  for (auto const& iRecord : referencedESProducers) {
417  for (auto const& iComponent : iRecord.second) {
418  ParameterSetID const& psetID = iComponent->pid_;
419  ParameterSetIDHolder psetIDHolder(psetID);
420  if (sharingCheckDone.find(psetIDHolder) != sharingCheckDone.end())
421  continue;
422 
423  bool firstProcessWithThisPSet = false;
424  bool precedingHasMatchingPSet = false;
425 
426  esController.lookForMatches(psetID,
428  precedingESProvider.subProcessIndex_,
429  firstProcessWithThisPSet,
430  precedingHasMatchingPSet);
431 
432  if (firstProcessWithThisPSet) {
433  sharingCheckDone.insert(psetIDHolder);
434  allComponentsMatch[iRecord.first] = false;
435  continue;
436  }
437 
438  if (!precedingHasMatchingPSet) {
439  allComponentsMatch[iRecord.first] = false;
440  continue;
441  }
442 
443  // An ESProducer that survives to this point is a candidate.
444  // It was shared with some other process in the first pass where
445  // ESProducers were constructed and one of three possibilities exists:
446  // 1) It should not have been shared and a new ESProducer needs
447  // to be created and the proper pointers set.
448  // 2) It should have been shared with a different preceding process
449  // in which case some pointers need to be modified.
450  // 3) It was originally shared which the correct prior process
451  // in which case nothing needs to be done, but we do need to
452  // do some work to verify that.
453  // Make an entry in a map for each of these ESProducers. We
454  // will set the value to false if and when we determine
455  // the ESProducer cannot be shared between this pair of processes.
456  auto iCandidateNotRejectedYet = candidateNotRejectedYet.find(psetID);
457  if (iCandidateNotRejectedYet == candidateNotRejectedYet.end()) {
458  candidateNotRejectedYet[psetID] = true;
459  iCandidateNotRejectedYet = candidateNotRejectedYet.find(psetID);
460  }
461 
462  // At this point we know that the two processes both
463  // have an ESProducer matching the type and label in
464  // iComponent and also with exactly the same configuration.
465  // And there was not an earlier preceding process
466  // where the same instance of the ESProducer could
467  // have been shared. And this ESProducer was referenced
468  // by the later process's EventSetupRecord (preferred or
469  // or just the only thing that could have made the data).
470  // To determine if sharing is allowed, now we need to
471  // check if all the DataProxyProviders and all the
472  // finders are the same for this record and also for
473  // all records this record depends on. And even
474  // if this is true, we have to wait until the loop
475  // ends because some other DataProxy associated with
476  // the ESProducer could write to a different record where
477  // the same determination will need to be repeated. Only if
478  // all of the the DataProxy's can be shared, can the ESProducer
479  // instance be shared across processes.
480 
481  if (iCandidateNotRejectedYet->second == true) {
482  auto iAllComponentsMatch = allComponentsMatch.find(iRecord.first);
483  if (iAllComponentsMatch == allComponentsMatch.end()) {
484  // We do not know the value in AllComponents yet and
485  // we need it now so we have to do the difficult calculation
486  // now.
487  bool match = doRecordsMatch(precedingESProvider, iRecord.first, allComponentsMatch, esController);
488  allComponentsMatch[iRecord.first] = match;
489  iAllComponentsMatch = allComponentsMatch.find(iRecord.first);
490  }
491  if (!iAllComponentsMatch->second) {
492  iCandidateNotRejectedYet->second = false;
493  }
494  }
495  } // end loop over components used by record
496  } // end loop over records
497 
498  // Loop over candidates
499  for (auto const& candidate : candidateNotRejectedYet) {
500  ParameterSetID const& psetID = candidate.first;
501  bool canBeShared = candidate.second;
502  if (canBeShared) {
503  ParameterSet const& pset = *esController.getESProducerPSet(psetID, subProcessIndex_);
505  ParameterSetIDHolder psetIDHolder(psetID);
506  sharingCheckDone.insert(psetIDHolder);
507  if (esController.isFirstMatch(psetID, subProcessIndex_, precedingESProvider.subProcessIndex_)) {
508  continue; // Proper sharing was already done. Nothing more to do.
509  }
510 
511  // Need to reset the pointer from the EventSetupRecordProvider to the
512  // the DataProxyProvider so these two processes share an ESProducer.
513 
514  std::shared_ptr<DataProxyProvider> dataProxyProvider;
515  std::set<EventSetupRecordKey> const& keysForPSetID1 = (*precedingESProvider.psetIDToRecordKey_)[psetIDHolder];
516  for (auto const& key : keysForPSetID1) {
517  dataProxyProvider = precedingESProvider.recordProvider(key)->proxyProvider(psetIDHolder);
518  assert(dataProxyProvider);
519  break;
520  }
521 
522  std::set<EventSetupRecordKey> const& keysForPSetID2 = (*psetIDToRecordKey_)[psetIDHolder];
523  for (auto const& key : keysForPSetID2) {
524  recordProvider(key)->resetProxyProvider(psetIDHolder, dataProxyProvider);
525  }
526  } else {
527  if (esController.isLastMatch(psetID, subProcessIndex_, precedingESProvider.subProcessIndex_)) {
528  ParameterSet const& pset = *esController.getESProducerPSet(psetID, subProcessIndex_);
529  ModuleFactory::get()->addTo(esController, *this, pset, true);
530  }
531  }
532  }
533  }

References cms::cuda::assert(), doRecordsMatch(), edm::eventsetup::ComponentFactory< T >::get(), edm::eventsetup::EventSetupsController::getESProducerPSet(), edm::eventsetup::EventSetupsController::isFirstMatch(), edm::eventsetup::EventSetupsController::isLastMatch(), crabWrapper::key, logInfoWhenSharing(), edm::eventsetup::EventSetupsController::lookForMatches(), edm::match(), muonDTDigis_cfi::pset, psetIDToRecordKey_, recordProvider(), recordProviders_, subProcessIndex(), and subProcessIndex_.

◆ clearInitializationData()

void edm::eventsetup::EventSetupProvider::clearInitializationData ( )

◆ determinePreferred()

void edm::eventsetup::EventSetupProvider::determinePreferred ( )
private

Definition at line 157 of file EventSetupProvider.cc.

157  {
158  using namespace edm::eventsetup;
160  for (auto const& itInfo : *preferredProviderInfo_) {
161  if (itInfo.second.empty()) {
162  //want everything
164  } else {
165  for (auto const& itRecData : itInfo.second) {
166  std::string recordName = itRecData.first;
168  if (recordKey.type() == eventsetup::EventSetupRecordKey::TypeTag()) {
169  throw cms::Exception("ESPreferUnknownRecord")
170  << "Unknown record \"" << recordName
171  << "\" used in es_prefer statement for type=" << itInfo.first.type_ << " label=\""
172  << itInfo.first.label_ << "\"\n Please check spelling.";
173  //record not found
174  }
175  //See if the ProxyProvider provides something for this Record
176  EventSetupRecordProvider& recordProviderForKey = *recordProvider(recordKey);
177 
178  std::set<ComponentDescription> components = recordProviderForKey.proxyProviderDescriptions();
179  std::set<ComponentDescription>::iterator itProxyProv = components.find(itInfo.first);
180  if (itProxyProv == components.end()) {
181  throw cms::Exception("ESPreferWrongRecord")
182  << "The type=" << itInfo.first.type_ << " label=\"" << itInfo.first.label_
183  << "\" does not provide data for the Record " << recordName;
184  }
185  //Does it data type exist?
186  eventsetup::TypeTag datumType = eventsetup::TypeTag::findType(itRecData.second.first);
187  if (datumType == eventsetup::TypeTag()) {
188  //not found
189  throw cms::Exception("ESPreferWrongDataType")
190  << "The es_prefer statement for type=" << itInfo.first.type_ << " label=\"" << itInfo.first.label_
191  << "\" has the unknown data type \"" << itRecData.second.first << "\""
192  << "\n Please check spelling";
193  }
194  eventsetup::DataKey datumKey(datumType, itRecData.second.second.c_str());
195 
196  //Does the proxyprovider make this?
197  std::shared_ptr<DataProxyProvider> proxyProv = recordProviderForKey.proxyProvider(*itProxyProv);
198  unsigned int iovIndex = 0; // Doesn't matter which index is picked, at least 1 should always exist
199  const DataProxyProvider::KeyedProxies& keyedProxies = proxyProv->keyedProxies(recordKey, iovIndex);
200  if (!keyedProxies.contains(datumKey)) {
201  throw cms::Exception("ESPreferWrongData")
202  << "The es_prefer statement for type=" << itInfo.first.type_ << " label=\"" << itInfo.first.label_
203  << "\" specifies the data item \n"
204  << " type=\"" << itRecData.second.first << "\" label=\"" << itRecData.second.second << "\""
205  << " which is not provided. Please check spelling.";
206  }
207 
209  (*recordToPreferred_)[recordKey];
210  //has another provider already been specified?
211  if (dataToProviderMap.end() != dataToProviderMap.find(datumKey)) {
212  EventSetupRecordProvider::DataToPreferredProviderMap::iterator itFind =
213  dataToProviderMap.find(datumKey);
214  throw cms::Exception("ESPreferConflict")
215  << "Two providers have been set to be preferred for\n"
216  << datumKey.type().name() << " \"" << datumKey.name().value() << "\""
217  << "\n the providers are "
218  << "\n 1) type=" << itFind->second.type_ << " label=\"" << itFind->second.label_ << "\""
219  << "\n 2) type=" << itProxyProv->type_ << " label=\"" << itProxyProv->label_ << "\""
220  << "\nPlease modify configuration so only one is preferred";
221  }
222  dataToProviderMap.insert(std::make_pair(datumKey, *itProxyProv));
223  }
224  }
225  }
226  }
227  }

References makeMuonMisalignmentScenario::components, edm::eventsetup::DataProxyProvider::KeyedProxies::contains(), Exception, edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::eventsetup::preferEverything(), preferredProviderInfo_, edm::eventsetup::EventSetupRecordProvider::proxyProvider(), edm::eventsetup::EventSetupRecordProvider::proxyProviderDescriptions(), align_cfg::recordName, recordProvider(), recordProviders_, recordToPreferred_, AlCaHLTBitMon_QueryRunRegistry::string, and edm::eventsetup::EventSetupRecordKey::type().

Referenced by finishConfiguration().

◆ doRecordsMatch()

bool edm::eventsetup::EventSetupProvider::doRecordsMatch ( EventSetupProvider precedingESProvider,
EventSetupRecordKey const &  eventSetupRecordKey,
std::map< EventSetupRecordKey, bool > &  allComponentsMatch,
EventSetupsController const &  esController 
)

Definition at line 535 of file EventSetupProvider.cc.

538  {
539  // first check if this record matches. If not just return false
540 
541  // then find the directly dependent records and iterate over them
542  // recursively call this function on them. If they return false
543  // set allComponentsMatch to false for them and return false.
544  // if they all return true then set allComponents to true
545  // and return true.
546 
547  if (precedingESProvider.recordsWithALooperProxy_->find(eventSetupRecordKey) !=
548  precedingESProvider.recordsWithALooperProxy_->end()) {
549  return false;
550  }
551 
552  if ((*recordToFinders_)[eventSetupRecordKey].size() !=
553  (*precedingESProvider.recordToFinders_)[eventSetupRecordKey].size()) {
554  return false;
555  }
556 
557  for (auto const& finder : (*recordToFinders_)[eventSetupRecordKey]) {
558  ParameterSetID const& psetID = finder->descriptionForFinder().pid_;
559  bool itMatches =
560  esController.isMatchingESSource(psetID, subProcessIndex_, precedingESProvider.subProcessIndex_);
561  if (!itMatches) {
562  return false;
563  }
564  }
565 
566  fillReferencedDataKeys(eventSetupRecordKey);
567  precedingESProvider.fillReferencedDataKeys(eventSetupRecordKey);
568 
569  std::map<DataKey, ComponentDescription const*> const& dataItems = (*referencedDataKeys_)[eventSetupRecordKey];
570 
571  std::map<DataKey, ComponentDescription const*> const& precedingDataItems =
572  (*precedingESProvider.referencedDataKeys_)[eventSetupRecordKey];
573 
574  if (dataItems.size() != precedingDataItems.size()) {
575  return false;
576  }
577 
578  for (auto const& dataItem : dataItems) {
579  auto precedingDataItem = precedingDataItems.find(dataItem.first);
580  if (precedingDataItem == precedingDataItems.end()) {
581  return false;
582  }
583  if (dataItem.second->pid_ != precedingDataItem->second->pid_) {
584  return false;
585  }
586  // Check that the configurations match exactly for the ESProducers
587  // (We already checked the ESSources above and there should not be
588  // any loopers)
589  if (!dataItem.second->isSource_ && !dataItem.second->isLooper_) {
590  bool itMatches = esController.isMatchingESProducer(
591  dataItem.second->pid_, subProcessIndex_, precedingESProvider.subProcessIndex_);
592  if (!itMatches) {
593  return false;
594  }
595  }
596  }
597  EventSetupRecordProvider* recProvider = tryToGetRecordProvider(eventSetupRecordKey);
598  if (recProvider != nullptr) {
599  std::set<EventSetupRecordKey> dependentRecords = recProvider->dependentRecords();
600  for (auto const& dependentRecord : dependentRecords) {
601  auto iter = allComponentsMatch.find(dependentRecord);
602  if (iter != allComponentsMatch.end()) {
603  if (iter->second) {
604  continue;
605  } else {
606  return false;
607  }
608  }
609  bool match = doRecordsMatch(precedingESProvider, dependentRecord, allComponentsMatch, esController);
610  allComponentsMatch[dependentRecord] = match;
611  if (!match)
612  return false;
613  }
614  }
615  return true;
616  }

References edm::eventsetup::EventSetupRecordProvider::dependentRecords(), fillReferencedDataKeys(), HLT_2018_cff::finder, edm::eventsetup::EventSetupsController::isMatchingESProducer(), edm::eventsetup::EventSetupsController::isMatchingESSource(), edm::match(), recordsWithALooperProxy_, recordToFinders_, referencedDataKeys_, findQualityFiles::size, subProcessIndex_, and tryToGetRecordProvider().

Referenced by checkESProducerSharing().

◆ doWeNeedToWaitForIOVsToFinish()

bool edm::eventsetup::EventSetupProvider::doWeNeedToWaitForIOVsToFinish ( IOVSyncValue const &  iValue) const

Definition at line 710 of file EventSetupProvider.cc.

710  {
711  for (auto& recProvider : recordProviders_) {
712  if (recProvider->doWeNeedToWaitForIOVsToFinish(iValue)) {
713  return true;
714  }
715  }
716  return false;
717  }

References recordProviders_.

◆ eventSetupForInstance()

std::shared_ptr< const EventSetupImpl > edm::eventsetup::EventSetupProvider::eventSetupForInstance ( IOVSyncValue const &  iValue,
bool &  newEventSetupImpl 
)

Definition at line 671 of file EventSetupProvider.cc.

672  {
673  using IntervalStatus = EventSetupRecordProvider::IntervalStatus;
674 
675  // It is important to understand that eventSetupForInstance is a function
676  // where only one call is executing at a time (not multiple calls running
677  // concurrently). These calls are made in the order determined by the
678  // InputSource. One invocation completes and returns before another starts.
679 
680  bool needNewEventSetupImpl = false;
681  if (eventSetupImpl_.get() == nullptr) {
682  needNewEventSetupImpl = true;
683  } else {
684  for (auto& recProvider : recordProviders_) {
685  if (recProvider->intervalStatus() == IntervalStatus::Invalid) {
686  if (eventSetupImpl_->validRecord(recProvider->key())) {
687  needNewEventSetupImpl = true;
688  }
689  } else {
690  if (recProvider->newIntervalForAnySubProcess()) {
691  needNewEventSetupImpl = true;
692  }
693  }
694  }
695  }
696 
697  if (needNewEventSetupImpl) {
698  //cannot use make_shared because constructor is private
699  eventSetupImpl_ = std::shared_ptr<EventSetupImpl>(new EventSetupImpl);
700  newEventSetupImpl = true;
701  eventSetupImpl_->setKeyIters(recordKeys_.begin(), recordKeys_.end());
702 
703  for (auto& recProvider : recordProviders_) {
704  recProvider->setEventSetupImpl(eventSetupImpl_.get());
705  }
706  }
708  }

References eventSetupImpl_, edm::get_underlying_safe(), Invalid, recordKeys_, and recordProviders_.

◆ eventSetupImpl()

EventSetupImpl const& edm::eventsetup::EventSetupProvider::eventSetupImpl ( ) const
inline

Definition at line 77 of file EventSetupProvider.h.

77 { return *eventSetupImpl_; }

References eventSetupImpl_.

◆ fillKeys()

void edm::eventsetup::EventSetupProvider::fillKeys ( std::set< EventSetupRecordKey > &  keys) const

Definition at line 745 of file EventSetupProvider.cc.

745  {
746  for (auto const& recProvider : recordProviders_) {
747  keys.insert(recProvider->key());
748  }
749  }

References relativeConstraints::keys, and recordProviders_.

◆ fillRecordsNotAllowingConcurrentIOVs()

void edm::eventsetup::EventSetupProvider::fillRecordsNotAllowingConcurrentIOVs ( std::set< EventSetupRecordKey > &  recordsNotAllowingConcurrentIOVs) const

Definition at line 651 of file EventSetupProvider.cc.

652  {
653  for (auto const& dataProxyProvider : *dataProviders_) {
654  dataProxyProvider->fillRecordsNotAllowingConcurrentIOVs(recordsNotAllowingConcurrentIOVs);
655  }
656  }

References dataProviders_.

Referenced by edm::eventsetup::NumberOfConcurrentIOVs::fillRecordsNotAllowingConcurrentIOVs().

◆ fillReferencedDataKeys()

void edm::eventsetup::EventSetupProvider::fillReferencedDataKeys ( EventSetupRecordKey const &  eventSetupRecordKey)

Definition at line 618 of file EventSetupProvider.cc.

618  {
619  if (referencedDataKeys_->find(eventSetupRecordKey) != referencedDataKeys_->end())
620  return;
621 
622  EventSetupRecordProvider* recProvider = tryToGetRecordProvider(eventSetupRecordKey);
623  if (recProvider == nullptr) {
624  (*referencedDataKeys_)[eventSetupRecordKey];
625  return;
626  }
627  recProvider->fillReferencedDataKeys((*referencedDataKeys_)[eventSetupRecordKey]);
628  }

References edm::eventsetup::EventSetupRecordProvider::fillReferencedDataKeys(), referencedDataKeys_, and tryToGetRecordProvider().

Referenced by doRecordsMatch().

◆ finishConfiguration()

void edm::eventsetup::EventSetupProvider::finishConfiguration ( NumberOfConcurrentIOVs const &  numberOfConcurrentIOVs,
bool &  hasNonconcurrentFinder 
)

Definition at line 229 of file EventSetupProvider.cc.

230  {
231  //we delayed adding finders to the system till here so that everything would be loaded first
232  recordToFinders_->clear();
233  for (auto& finder : *finders_) {
234  if (!finder->concurrentFinder()) {
235  hasNonconcurrentFinder = true;
236  }
237 
238  const std::set<EventSetupRecordKey> recordsUsing = finder->findingForRecords();
239 
240  for (auto const& key : recordsUsing) {
241  (*recordToFinders_)[key].push_back(finder);
242 
244  if (recProvider == nullptr) {
245  bool printInfoMsg = true;
246  unsigned int nConcurrentIOVs = numberOfConcurrentIOVs.numberOfConcurrentIOVs(key, printInfoMsg);
247 
248  //create a provider for this record
249  insert(key, std::make_unique<EventSetupRecordProvider>(key, activityRegistry_, nConcurrentIOVs));
250  recProvider = tryToGetRecordProvider(key);
251  }
252  recProvider->addFinder(finder);
253  }
254  }
255  //we've transfered our ownership so this is no longer needed
256  finders_.reset();
257 
258  //Now handle providers since sources can also be finders and the sources can delay registering
259  // their Records and therefore could delay setting up their Proxies
260  psetIDToRecordKey_->clear();
261  for (auto& dataProxyProvider : *dataProviders_) {
262  ParameterSetIDHolder psetID(dataProxyProvider->description().pid_);
263 
264  const std::set<EventSetupRecordKey> recordsUsing = dataProxyProvider->usingRecords();
265  for (auto const& key : recordsUsing) {
266  unsigned int nConcurrentIOVs = numberOfConcurrentIOVs.numberOfConcurrentIOVs(key);
267  dataProxyProvider->createKeyedProxies(key, nConcurrentIOVs);
268 
269  if (dataProxyProvider->description().isLooper_) {
270  recordsWithALooperProxy_->insert(key);
271  }
272 
273  (*psetIDToRecordKey_)[psetID].insert(key);
274 
276  if (recProvider == nullptr) {
277  bool printInfoMsg = true;
278  nConcurrentIOVs = numberOfConcurrentIOVs.numberOfConcurrentIOVs(key, printInfoMsg);
279  //create a provider for this record
280  insert(key, std::make_unique<EventSetupRecordProvider>(key, activityRegistry_, nConcurrentIOVs));
281  recProvider = tryToGetRecordProvider(key);
282  }
283  recProvider->add(dataProxyProvider);
284  }
285  }
286 
287  //used for the case where no preferred Providers have been specified for the Record
289 
291 
292  //For each Provider, find all the Providers it depends on. If a dependent Provider
293  // can not be found pass in an empty list
294  //CHANGE: now allow for missing Providers
295  for (auto& itRecordProvider : recordProviders_) {
296  const EventSetupRecordProvider::DataToPreferredProviderMap* preferredInfo = &kEmptyMap;
297  RecordToPreferred::const_iterator itRecordFound = recordToPreferred_->find(itRecordProvider->key());
298  if (itRecordFound != recordToPreferred_->end()) {
299  preferredInfo = &(itRecordFound->second);
300  }
301  //Give it our list of preferred
302  itRecordProvider->usePreferred(*preferredInfo);
303 
304  std::set<EventSetupRecordKey> records = itRecordProvider->dependentRecords();
305  if (!records.empty()) {
306  std::string missingRecords;
307  std::vector<std::shared_ptr<EventSetupRecordProvider>> depProviders;
308  depProviders.reserve(records.size());
309  bool foundAllProviders = true;
310  for (auto const& key : records) {
311  auto lb = std::lower_bound(recordKeys_.begin(), recordKeys_.end(), key);
312  if (lb == recordKeys_.end() || key != *lb) {
313  foundAllProviders = false;
314  if (missingRecords.empty()) {
315  missingRecords = key.name();
316  } else {
317  missingRecords += ", ";
318  missingRecords += key.name();
319  }
320  } else {
321  auto index = std::distance(recordKeys_.begin(), lb);
322  depProviders.push_back(recordProviders_[index]);
323  }
324  }
325 
326  if (!foundAllProviders) {
327  edm::LogInfo("EventSetupDependency")
328  << "The EventSetup record " << itRecordProvider->key().name() << " depends on at least one Record \n ("
329  << missingRecords
330  << ") which is not present in the job."
331  "\n This may lead to an exception begin thrown during event processing.\n If no exception occurs "
332  "during the job than it is usually safe to ignore this message.";
333 
334  //depProviders.clear();
335  //NOTE: should provide a warning
336  }
337 
338  itRecordProvider->setDependentProviders(depProviders);
339  }
340  }
341 
343  for (auto& provider : *dataProviders_) {
344  provider->updateLookup(indices);
345  }
346  dataProviders_.reset();
347 
348  mustFinishConfiguration_ = false;
349  }

References activityRegistry_, edm::eventsetup::EventSetupRecordProvider::add(), edm::eventsetup::EventSetupRecordProvider::addFinder(), dataProviders_, determinePreferred(), HLT_2018_cff::distance, HLT_2018_cff::finder, finders_, bTagCombinedSVVariables_cff::indices, insert(), crabWrapper::key, cuda_std::lower_bound(), mustFinishConfiguration_, edm::eventsetup::NumberOfConcurrentIOVs::numberOfConcurrentIOVs(), psetIDToRecordKey_, recordKeys_, recordProviders_, recordsToProxyIndices(), recordsWithALooperProxy_, recordToFinders_, recordToPreferred_, AlCaHLTBitMon_QueryRunRegistry::string, and tryToGetRecordProvider().

◆ forceCacheClear()

void edm::eventsetup::EventSetupProvider::forceCacheClear ( )

Used when testing that all code properly updates on IOV changes of all Records.

Definition at line 384 of file EventSetupProvider.cc.

384  {
385  for (auto& recProvider : recordProviders_) {
386  if (recProvider) {
387  recProvider->resetProxies();
388  }
389  }
390  }

References recordProviders_.

Referenced by ~EventSetupProvider().

◆ insert()

void edm::eventsetup::EventSetupProvider::insert ( EventSetupRecordKey const &  iKey,
std::unique_ptr< EventSetupRecordProvider iProvider 
)
private

Definition at line 77 of file EventSetupProvider.cc.

78  {
79  auto lb = std::lower_bound(recordKeys_.begin(), recordKeys_.end(), iKey);
80  auto index = std::distance(recordKeys_.begin(), lb);
81  if (lb == recordKeys_.end() || iKey != *lb) {
82  recordKeys_.insert(lb, iKey);
83  recordProviders_.insert(recordProviders_.begin() + index, std::move(iProvider));
84  } else {
85  recordProviders_[index] = std::move(iProvider);
86  }
87  }

References HLT_2018_cff::distance, cuda_std::lower_bound(), eostools::move(), recordKeys_, and recordProviders_.

Referenced by addRecord(), and finishConfiguration().

◆ logInfoWhenSharing()

void edm::eventsetup::EventSetupProvider::logInfoWhenSharing ( ParameterSet const &  iConfiguration)
static

Definition at line 766 of file EventSetupProvider.cc.

766  {
767  std::string edmtype = iConfiguration.getParameter<std::string>("@module_edm_type");
768  std::string modtype = iConfiguration.getParameter<std::string>("@module_type");
769  std::string label = iConfiguration.getParameter<std::string>("@module_label");
770  edm::LogVerbatim("EventSetupSharing")
771  << "Sharing " << edmtype << ": class=" << modtype << " label='" << label << "'";
772  }

References edm::ParameterSet::getParameter(), label, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by checkESProducerSharing().

◆ operator=()

EventSetupProvider const& edm::eventsetup::EventSetupProvider::operator= ( EventSetupProvider const &  )
delete

◆ proxyProviderDescriptions()

std::set< ComponentDescription > edm::eventsetup::EventSetupProvider::proxyProviderDescriptions ( ) const

Definition at line 719 of file EventSetupProvider.cc.

719  {
720  typedef std::set<ComponentDescription> Set;
721  Set descriptions;
722 
723  for (auto const& recProvider : recordProviders_) {
724  auto const& d = recProvider->proxyProviderDescriptions();
725  descriptions.insert(d.begin(), d.end());
726  }
727  if (dataProviders_.get()) {
728  for (auto const& p : *dataProviders_) {
729  descriptions.insert(p->description());
730  }
731  }
732 
733  return descriptions;
734  }

References ztail::d, dataProviders_, AlCaHLTBitMon_ParallelJobs::p, and recordProviders_.

◆ recordProvider()

std::shared_ptr< EventSetupRecordProvider > & edm::eventsetup::EventSetupProvider::recordProvider ( const EventSetupRecordKey iKey)
private

Definition at line 58 of file EventSetupProvider.cc.

58  {
59  auto lb = std::lower_bound(recordKeys_.begin(), recordKeys_.end(), iKey);
60  if (lb == recordKeys_.end() || iKey != *lb) {
61  throw cms::Exception("LogicError") << "EventSetupProvider::recordProvider Could not find key\n"
62  << "Should be impossible. Please contact Framework developer.\n";
63  }
64  auto index = std::distance(recordKeys_.begin(), lb);
65  return recordProviders_[index];
66  }

References HLT_2018_cff::distance, Exception, cuda_std::lower_bound(), recordKeys_, and recordProviders_.

Referenced by checkESProducerSharing(), determinePreferred(), and replaceExisting().

◆ recordsToProxyIndices()

ESRecordsToProxyIndices edm::eventsetup::EventSetupProvider::recordsToProxyIndices ( ) const

Definition at line 751 of file EventSetupProvider.cc.

751  {
753 
754  unsigned int index = 0;
755  for (auto provider : recordProviders_) {
756  index = ret.dataKeysInRecord(
757  index, provider->key(), provider->registeredDataKeys(), provider->componentsForRegisteredDataKeys());
758  }
759 
760  return ret;
761  }

References recordKeys_, recordProviders_, and runTheMatrix::ret.

Referenced by finishConfiguration().

◆ replaceExisting()

void edm::eventsetup::EventSetupProvider::replaceExisting ( std::shared_ptr< DataProxyProvider dataProxyProvider)

Definition at line 94 of file EventSetupProvider.cc.

94  {
95  ParameterSetIDHolder psetID(dataProxyProvider->description().pid_);
96  std::set<EventSetupRecordKey> const& keysForPSetID = (*psetIDToRecordKey_)[psetID];
97  for (auto const& key : keysForPSetID) {
98  recordProvider(key)->resetProxyProvider(psetID, dataProxyProvider);
99  }
100  }

References crabWrapper::key, and recordProvider().

Referenced by edm::eventsetup::ModuleMakerTraits::replaceExisting().

◆ resetRecordPlusDependentRecords()

void edm::eventsetup::EventSetupProvider::resetRecordPlusDependentRecords ( EventSetupRecordKey const &  iKey)

Used when we need to force a Record to reset all its proxies.

Definition at line 367 of file EventSetupProvider.cc.

367  {
369  if (recProvider == nullptr) {
370  return;
371  }
372 
373  std::vector<std::shared_ptr<EventSetupRecordProvider>> dependents;
374  findDependents(iKey, recordProviders_.begin(), recordProviders_.end(), dependents);
375 
376  dependents.erase(std::unique(dependents.begin(), dependents.end()), dependents.end());
377 
378  recProvider->resetProxies();
379  for (auto& d : dependents) {
380  d->resetProxies();
381  }
382  }

References ztail::d, edm::eventsetup::findDependents(), recordProviders_, edm::eventsetup::EventSetupRecordProvider::resetProxies(), tryToGetRecordProvider(), and tier0::unique().

Referenced by edm::EDLooperBase::prepareForNextLoop().

◆ resetRecordToProxyPointers()

void edm::eventsetup::EventSetupProvider::resetRecordToProxyPointers ( )

Definition at line 630 of file EventSetupProvider.cc.

630  {
631  for (auto const& recProvider : recordProviders_) {
633  const EventSetupRecordProvider::DataToPreferredProviderMap* preferredInfo = &kEmptyMap;
634  RecordToPreferred::const_iterator itRecordFound = recordToPreferred_->find(recProvider->key());
635  if (itRecordFound != recordToPreferred_->end()) {
636  preferredInfo = &(itRecordFound->second);
637  }
638  recProvider->resetRecordToProxyPointers(*preferredInfo);
639  }
640  }

References recordProviders_, and recordToPreferred_.

◆ setAllValidityIntervals()

void edm::eventsetup::EventSetupProvider::setAllValidityIntervals ( const IOVSyncValue iValue)

Set the validity intervals in all EventSetupRecordProviders.

Definition at line 658 of file EventSetupProvider.cc.

658  {
659  // First loop sets a flag that helps us to not duplicate calls to the
660  // same EventSetupRecordProvider setting the IOVs. Dependent records
661  // can cause duplicate calls without this protection.
662  for (auto& recProvider : recordProviders_) {
663  recProvider->initializeForNewSyncValue();
664  }
665 
666  for (auto& recProvider : recordProviders_) {
667  recProvider->setValidityIntervalFor(iValue);
668  }
669  }

References recordProviders_.

◆ setPreferredProviderInfo()

void edm::eventsetup::EventSetupProvider::setPreferredProviderInfo ( PreferredProviderInfo const &  iInfo)

Definition at line 741 of file EventSetupProvider.cc.

741  {
742  preferredProviderInfo_ = std::make_unique<PreferredProviderInfo>(iInfo);
743  }

References preferredProviderInfo_.

◆ subProcessIndex()

unsigned edm::eventsetup::EventSetupProvider::subProcessIndex ( ) const
inline

Definition at line 108 of file EventSetupProvider.h.

108 { return subProcessIndex_; }

References subProcessIndex_.

Referenced by checkESProducerSharing().

◆ tryToGetRecordProvider()

EventSetupRecordProvider * edm::eventsetup::EventSetupProvider::tryToGetRecordProvider ( const EventSetupRecordKey iKey)

Definition at line 68 of file EventSetupProvider.cc.

68  {
69  auto lb = std::lower_bound(recordKeys_.begin(), recordKeys_.end(), iKey);
70  if (lb == recordKeys_.end() || iKey != *lb) {
71  return nullptr;
72  }
73  auto index = std::distance(recordKeys_.begin(), lb);
74  return recordProviders_[index].get();
75  }

References HLT_2018_cff::distance, cuda_std::lower_bound(), recordKeys_, and recordProviders_.

Referenced by doRecordsMatch(), fillReferencedDataKeys(), finishConfiguration(), and resetRecordPlusDependentRecords().

Member Data Documentation

◆ activityRegistry_

ActivityRegistry const* edm::eventsetup::EventSetupProvider::activityRegistry_
private

Definition at line 136 of file EventSetupProvider.h.

Referenced by finishConfiguration().

◆ dataProviders_

std::unique_ptr<std::vector<std::shared_ptr<DataProxyProvider> > > edm::eventsetup::EventSetupProvider::dataProviders_
private

◆ eventSetupImpl_

propagate_const<std::shared_ptr<EventSetupImpl> > edm::eventsetup::EventSetupProvider::eventSetupImpl_
private

Definition at line 140 of file EventSetupProvider.h.

Referenced by addRecord(), eventSetupForInstance(), and eventSetupImpl().

◆ finders_

std::unique_ptr<std::vector<std::shared_ptr<EventSetupRecordIntervalFinder> > > edm::eventsetup::EventSetupProvider::finders_
private

Definition at line 145 of file EventSetupProvider.h.

Referenced by add(), and finishConfiguration().

◆ mustFinishConfiguration_

bool edm::eventsetup::EventSetupProvider::mustFinishConfiguration_
private

Definition at line 138 of file EventSetupProvider.h.

Referenced by finishConfiguration().

◆ preferredProviderInfo_

std::unique_ptr<PreferredProviderInfo> edm::eventsetup::EventSetupProvider::preferredProviderInfo_
private

◆ psetIDToRecordKey_

std::unique_ptr<std::map<ParameterSetIDHolder, std::set<EventSetupRecordKey> > > edm::eventsetup::EventSetupProvider::psetIDToRecordKey_
private

◆ recordKeys_

RecordKeys edm::eventsetup::EventSetupProvider::recordKeys_
private

◆ recordProviders_

RecordProviders edm::eventsetup::EventSetupProvider::recordProviders_
private

◆ recordsWithALooperProxy_

std::unique_ptr<std::set<EventSetupRecordKey> > edm::eventsetup::EventSetupProvider::recordsWithALooperProxy_
private

◆ recordToFinders_

std::unique_ptr<std::map<EventSetupRecordKey, std::vector<std::shared_ptr<EventSetupRecordIntervalFinder> > > > edm::eventsetup::EventSetupProvider::recordToFinders_
private

◆ recordToPreferred_

std::unique_ptr<std::map<EventSetupRecordKey, std::map<DataKey, ComponentDescription> > > edm::eventsetup::EventSetupProvider::recordToPreferred_
private

◆ referencedDataKeys_

std::unique_ptr<std::map<EventSetupRecordKey, std::map<DataKey, ComponentDescription const*> > > edm::eventsetup::EventSetupProvider::referencedDataKeys_
private

◆ subProcessIndex_

unsigned edm::eventsetup::EventSetupProvider::subProcessIndex_
private

Definition at line 139 of file EventSetupProvider.h.

Referenced by checkESProducerSharing(), doRecordsMatch(), and subProcessIndex().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
edm::ParameterSetID
Hash< ParameterSetType > ParameterSetID
Definition: ParameterSetID.h:21
bTagCombinedSVVariables_cff.indices
indices
Definition: bTagCombinedSVVariables_cff.py:67
edm::eventsetup::heterocontainer::HCTypeTag::findType
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:121
edm::eventsetup::EventSetupRecordProvider::resetProxies
void resetProxies()
This will clear the cache's of all the Proxies so that next time they are called they will run.
Definition: EventSetupRecordProvider.cc:215
edm::eventsetup::DataProxyProvider::KeyedProxies::contains
bool contains(DataKey const &dataKey) const
Definition: DataProxyProvider.cc:76
edm::eventsetup::ESRecordsToProxyIndices
Definition: ESRecordsToProxyIndices.h:35
edm::eventsetup::EventSetupProvider::tryToGetRecordProvider
EventSetupRecordProvider * tryToGetRecordProvider(const EventSetupRecordKey &iKey)
Definition: EventSetupProvider.cc:68
edm::eventsetup::EventSetupProvider::logInfoWhenSharing
static void logInfoWhenSharing(ParameterSet const &iConfiguration)
Definition: EventSetupProvider.cc:766
align_cfg.recordName
recordName
Definition: align_cfg.py:66
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::eventsetup::EventSetupRecordProvider::add
void add(std::shared_ptr< DataProxyProvider >)
Definition: EventSetupRecordProvider.cc:54
edm::LogInfo
Definition: MessageLogger.h:254
cms::cuda::assert
assert(be >=bs)
HLT_2018_cff.distance
distance
Definition: HLT_2018_cff.py:6417
edm::eventsetup::EventSetupProvider::PreferredProviderInfo
std::map< ComponentDescription, RecordToDataMap > PreferredProviderInfo
Definition: EventSetupProvider.h:56
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
edm::eventsetup::EventSetupProvider::psetIDToRecordKey_
std::unique_ptr< std::map< ParameterSetIDHolder, std::set< EventSetupRecordKey > > > psetIDToRecordKey_
Definition: EventSetupProvider.h:150
edm::eventsetup::DataProxyProvider::KeyedProxies
Definition: DataProxyProvider.h:73
edm::eventsetup::EventSetupProvider::recordProviders_
RecordProviders recordProviders_
Definition: EventSetupProvider.h:134
edm::eventsetup::EventSetupRecordKey
Definition: EventSetupRecordKey.h:30
edm::eventsetup::preferEverything
static void preferEverything(const ComponentDescription &iComponent, const RecordProviders &iRecordProviders, RecordToPreferred &iReturnValue)
find everything made by a DataProxyProvider and add it to the 'preferred' list
Definition: EventSetupProvider.cc:110
edm::eventsetup::EventSetupsController::isLastMatch
bool isLastMatch(ParameterSetID const &psetID, unsigned subProcessIndex, unsigned precedingProcessIndex) const
Definition: EventSetupsController.cc:297
edm::eventsetup::ComponentFactory::get
static ComponentFactory< T > const * get()
edm::eventsetup::EventSetupsController::getESProducerPSet
ParameterSet const * getESProducerPSet(ParameterSetID const &psetID, unsigned subProcessIndex) const
Definition: EventSetupsController.cc:372
edm::eventsetup::EventSetupProvider::doRecordsMatch
bool doRecordsMatch(EventSetupProvider &precedingESProvider, EventSetupRecordKey const &eventSetupRecordKey, std::map< EventSetupRecordKey, bool > &allComponentsMatch, EventSetupsController const &esController)
Definition: EventSetupProvider.cc:535
edm::eventsetup::EventSetupsController::lookForMatches
void lookForMatches(ParameterSetID const &psetID, unsigned subProcessIndex, unsigned precedingProcessIndex, bool &firstProcessWithThisPSet, bool &precedingHasMatchingPSet) const
Definition: EventSetupsController.cc:238
edm::eventsetup::EventSetupRecordProvider
Definition: EventSetupRecordProvider.h:47
edm::eventsetup::EventSetupProvider::recordKeys_
RecordKeys recordKeys_
Definition: EventSetupProvider.h:131
edm::eventsetup::EventSetupProvider::determinePreferred
void determinePreferred()
Definition: EventSetupProvider.cc:157
edm::eventsetup::EventSetupProvider::activityRegistry_
ActivityRegistry const * activityRegistry_
Definition: EventSetupProvider.h:136
edm::eventsetup::EventSetupProvider::referencedDataKeys_
std::unique_ptr< std::map< EventSetupRecordKey, std::map< DataKey, ComponentDescription const * > > > referencedDataKeys_
Definition: EventSetupProvider.h:147
edm::eventsetup::findDependents
static void findDependents(const EventSetupRecordKey &iKey, Itr itBegin, Itr itEnd, std::vector< std::shared_ptr< EventSetupRecordProvider >> &oDependents)
Definition: EventSetupProvider.cc:352
edm::eventsetup::TypeTag
heterocontainer::HCTypeTag TypeTag
Definition: DataKeyTags.h:30
edm::eventsetup::EventSetupRecordProvider::IntervalStatus
IntervalStatus
Definition: EventSetupRecordProvider.h:49
edm::eventsetup::EventSetupRecordKey::TypeTag
heterocontainer::HCTypeTag TypeTag
Definition: EventSetupRecordKey.h:32
edm::eventsetup::EventSetupRecordProvider::fillReferencedDataKeys
void fillReferencedDataKeys(std::map< DataKey, ComponentDescription const * > &referencedDataKeys) const
Definition: EventSetupRecordProvider.cc:234
edm::eventsetup::EventSetupProvider::subProcessIndex_
unsigned subProcessIndex_
Definition: EventSetupProvider.h:139
cuda_std::lower_bound
__host__ constexpr __device__ RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
Definition: cudastdAlgorithm.h:27
edm::eventsetup::EventSetupProvider::forceCacheClear
void forceCacheClear()
Used when testing that all code properly updates on IOV changes of all Records.
Definition: EventSetupProvider.cc:384
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::get_underlying_safe
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
Definition: get_underlying_safe.h:40
ParameterSet
Definition: Functions.h:16
edm::eventsetup::EventSetupProvider::recordToFinders_
std::unique_ptr< std::map< EventSetupRecordKey, std::vector< std::shared_ptr< EventSetupRecordIntervalFinder > > > > recordToFinders_
Definition: EventSetupProvider.h:149
edm::eventsetup::EventSetupProvider::recordsWithALooperProxy_
std::unique_ptr< std::set< EventSetupRecordKey > > recordsWithALooperProxy_
Definition: EventSetupProvider.h:152
edm::eventsetup::EventSetupProvider::recordToPreferred_
std::unique_ptr< std::map< EventSetupRecordKey, std::map< DataKey, ComponentDescription > > > recordToPreferred_
Definition: EventSetupProvider.h:151
edm::eventsetup::EventSetupProvider::dataProviders_
std::unique_ptr< std::vector< std::shared_ptr< DataProxyProvider > > > dataProviders_
Definition: EventSetupProvider.h:146
edm::eventsetup::EventSetupRecordProvider::addFinder
void addFinder(std::shared_ptr< EventSetupRecordIntervalFinder >)
For now, only use one finder.
Definition: EventSetupRecordProvider.cc:61
edm::eventsetup::EventSetupProvider::insert
void insert(EventSetupRecordKey const &, std::unique_ptr< EventSetupRecordProvider >)
Definition: EventSetupProvider.cc:77
edm::LogVerbatim
Definition: MessageLogger.h:297
edm::eventsetup::EventSetupProvider::eventSetupImpl_
propagate_const< std::shared_ptr< EventSetupImpl > > eventSetupImpl_
Definition: EventSetupProvider.h:140
Invalid
Definition: hltDiff.cc:248
edm::eventsetup::EventSetupRecordProvider::proxyProviderDescriptions
std::set< ComponentDescription > proxyProviderDescriptions() const
return information on which DataProxyProviders are supplying information
Definition: EventSetupRecordProvider.cc:256
HLT_2018_cff.finder
finder
Definition: HLT_2018_cff.py:50398
edm::eventsetup::ParameterSetIDHolder
Definition: ParameterSetIDHolder.h:12
edm::eventsetup::EventSetupRecordProvider::DataToPreferredProviderMap
std::map< DataKey, ComponentDescription > DataToPreferredProviderMap
Definition: EventSetupRecordProvider.h:51
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::eventsetup::EventSetupRecordProvider::dependentRecords
std::set< EventSetupRecordKey > dependentRecords() const
Returns the list of Records the provided Record depends on (usually none)
Definition: EventSetupRecordProvider.cc:254
edm::match
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)
Definition: BranchDescription.cc:351
tier0.unique
def unique(seq, keepstr=True)
Definition: tier0.py:24
edm::eventsetup::EventSetupProvider::subProcessIndex
unsigned subProcessIndex() const
Definition: EventSetupProvider.h:108
makeMuonMisalignmentScenario.components
string components
Definition: makeMuonMisalignmentScenario.py:58
Exception
Definition: hltDiff.cc:246
edm::eventsetup::EventSetupProvider::recordsToProxyIndices
ESRecordsToProxyIndices recordsToProxyIndices() const
Definition: EventSetupProvider.cc:751
edm::eventsetup::EventSetupRecordProvider::proxyProvider
std::shared_ptr< DataProxyProvider > proxyProvider(ComponentDescription const &)
returns the first matching DataProxyProvider or a 'null' if not found
Definition: EventSetupRecordProvider.cc:266
edm::eventsetup::EventSetupsController::isFirstMatch
bool isFirstMatch(ParameterSetID const &psetID, unsigned subProcessIndex, unsigned precedingProcessIndex) const
Definition: EventSetupsController.cc:272
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::eventsetup::EventSetupProvider::mustFinishConfiguration_
bool mustFinishConfiguration_
Definition: EventSetupProvider.h:138
ztail.d
d
Definition: ztail.py:151
edm::eventsetup::EventSetupProvider::fillReferencedDataKeys
void fillReferencedDataKeys(EventSetupRecordKey const &eventSetupRecordKey)
Definition: EventSetupProvider.cc:618
genParticles_cff.map
map
Definition: genParticles_cff.py:11
edm::eventsetup::EventSetupProvider::finders_
std::unique_ptr< std::vector< std::shared_ptr< EventSetupRecordIntervalFinder > > > finders_
Definition: EventSetupProvider.h:145
edm::eventsetup
Definition: ES_DDDetector.cc:16
crabWrapper.key
key
Definition: crabWrapper.py:19
edm::eventsetup::EventSetupProvider::preferredProviderInfo_
std::unique_ptr< PreferredProviderInfo > preferredProviderInfo_
Definition: EventSetupProvider.h:144
label
const char * label
Definition: PFTauDecayModeTools.cc:11
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::eventsetup::EventSetupProvider::recordProvider
std::shared_ptr< EventSetupRecordProvider > & recordProvider(const EventSetupRecordKey &iKey)
Definition: EventSetupProvider.cc:58
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443