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< ESProductResolverProvider >)
 
void add (std::shared_ptr< EventSetupRecordIntervalFinder >)
 
void addRecord (const EventSetupRecordKey &iKey)
 Intended for use only in tests. More...
 
void checkESProducerSharing (ModuleTypeResolverMaker const *resolverMaker, 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
 
ESRecordsToProductResolverIndices recordsToResolverIndices () const
 
void replaceExisting (std::shared_ptr< ESProductResolverProvider >)
 
void resetRecordPlusDependentRecords (EventSetupRecordKey const &)
 Used when we need to force a Record to reset all its proxies. More...
 
void resetRecordToResolverPointers ()
 
std::set< ComponentDescriptionresolverProviderDescriptions () const
 
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< ESProductResolverProvider > > > 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 > > recordsWithALooperResolver_
 
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 50 of file EventSetupProvider.h.

Member Typedef Documentation

◆ DataKeyInfo

Definition at line 55 of file EventSetupProvider.h.

◆ DataLabel

Definition at line 54 of file EventSetupProvider.h.

◆ DataType

Definition at line 53 of file EventSetupProvider.h.

◆ PreferredProviderInfo

Definition at line 57 of file EventSetupProvider.h.

◆ RecordKeys

Definition at line 132 of file EventSetupProvider.h.

◆ RecordName

Definition at line 52 of file EventSetupProvider.h.

◆ RecordProviders

Definition at line 135 of file EventSetupProvider.h.

◆ RecordToDataMap

Definition at line 56 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 41 of file EventSetupProvider.cc.

44  : activityRegistry_(activityRegistry),
47  preferredProviderInfo_((nullptr != iInfo) ? (new PreferredProviderInfo(*iInfo)) : nullptr),
48  finders_(new std::vector<std::shared_ptr<EventSetupRecordIntervalFinder>>()),
49  dataProviders_(new std::vector<std::shared_ptr<ESProductResolverProvider>>()),
50  referencedDataKeys_(new std::map<EventSetupRecordKey, std::map<DataKey, ComponentDescription const*>>),
52  new std::map<EventSetupRecordKey, std::vector<std::shared_ptr<EventSetupRecordIntervalFinder>>>),
53  psetIDToRecordKey_(new std::map<ParameterSetIDHolder, std::set<EventSetupRecordKey>>),
54  recordToPreferred_(new std::map<EventSetupRecordKey, std::map<DataKey, ComponentDescription>>),
55  recordsWithALooperResolver_(new std::set<EventSetupRecordKey>) {}
std::unique_ptr< std::map< ParameterSetIDHolder, std::set< EventSetupRecordKey > > > psetIDToRecordKey_
std::unique_ptr< std::map< EventSetupRecordKey, std::map< DataKey, ComponentDescription const * > > > referencedDataKeys_
std::map< ComponentDescription, RecordToDataMap > PreferredProviderInfo
std::unique_ptr< std::vector< std::shared_ptr< EventSetupRecordIntervalFinder > > > finders_
ActivityRegistry const * activityRegistry_
std::unique_ptr< std::vector< std::shared_ptr< ESProductResolverProvider > > > dataProviders_
std::unique_ptr< PreferredProviderInfo > preferredProviderInfo_
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::set< EventSetupRecordKey > > recordsWithALooperResolver_

◆ EventSetupProvider() [2/2]

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

◆ ~EventSetupProvider()

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

Definition at line 57 of file EventSetupProvider.cc.

References forceCacheClear().

57 { forceCacheClear(); }
void forceCacheClear()
Used when testing that all code properly updates on IOV changes of all Records.

Member Function Documentation

◆ add() [1/2]

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

◆ add() [2/2]

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

Definition at line 106 of file EventSetupProvider.cc.

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

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

106  {
107  assert(iFinder.get() != nullptr);
108  finders_->push_back(iFinder);
109  }
assert(be >=bs)
std::unique_ptr< std::vector< std::shared_ptr< EventSetupRecordIntervalFinder > > > finders_

◆ addRecord()

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

Intended for use only in tests.

Definition at line 745 of file EventSetupProvider.cc.

References eventSetupImpl_, insert(), and recordKeys_.

745  {
746  insert(iKey, std::unique_ptr<EventSetupRecordProvider>());
747  eventSetupImpl_->setKeyIters(recordKeys_.begin(), recordKeys_.end());
748  }
propagate_const< std::shared_ptr< EventSetupImpl > > eventSetupImpl_
void insert(EventSetupRecordKey const &, std::unique_ptr< EventSetupRecordProvider >)

◆ checkESProducerSharing()

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

Definition at line 400 of file EventSetupProvider.cc.

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

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

◆ clearInitializationData()

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

Definition at line 651 of file EventSetupProvider.cc.

References preferredProviderInfo_, psetIDToRecordKey_, recordsWithALooperResolver_, recordToFinders_, recordToPreferred_, and referencedDataKeys_.

651  {
652  preferredProviderInfo_.reset();
653  referencedDataKeys_.reset();
654  recordToFinders_.reset();
655  psetIDToRecordKey_.reset();
656  recordToPreferred_.reset();
658  }
std::unique_ptr< std::map< ParameterSetIDHolder, std::set< EventSetupRecordKey > > > psetIDToRecordKey_
std::unique_ptr< std::map< EventSetupRecordKey, std::map< DataKey, ComponentDescription const * > > > referencedDataKeys_
std::unique_ptr< PreferredProviderInfo > preferredProviderInfo_
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::set< EventSetupRecordKey > > recordsWithALooperResolver_

◆ determinePreferred()

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

Definition at line 163 of file EventSetupProvider.cc.

References makeMuonMisalignmentScenario::components, edm::eventsetup::ESProductResolverProvider::KeyedResolvers::contains(), Exception, edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::eventsetup::preferEverything(), preferredProviderInfo_, align_cfg::recordName, recordProvider(), recordProviders_, recordToPreferred_, edm::eventsetup::EventSetupRecordProvider::resolverProvider(), edm::eventsetup::EventSetupRecordProvider::resolverProviderDescriptions(), AlCaHLTBitMon_QueryRunRegistry::string, and edm::eventsetup::EventSetupRecordKey::type().

Referenced by finishConfiguration().

163  {
164  using namespace edm::eventsetup;
166  for (auto const& itInfo : *preferredProviderInfo_) {
167  if (itInfo.second.empty()) {
168  //want everything
170  } else {
171  for (auto const& itRecData : itInfo.second) {
172  std::string recordName = itRecData.first;
174  if (recordKey.type() == eventsetup::EventSetupRecordKey::TypeTag()) {
175  throw cms::Exception("ESPreferUnknownRecord")
176  << "Unknown record \"" << recordName
177  << "\" used in es_prefer statement for type=" << itInfo.first.type_ << " label=\""
178  << itInfo.first.label_ << "\"\n Please check spelling.";
179  //record not found
180  }
181  //See if the ResolverProvider provides something for this Record
182  EventSetupRecordProvider& recordProviderForKey = *recordProvider(recordKey);
183 
184  std::set<ComponentDescription> components = recordProviderForKey.resolverProviderDescriptions();
185  std::set<ComponentDescription>::iterator itResolverProv = components.find(itInfo.first);
186  if (itResolverProv == components.end()) {
187  throw cms::Exception("ESPreferWrongRecord")
188  << "The type=" << itInfo.first.type_ << " label=\"" << itInfo.first.label_
189  << "\" does not provide data for the Record " << recordName;
190  }
191  //Does it data type exist?
192  eventsetup::TypeTag datumType = eventsetup::TypeTag::findType(itRecData.second.first);
193  if (datumType == eventsetup::TypeTag()) {
194  //not found
195  throw cms::Exception("ESPreferWrongDataType")
196  << "The es_prefer statement for type=" << itInfo.first.type_ << " label=\"" << itInfo.first.label_
197  << "\" has the unknown data type \"" << itRecData.second.first << "\""
198  << "\n Please check spelling";
199  }
200  eventsetup::DataKey datumKey(datumType, itRecData.second.second.c_str());
201 
202  //Does the resolverprovider make this?
203  std::shared_ptr<ESProductResolverProvider> resolverProv =
204  recordProviderForKey.resolverProvider(*itResolverProv);
205  unsigned int iovIndex = 0; // Doesn't matter which index is picked, at least 1 should always exist
206  const ESProductResolverProvider::KeyedResolvers& keyedResolvers =
207  resolverProv->keyedResolvers(recordKey, iovIndex);
208  if (!keyedResolvers.contains(datumKey)) {
209  throw cms::Exception("ESPreferWrongData")
210  << "The es_prefer statement for type=" << itInfo.first.type_ << " label=\"" << itInfo.first.label_
211  << "\" specifies the data item \n"
212  << " type=\"" << itRecData.second.first << "\" label=\"" << itRecData.second.second << "\""
213  << " which is not provided. Please check spelling.";
214  }
215 
217  (*recordToPreferred_)[recordKey];
218  //has another provider already been specified?
219  if (dataToProviderMap.end() != dataToProviderMap.find(datumKey)) {
220  EventSetupRecordProvider::DataToPreferredProviderMap::iterator itFind =
221  dataToProviderMap.find(datumKey);
222  throw cms::Exception("ESPreferConflict")
223  << "Two providers have been set to be preferred for\n"
224  << datumKey.type().name() << " \"" << datumKey.name().value() << "\""
225  << "\n the providers are "
226  << "\n 1) type=" << itFind->second.type_ << " label=\"" << itFind->second.label_ << "\""
227  << "\n 2) type=" << itResolverProv->type_ << " label=\"" << itResolverProv->label_ << "\""
228  << "\nPlease modify configuration so only one is preferred";
229  }
230  dataToProviderMap.insert(std::make_pair(datumKey, *itResolverProv));
231  }
232  }
233  }
234  }
235  }
std::shared_ptr< EventSetupRecordProvider > & recordProvider(const EventSetupRecordKey &iKey)
heterocontainer::HCTypeTag TypeTag
Definition: DataKeyTags.h:30
static void preferEverything(const ComponentDescription &iComponent, const RecordProviders &iRecordProviders, RecordToPreferred &iReturnValue)
find everything made by a ESProductResolverProvider and add it to the &#39;preferred&#39; list ...
std::unique_ptr< PreferredProviderInfo > preferredProviderInfo_
std::map< DataKey, ComponentDescription > DataToPreferredProviderMap
heterocontainer::HCTypeTag TypeTag
std::unique_ptr< std::map< EventSetupRecordKey, std::map< DataKey, ComponentDescription > > > recordToPreferred_
std::set< ComponentDescription > resolverProviderDescriptions() const
return information on which ESProductResolverProviders are supplying information
std::shared_ptr< ESProductResolverProvider > resolverProvider(ComponentDescription const &)
returns the first matching ESProductResolverProvider or a &#39;null&#39; if not found
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

◆ doRecordsMatch()

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

Definition at line 544 of file EventSetupProvider.cc.

References edm::eventsetup::EventSetupRecordProvider::dependentRecords(), fillReferencedDataKeys(), HLT_2024v10_cff::finder, edm::eventsetup::EventSetupsController::isMatchingESProducer(), edm::eventsetup::EventSetupsController::isMatchingESSource(), recordsWithALooperResolver_, recordToFinders_, referencedDataKeys_, subProcessIndex_, and tryToGetRecordProvider().

Referenced by checkESProducerSharing().

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

◆ doWeNeedToWaitForIOVsToFinish()

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

Definition at line 719 of file EventSetupProvider.cc.

References recordProviders_.

719  {
720  for (auto& recProvider : recordProviders_) {
721  if (recProvider->doWeNeedToWaitForIOVsToFinish(iValue)) {
722  return true;
723  }
724  }
725  return false;
726  }

◆ eventSetupForInstance()

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

Definition at line 680 of file EventSetupProvider.cc.

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

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

◆ eventSetupImpl()

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

Definition at line 78 of file EventSetupProvider.h.

References eventSetupImpl_.

78 { return *eventSetupImpl_; }
propagate_const< std::shared_ptr< EventSetupImpl > > eventSetupImpl_

◆ fillKeys()

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

Definition at line 754 of file EventSetupProvider.cc.

References relativeConstraints::keys, and recordProviders_.

754  {
755  for (auto const& recProvider : recordProviders_) {
756  keys.insert(recProvider->key());
757  }
758  }

◆ fillRecordsNotAllowingConcurrentIOVs()

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

Definition at line 660 of file EventSetupProvider.cc.

References dataProviders_.

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

661  {
662  for (auto const& productResolverProvider : *dataProviders_) {
663  productResolverProvider->fillRecordsNotAllowingConcurrentIOVs(recordsNotAllowingConcurrentIOVs);
664  }
665  }
std::unique_ptr< std::vector< std::shared_ptr< ESProductResolverProvider > > > dataProviders_

◆ fillReferencedDataKeys()

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

Definition at line 627 of file EventSetupProvider.cc.

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

Referenced by doRecordsMatch().

627  {
628  if (referencedDataKeys_->find(eventSetupRecordKey) != referencedDataKeys_->end())
629  return;
630 
631  EventSetupRecordProvider* recProvider = tryToGetRecordProvider(eventSetupRecordKey);
632  if (recProvider == nullptr) {
633  (*referencedDataKeys_)[eventSetupRecordKey];
634  return;
635  }
636  recProvider->fillReferencedDataKeys((*referencedDataKeys_)[eventSetupRecordKey]);
637  }
std::unique_ptr< std::map< EventSetupRecordKey, std::map< DataKey, ComponentDescription const * > > > referencedDataKeys_
EventSetupRecordProvider * tryToGetRecordProvider(const EventSetupRecordKey &iKey)
void fillReferencedDataKeys(std::map< DataKey, ComponentDescription const *> &referencedDataKeys) const

◆ finishConfiguration()

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

Definition at line 237 of file EventSetupProvider.cc.

References activityRegistry_, edm::eventsetup::EventSetupRecordProvider::add(), edm::eventsetup::EventSetupRecordProvider::addFinder(), dataProviders_, determinePreferred(), HLT_2024v10_cff::distance, HLT_2024v10_cff::finder, finders_, dqmdumpme::indices, insert(), submitPVResolutionJobs::key, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, mustFinishConfiguration_, options_cfi::numberOfConcurrentIOVs, psetIDToRecordKey_, recordKeys_, recordProviders_, recordsToResolverIndices(), recordsWithALooperResolver_, recordToFinders_, recordToPreferred_, AlCaHLTBitMon_QueryRunRegistry::string, and tryToGetRecordProvider().

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

◆ forceCacheClear()

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

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

Definition at line 392 of file EventSetupProvider.cc.

References recordProviders_.

Referenced by ~EventSetupProvider().

392  {
393  for (auto& recProvider : recordProviders_) {
394  if (recProvider) {
395  recProvider->resetProxies();
396  }
397  }
398  }

◆ insert()

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

◆ logInfoWhenSharing()

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

Definition at line 775 of file EventSetupProvider.cc.

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

Referenced by checkESProducerSharing().

775  {
776  std::string edmtype = iConfiguration.getParameter<std::string>("@module_edm_type");
777  std::string modtype = iConfiguration.getParameter<std::string>("@module_type");
778  std::string label = iConfiguration.getParameter<std::string>("@module_label");
779  edm::LogVerbatim("EventSetupSharing")
780  << "Sharing " << edmtype << ": class=" << modtype << " label='" << label << "'";
781  }
Log< level::Info, true > LogVerbatim
char const * label

◆ operator=()

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

◆ recordProvider()

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

Definition at line 59 of file EventSetupProvider.cc.

References HLT_2024v10_cff::distance, Exception, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, recordKeys_, and recordProviders_.

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

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

◆ recordsToResolverIndices()

ESRecordsToProductResolverIndices edm::eventsetup::EventSetupProvider::recordsToResolverIndices ( ) const

Definition at line 760 of file EventSetupProvider.cc.

References recordKeys_, recordProviders_, and runTheMatrix::ret.

Referenced by finishConfiguration().

760  {
762 
763  unsigned int index = 0;
764  for (const auto& provider : recordProviders_) {
765  index = ret.dataKeysInRecord(
766  index, provider->key(), provider->registeredDataKeys(), provider->componentsForRegisteredDataKeys());
767  }
768 
769  return ret;
770  }
ret
prodAgent to be discontinued

◆ replaceExisting()

void edm::eventsetup::EventSetupProvider::replaceExisting ( std::shared_ptr< ESProductResolverProvider productResolverProvider)

Definition at line 98 of file EventSetupProvider.cc.

References submitPVResolutionJobs::key, and recordProvider().

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

98  {
99  ParameterSetIDHolder psetID(productResolverProvider->description().pid_);
100  std::set<EventSetupRecordKey> const& keysForPSetID = (*psetIDToRecordKey_)[psetID];
101  for (auto const& key : keysForPSetID) {
102  recordProvider(key)->resetProductResolverProvider(psetID, productResolverProvider);
103  }
104  }
std::shared_ptr< EventSetupRecordProvider > & recordProvider(const EventSetupRecordKey &iKey)
key
prepare the HTCondor submission files and eventually submit them

◆ 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 375 of file EventSetupProvider.cc.

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

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

375  {
377  if (recProvider == nullptr) {
378  return;
379  }
380 
381  std::vector<std::shared_ptr<EventSetupRecordProvider>> dependents;
382  findDependents(iKey, recordProviders_.begin(), recordProviders_.end(), dependents);
383 
384  dependents.erase(std::unique(dependents.begin(), dependents.end()), dependents.end());
385 
386  recProvider->resetProxies();
387  for (auto& d : dependents) {
388  d->resetProxies();
389  }
390  }
static void findDependents(const EventSetupRecordKey &iKey, Itr itBegin, Itr itEnd, std::vector< std::shared_ptr< EventSetupRecordProvider >> &oDependents)
void resetProxies()
This will clear the cache&#39;s of all the Proxies so that next time they are called they will run...
EventSetupRecordProvider * tryToGetRecordProvider(const EventSetupRecordKey &iKey)
def unique(seq, keepstr=True)
Definition: tier0.py:24
d
Definition: ztail.py:151

◆ resetRecordToResolverPointers()

void edm::eventsetup::EventSetupProvider::resetRecordToResolverPointers ( )

Definition at line 639 of file EventSetupProvider.cc.

References recordProviders_, and recordToPreferred_.

639  {
640  for (auto const& recProvider : recordProviders_) {
642  const EventSetupRecordProvider::DataToPreferredProviderMap* preferredInfo = &kEmptyMap;
643  RecordToPreferred::const_iterator itRecordFound = recordToPreferred_->find(recProvider->key());
644  if (itRecordFound != recordToPreferred_->end()) {
645  preferredInfo = &(itRecordFound->second);
646  }
647  recProvider->resetRecordToResolverPointers(*preferredInfo);
648  }
649  }
std::map< DataKey, ComponentDescription > DataToPreferredProviderMap
std::unique_ptr< std::map< EventSetupRecordKey, std::map< DataKey, ComponentDescription > > > recordToPreferred_

◆ resolverProviderDescriptions()

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

Definition at line 728 of file EventSetupProvider.cc.

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

728  {
729  typedef std::set<ComponentDescription> Set;
730  Set descriptions;
731 
732  for (auto const& recProvider : recordProviders_) {
733  auto const& d = recProvider->resolverProviderDescriptions();
734  descriptions.insert(d.begin(), d.end());
735  }
736  if (dataProviders_.get()) {
737  for (auto const& p : *dataProviders_) {
738  descriptions.insert(p->description());
739  }
740  }
741 
742  return descriptions;
743  }
std::unique_ptr< std::vector< std::shared_ptr< ESProductResolverProvider > > > dataProviders_
d
Definition: ztail.py:151

◆ setAllValidityIntervals()

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

Set the validity intervals in all EventSetupRecordProviders.

Definition at line 667 of file EventSetupProvider.cc.

References recordProviders_.

667  {
668  // First loop sets a flag that helps us to not duplicate calls to the
669  // same EventSetupRecordProvider setting the IOVs. Dependent records
670  // can cause duplicate calls without this protection.
671  for (auto& recProvider : recordProviders_) {
672  recProvider->initializeForNewSyncValue();
673  }
674 
675  for (auto& recProvider : recordProviders_) {
676  recProvider->setValidityIntervalFor(iValue);
677  }
678  }

◆ setPreferredProviderInfo()

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

Definition at line 750 of file EventSetupProvider.cc.

References preferredProviderInfo_.

750  {
751  preferredProviderInfo_ = std::make_unique<PreferredProviderInfo>(iInfo);
752  }
std::unique_ptr< PreferredProviderInfo > preferredProviderInfo_

◆ subProcessIndex()

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

Definition at line 110 of file EventSetupProvider.h.

References subProcessIndex_.

Referenced by checkESProducerSharing().

◆ tryToGetRecordProvider()

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

Member Data Documentation

◆ activityRegistry_

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

Definition at line 138 of file EventSetupProvider.h.

Referenced by add(), and finishConfiguration().

◆ dataProviders_

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

◆ eventSetupImpl_

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

Definition at line 142 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 147 of file EventSetupProvider.h.

Referenced by add(), and finishConfiguration().

◆ mustFinishConfiguration_

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

Definition at line 140 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

◆ recordsWithALooperResolver_

std::unique_ptr<std::set<EventSetupRecordKey> > edm::eventsetup::EventSetupProvider::recordsWithALooperResolver_
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 141 of file EventSetupProvider.h.

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