CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::eventsetup::EventSetupsController Class Reference

#include <EventSetupsController.h>

Public Member Functions

void clearComponents ()
 
bool doWeNeedToWaitForIOVsToFinish (IOVSyncValue const &) const
 
std::multimap< ParameterSetID, ESProducerInfo > const & esproducers () const
 
std::multimap< ParameterSetID, ESSourceInfo > const & essources () const
 
void eventSetupForInstance (IOVSyncValue const &)
 
void eventSetupForInstance (IOVSyncValue const &, WaitingTaskHolder const &taskToStartAfterIOVInit, WaitingTaskList &endIOVWaitingTasks, std::vector< std::shared_ptr< const EventSetupImpl >> &)
 
 EventSetupsController ()
 
 EventSetupsController (EventSetupsController const &)=delete
 
void finishConfiguration ()
 
void forceCacheClear ()
 
std::shared_ptr< DataProxyProvidergetESProducerAndRegisterProcess (ParameterSet const &pset, unsigned subProcessIndex)
 
ParameterSet const * getESProducerPSet (ParameterSetID const &psetID, unsigned subProcessIndex) const
 
std::shared_ptr< EventSetupRecordIntervalFindergetESSourceAndRegisterProcess (ParameterSet const &pset, unsigned subProcessIndex)
 
bool hasNonconcurrentFinder () const
 
unsigned indexOfNextProcess () const
 
bool isFirstMatch (ParameterSetID const &psetID, unsigned subProcessIndex, unsigned precedingProcessIndex) const
 
bool isLastMatch (ParameterSetID const &psetID, unsigned subProcessIndex, unsigned precedingProcessIndex) const
 
bool isMatchingESProducer (ParameterSetID const &psetID, unsigned subProcessIndex, unsigned precedingProcessIndex) const
 
bool isMatchingESSource (ParameterSetID const &psetID, unsigned subProcessIndex, unsigned precedingProcessIndex) const
 
void lookForMatches (ParameterSetID const &psetID, unsigned subProcessIndex, unsigned precedingProcessIndex, bool &firstProcessWithThisPSet, bool &precedingHasMatchingPSet) const
 
std::shared_ptr< EventSetupProvidermakeProvider (ParameterSet &, ActivityRegistry *, ParameterSet const *eventSetupPset=nullptr)
 
bool mustFinishConfiguration () const
 
EventSetupsController const & operator= (EventSetupsController const &)=delete
 
std::vector< propagate_const< std::shared_ptr< EventSetupProvider > > > const & providers () const
 
void putESProducer (ParameterSet const &pset, std::shared_ptr< DataProxyProvider > const &component, unsigned subProcessIndex)
 
void putESSource (ParameterSet const &pset, std::shared_ptr< EventSetupRecordIntervalFinder > const &component, unsigned subProcessIndex)
 
void setMaxConcurrentIOVs (unsigned int nStreams, unsigned int nConcurrentLumis)
 

Private Member Functions

void checkESProducerSharing ()
 
void initializeEventSetupRecordIOVQueues ()
 

Private Attributes

std::multimap< ParameterSetID, ESProducerInfoesproducers_
 
std::multimap< ParameterSetID, ESSourceInfoessources_
 
std::vector< propagate_const< std::unique_ptr< EventSetupRecordIOVQueue > > > eventSetupRecordIOVQueues_
 
bool hasNonconcurrentFinder_ = false
 
bool mustFinishConfiguration_ = true
 
NumberOfConcurrentIOVs numberOfConcurrentIOVs_
 
std::vector< propagate_const< std::shared_ptr< EventSetupProvider > > > providers_
 

Detailed Description

Description: Manages a group of EventSetups which can share components

Usage: <usage>

Definition at line 79 of file EventSetupsController.h.

Constructor & Destructor Documentation

◆ EventSetupsController() [1/2]

edm::eventsetup::EventSetupsController::EventSetupsController ( )

Definition at line 34 of file EventSetupsController.cc.

34 {}

◆ EventSetupsController() [2/2]

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

Member Function Documentation

◆ checkESProducerSharing()

void edm::eventsetup::EventSetupsController::checkESProducerSharing ( )
private

Definition at line 390 of file EventSetupsController.cc.

390  {
391  // Loop over SubProcesses, skip the top level process.
392  auto esProvider = providers_.begin();
393  auto const esProviderEnd = providers_.end();
394  if (esProvider != esProviderEnd)
395  ++esProvider;
396  for (; esProvider != esProviderEnd; ++esProvider) {
397  // An element is added to this set for each ESProducer
398  // when we have determined which preceding process
399  // this process can share that ESProducer with or
400  // we have determined that it cannot be shared with
401  // any preceding process.
402  // Note the earliest possible preceding process
403  // will be the one selected if there is more than one.
404  std::set<ParameterSetIDHolder> sharingCheckDone;
405 
406  // This will hold an entry for DataProxy's that are
407  // referenced by an EventSetupRecord in this SubProcess.
408  // But only for DataProxy's that are associated with
409  // an ESProducer (not the ones associated with ESSource's
410  // or EDLooper's)
411  std::map<EventSetupRecordKey, std::vector<ComponentDescription const*>> referencedESProducers;
412 
413  // For each EventSetupProvider from a SubProcess, loop over the
414  // EventSetupProviders from the preceding processes (the first
415  // preceding process will be the top level process and the others
416  // SubProcess's)
417  for (auto precedingESProvider = providers_.begin(); precedingESProvider != esProvider; ++precedingESProvider) {
418  (*esProvider)->checkESProducerSharing(**precedingESProvider, sharingCheckDone, referencedESProducers, *this);
419  }
420 
421  (*esProvider)->resetRecordToProxyPointers();
422  }
423  for (auto& eventSetupProvider : providers_) {
424  eventSetupProvider->clearInitializationData();
425  }
426  }

References providers_.

Referenced by finishConfiguration().

◆ clearComponents()

void edm::eventsetup::EventSetupsController::clearComponents ( )

Definition at line 233 of file EventSetupsController.cc.

233  {
234  esproducers_.clear();
235  essources_.clear();
236  }

References esproducers_, and essources_.

Referenced by finishConfiguration().

◆ doWeNeedToWaitForIOVsToFinish()

bool edm::eventsetup::EventSetupsController::doWeNeedToWaitForIOVsToFinish ( IOVSyncValue const &  syncValue) const

Definition at line 164 of file EventSetupsController.cc.

164  {
165  if (hasNonconcurrentFinder()) {
166  for (auto& eventSetupProvider : providers_) {
167  if (eventSetupProvider->doWeNeedToWaitForIOVsToFinish(syncValue)) {
168  return true;
169  }
170  }
171  }
172  return false;
173  }

References hasNonconcurrentFinder(), and providers_.

◆ esproducers()

std::multimap<ParameterSetID, ESProducerInfo> const& edm::eventsetup::EventSetupsController::esproducers ( ) const
inline

Definition at line 155 of file EventSetupsController.h.

155 { return esproducers_; }

References esproducers_.

◆ essources()

std::multimap<ParameterSetID, ESSourceInfo> const& edm::eventsetup::EventSetupsController::essources ( ) const
inline

Definition at line 157 of file EventSetupsController.h.

157 { return essources_; }

References essources_.

◆ eventSetupForInstance() [1/2]

void edm::eventsetup::EventSetupsController::eventSetupForInstance ( IOVSyncValue const &  syncValue)

Definition at line 125 of file EventSetupsController.cc.

125  {
126  // This function only supports use cases where the event setup
127  // system is used without multiple concurrent IOVs.
128  // At the time this comment is being written, this is used for
129  // run transitions and in unit test code. In the future,
130  // it may only be needed for unit tests. This function uses
131  // the other version of eventSetupForInstance that
132  // supports concurrent IOVs. To get this to work, a couple
133  // arguments to that function need dummy objects that do
134  // not serve any purpose in this context. We also need to
135  // add in a task to wait for the asynchronous initialization
136  // of IOVs to complete.
137 
138  auto waitUntilIOVInitializationCompletes = make_empty_waiting_task();
139  waitUntilIOVInitializationCompletes->increment_ref_count();
140 
141  // These do nothing ...
142  WaitingTaskList dummyWaitingTaskList;
143  std::vector<std::shared_ptr<const EventSetupImpl>> dummyEventSetupImpls;
144 
145  {
146  WaitingTaskHolder waitingTaskHolder(waitUntilIOVInitializationCompletes.get());
147  // Caught exception is propagated via WaitingTaskHolder
148  CMS_SA_ALLOW try {
149  // All the real work is done here.
150  eventSetupForInstance(syncValue, waitingTaskHolder, dummyWaitingTaskList, dummyEventSetupImpls);
151  dummyWaitingTaskList.doneWaiting(std::exception_ptr{});
152  } catch (...) {
153  dummyWaitingTaskList.doneWaiting(std::exception_ptr{});
154  waitingTaskHolder.doneWaiting(std::current_exception());
155  }
156  }
157  waitUntilIOVInitializationCompletes->wait_for_all();
158 
159  if (waitUntilIOVInitializationCompletes->exceptionPtr() != nullptr) {
160  std::rethrow_exception(*(waitUntilIOVInitializationCompletes->exceptionPtr()));
161  }
162  }

References CMS_SA_ALLOW, edm::WaitingTaskList::doneWaiting(), eventSetupForInstance(), and edm::make_empty_waiting_task().

◆ eventSetupForInstance() [2/2]

void edm::eventsetup::EventSetupsController::eventSetupForInstance ( IOVSyncValue const &  syncValue,
WaitingTaskHolder const &  taskToStartAfterIOVInit,
WaitingTaskList endIOVWaitingTasks,
std::vector< std::shared_ptr< const EventSetupImpl >> &  eventSetupImpls 
)

Definition at line 86 of file EventSetupsController.cc.

90  {
92 
93  bool newEventSetupImpl = false;
94  eventSetupImpls.clear();
95  eventSetupImpls.reserve(providers_.size());
96 
97  // Note that unless there are one or more SubProcesses providers_ will only
98  // contain one element.
99 
100  for (auto& eventSetupProvider : providers_) {
101  eventSetupProvider->setAllValidityIntervals(syncValue);
102  }
103 
104  for (auto& eventSetupRecordIOVQueue : eventSetupRecordIOVQueues_) {
105  // For a particular record, if the top level process or any SubProcess requires
106  // starting a new IOV, then we must start a new IOV for all of them. And we
107  // need to know whether this is needed at this point in time. This is
108  // recorded in the EventSetupRecordProviders.
109  eventSetupRecordIOVQueue->setNewIntervalForAnySubProcess();
110  }
111 
112  for (auto& eventSetupProvider : providers_) {
113  // Decides whether we can reuse the existing EventSetupImpl and if we can
114  // returns it. If a new one is needed it will create it, although the pointers
115  // to the EventSetupRecordImpl's will not be set yet in the returned EventSetupImpl
116  // object.
117  eventSetupImpls.push_back(eventSetupProvider->eventSetupForInstance(syncValue, newEventSetupImpl));
118  }
119 
120  for (auto& eventSetupRecordIOVQueue : eventSetupRecordIOVQueues_) {
121  eventSetupRecordIOVQueue->checkForNewIOVs(taskToStartAfterIOVInit, endIOVWaitingTasks, newEventSetupImpl);
122  }
123  }

References eventSetupRecordIOVQueues_, finishConfiguration(), and providers_.

Referenced by eventSetupForInstance().

◆ finishConfiguration()

void edm::eventsetup::EventSetupsController::finishConfiguration ( )

Definition at line 60 of file EventSetupsController.cc.

60  {
62  for (auto& eventSetupProvider : providers_) {
64  }
65 
66  for (auto& eventSetupProvider : providers_) {
67  eventSetupProvider->finishConfiguration(numberOfConcurrentIOVs_, hasNonconcurrentFinder_);
68  }
69 
70  // When the ESSources and ESProducers were constructed a first pass was
71  // done which attempts to get component sharing between SubProcesses
72  // correct, but in this pass only the configuration of the components
73  // being shared are compared. This is not good enough for ESProducers.
74  // In the following function, all the other components that contribute
75  // to the same record and also the records that record depends on are
76  // also checked. The component sharing is appropriately fixed as necessary.
79 
83  }
84  }

References checkESProducerSharing(), edm::eventsetup::NumberOfConcurrentIOVs::clear(), clearComponents(), edm::eventsetup::NumberOfConcurrentIOVs::fillRecordsNotAllowingConcurrentIOVs(), hasNonconcurrentFinder_, initializeEventSetupRecordIOVQueues(), mustFinishConfiguration_, numberOfConcurrentIOVs_, and providers_.

Referenced by eventSetupForInstance().

◆ forceCacheClear()

void edm::eventsetup::EventSetupsController::forceCacheClear ( )

Definition at line 175 of file EventSetupsController.cc.

175  {
176  for (auto& eventSetupProvider : providers_) {
177  eventSetupProvider->forceCacheClear();
178  }
179  }

References providers_.

◆ getESProducerAndRegisterProcess()

std::shared_ptr< DataProxyProvider > edm::eventsetup::EventSetupsController::getESProducerAndRegisterProcess ( ParameterSet const &  pset,
unsigned  subProcessIndex 
)

Definition at line 181 of file EventSetupsController.cc.

182  {
183  // Try to find a DataProxyProvider with a matching ParameterSet
184  auto elements = esproducers_.equal_range(pset.id());
185  for (auto it = elements.first; it != elements.second; ++it) {
186  // Untracked parameters must also match, do complete comparison if IDs match
187  if (isTransientEqual(pset, *it->second.pset())) {
188  // Register processes with an exact match
189  it->second.subProcessIndexes().push_back(subProcessIndex);
190  // Return the DataProxyProvider
191  return it->second.provider();
192  }
193  }
194  // Could not find it
195  return std::shared_ptr<DataProxyProvider>();
196  }

References bookConverter::elements, esproducers_, edm::isTransientEqual(), and muonDTDigis_cfi::pset.

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

◆ getESProducerPSet()

ParameterSet const * edm::eventsetup::EventSetupsController::getESProducerPSet ( ParameterSetID const &  psetID,
unsigned  subProcessIndex 
) const

Definition at line 372 of file EventSetupsController.cc.

373  {
374  auto elements = esproducers_.equal_range(psetID);
375  for (auto it = elements.first; it != elements.second; ++it) {
376  std::vector<unsigned> const& subProcessIndexes = it->second.subProcessIndexes();
377 
378  auto iFound = std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
379  if (iFound == subProcessIndexes.end()) {
380  continue;
381  }
382  return it->second.pset();
383  }
384  throw edm::Exception(edm::errors::LogicError) << "EventSetupsController::getESProducerPSet\n"
385  << "Subprocess index not found. This should never happen\n"
386  << "Please report this to a Framework Developer\n";
387  return nullptr;
388  }

References bookConverter::elements, esproducers_, Exception, spr::find(), and edm::errors::LogicError.

Referenced by edm::eventsetup::EventSetupProvider::checkESProducerSharing().

◆ getESSourceAndRegisterProcess()

std::shared_ptr< EventSetupRecordIntervalFinder > edm::eventsetup::EventSetupsController::getESSourceAndRegisterProcess ( ParameterSet const &  pset,
unsigned  subProcessIndex 
)

Definition at line 207 of file EventSetupsController.cc.

208  {
209  // Try to find a EventSetupRecordIntervalFinder with a matching ParameterSet
210  auto elements = essources_.equal_range(pset.id());
211  for (auto it = elements.first; it != elements.second; ++it) {
212  // Untracked parameters must also match, do complete comparison if IDs match
213  if (isTransientEqual(pset, *it->second.pset())) {
214  // Register processes with an exact match
215  it->second.subProcessIndexes().push_back(subProcessIndex);
216  // Return the EventSetupRecordIntervalFinder
217  return it->second.finder();
218  }
219  }
220  // Could not find it
221  return std::shared_ptr<EventSetupRecordIntervalFinder>();
222  }

References bookConverter::elements, essources_, edm::isTransientEqual(), and muonDTDigis_cfi::pset.

Referenced by edm::eventsetup::SourceMakerTraits::getComponentAndRegisterProcess().

◆ hasNonconcurrentFinder()

bool edm::eventsetup::EventSetupsController::hasNonconcurrentFinder ( ) const
inline

Definition at line 159 of file EventSetupsController.h.

159 { return hasNonconcurrentFinder_; }

References hasNonconcurrentFinder_.

Referenced by doWeNeedToWaitForIOVsToFinish().

◆ indexOfNextProcess()

unsigned edm::eventsetup::EventSetupsController::indexOfNextProcess ( ) const
inline

◆ initializeEventSetupRecordIOVQueues()

void edm::eventsetup::EventSetupsController::initializeEventSetupRecordIOVQueues ( )
private

Definition at line 428 of file EventSetupsController.cc.

428  {
429  std::set<EventSetupRecordKey> keys;
430  for (auto const& provider : providers_) {
431  provider->fillKeys(keys);
432  }
433 
434  for (auto const& key : keys) {
435  eventSetupRecordIOVQueues_.push_back(
436  std::make_unique<EventSetupRecordIOVQueue>(numberOfConcurrentIOVs_.numberOfConcurrentIOVs(key)));
437  EventSetupRecordIOVQueue& iovQueue = *eventSetupRecordIOVQueues_.back();
438  for (auto& provider : providers_) {
439  EventSetupRecordProvider* recProvider = provider->tryToGetRecordProvider(key);
440  if (recProvider) {
441  iovQueue.addRecProvider(recProvider);
442  }
443  }
444  }
445  }

References edm::eventsetup::EventSetupRecordIOVQueue::addRecProvider(), eventSetupRecordIOVQueues_, crabWrapper::key, relativeConstraints::keys, edm::eventsetup::NumberOfConcurrentIOVs::numberOfConcurrentIOVs(), numberOfConcurrentIOVs_, and providers_.

Referenced by finishConfiguration().

◆ isFirstMatch()

bool edm::eventsetup::EventSetupsController::isFirstMatch ( ParameterSetID const &  psetID,
unsigned  subProcessIndex,
unsigned  precedingProcessIndex 
) const

Definition at line 272 of file EventSetupsController.cc.

274  {
275  auto elements = esproducers_.equal_range(psetID);
276  for (auto it = elements.first; it != elements.second; ++it) {
277  std::vector<unsigned> const& subProcessIndexes = it->second.subProcessIndexes();
278 
279  auto iFound = std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
280  if (iFound == subProcessIndexes.end()) {
281  continue;
282  }
283 
284  auto iFoundPreceding = std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
285  if (iFoundPreceding == iFound) {
286  break;
287  } else {
288  return iFoundPreceding == subProcessIndexes.begin();
289  }
290  }
291  throw edm::Exception(edm::errors::LogicError) << "EventSetupsController::isFirstMatch\n"
292  << "Subprocess index not found. This should never happen\n"
293  << "Please report this to a Framework Developer\n";
294  return false;
295  }

References bookConverter::elements, esproducers_, Exception, spr::find(), and edm::errors::LogicError.

Referenced by edm::eventsetup::EventSetupProvider::checkESProducerSharing().

◆ isLastMatch()

bool edm::eventsetup::EventSetupsController::isLastMatch ( ParameterSetID const &  psetID,
unsigned  subProcessIndex,
unsigned  precedingProcessIndex 
) const

Definition at line 297 of file EventSetupsController.cc.

299  {
300  auto elements = esproducers_.equal_range(psetID);
301  for (auto it = elements.first; it != elements.second; ++it) {
302  std::vector<unsigned> const& subProcessIndexes = it->second.subProcessIndexes();
303 
304  auto iFound = std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
305  if (iFound == subProcessIndexes.end()) {
306  continue;
307  }
308 
309  auto iFoundPreceding = std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
310  if (iFoundPreceding == iFound) {
311  break;
312  } else {
313  return (++iFoundPreceding) == iFound;
314  }
315  }
316  throw edm::Exception(edm::errors::LogicError) << "EventSetupsController::isLastMatch\n"
317  << "Subprocess index not found. This should never happen\n"
318  << "Please report this to a Framework Developer\n";
319  return false;
320  }

References bookConverter::elements, esproducers_, Exception, spr::find(), and edm::errors::LogicError.

Referenced by edm::eventsetup::EventSetupProvider::checkESProducerSharing().

◆ isMatchingESProducer()

bool edm::eventsetup::EventSetupsController::isMatchingESProducer ( ParameterSetID const &  psetID,
unsigned  subProcessIndex,
unsigned  precedingProcessIndex 
) const

Definition at line 347 of file EventSetupsController.cc.

349  {
350  auto elements = esproducers_.equal_range(psetID);
351  for (auto it = elements.first; it != elements.second; ++it) {
352  std::vector<unsigned> const& subProcessIndexes = it->second.subProcessIndexes();
353 
354  auto iFound = std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
355  if (iFound == subProcessIndexes.end()) {
356  continue;
357  }
358 
359  auto iFoundPreceding = std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
360  if (iFoundPreceding == iFound) {
361  return false;
362  } else {
363  return true;
364  }
365  }
366  throw edm::Exception(edm::errors::LogicError) << "EventSetupsController::lookForMatchingESSource\n"
367  << "Subprocess index not found. This should never happen\n"
368  << "Please report this to a Framework Developer\n";
369  return false;
370  }

References bookConverter::elements, esproducers_, Exception, spr::find(), and edm::errors::LogicError.

Referenced by edm::eventsetup::EventSetupProvider::doRecordsMatch().

◆ isMatchingESSource()

bool edm::eventsetup::EventSetupsController::isMatchingESSource ( ParameterSetID const &  psetID,
unsigned  subProcessIndex,
unsigned  precedingProcessIndex 
) const

Definition at line 322 of file EventSetupsController.cc.

324  {
325  auto elements = essources_.equal_range(psetID);
326  for (auto it = elements.first; it != elements.second; ++it) {
327  std::vector<unsigned> const& subProcessIndexes = it->second.subProcessIndexes();
328 
329  auto iFound = std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
330  if (iFound == subProcessIndexes.end()) {
331  continue;
332  }
333 
334  auto iFoundPreceding = std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
335  if (iFoundPreceding == iFound) {
336  return false;
337  } else {
338  return true;
339  }
340  }
341  throw edm::Exception(edm::errors::LogicError) << "EventSetupsController::lookForMatchingESSource\n"
342  << "Subprocess index not found. This should never happen\n"
343  << "Please report this to a Framework Developer\n";
344  return false;
345  }

References bookConverter::elements, essources_, Exception, spr::find(), and edm::errors::LogicError.

Referenced by edm::eventsetup::EventSetupProvider::doRecordsMatch().

◆ lookForMatches()

void edm::eventsetup::EventSetupsController::lookForMatches ( ParameterSetID const &  psetID,
unsigned  subProcessIndex,
unsigned  precedingProcessIndex,
bool &  firstProcessWithThisPSet,
bool &  precedingHasMatchingPSet 
) const

Definition at line 238 of file EventSetupsController.cc.

242  {
243  auto elements = esproducers_.equal_range(psetID);
244  for (auto it = elements.first; it != elements.second; ++it) {
245  std::vector<unsigned> const& subProcessIndexes = it->second.subProcessIndexes();
246 
247  auto iFound = std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
248  if (iFound == subProcessIndexes.end()) {
249  continue;
250  }
251 
252  if (iFound == subProcessIndexes.begin()) {
253  firstProcessWithThisPSet = true;
254  precedingHasMatchingPSet = false;
255  } else {
256  auto iFoundPreceding = std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
257  if (iFoundPreceding == iFound) {
258  firstProcessWithThisPSet = false;
259  precedingHasMatchingPSet = false;
260  } else {
261  firstProcessWithThisPSet = false;
262  precedingHasMatchingPSet = true;
263  }
264  }
265  return;
266  }
267  throw edm::Exception(edm::errors::LogicError) << "EventSetupsController::lookForMatches\n"
268  << "Subprocess index not found. This should never happen\n"
269  << "Please report this to a Framework Developer\n";
270  }

References bookConverter::elements, esproducers_, Exception, spr::find(), and edm::errors::LogicError.

Referenced by edm::eventsetup::EventSetupProvider::checkESProducerSharing().

◆ makeProvider()

std::shared_ptr< EventSetupProvider > edm::eventsetup::EventSetupsController::makeProvider ( ParameterSet iPSet,
ActivityRegistry activityRegistry,
ParameterSet const *  eventSetupPset = nullptr 
)

Definition at line 36 of file EventSetupsController.cc.

38  {
39  // Makes an EventSetupProvider
40  // Also parses the prefer information from ParameterSets and puts
41  // it in a map that is stored in the EventSetupProvider
42  std::shared_ptr<EventSetupProvider> returnValue(
43  makeEventSetupProvider(iPSet, providers_.size(), activityRegistry));
44 
45  // Construct the ESProducers and ESSources
46  // shared_ptrs to them are temporarily stored in this
47  // EventSetupsController and in the EventSetupProvider
48  fillEventSetupProvider(*this, *returnValue, iPSet);
49 
51 
52  providers_.push_back(returnValue);
53  return returnValue;
54  }

References edm::eventsetup::fillEventSetupProvider(), edm::eventsetup::makeEventSetupProvider(), numberOfConcurrentIOVs_, providers_, and edm::eventsetup::NumberOfConcurrentIOVs::readConfigurationParameters().

Referenced by edm::SubProcess::SubProcess().

◆ mustFinishConfiguration()

bool edm::eventsetup::EventSetupsController::mustFinishConfiguration ( ) const
inline

Definition at line 160 of file EventSetupsController.h.

160 { return mustFinishConfiguration_; }

References mustFinishConfiguration_.

◆ operator=()

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

◆ providers()

std::vector<propagate_const<std::shared_ptr<EventSetupProvider> > > const& edm::eventsetup::EventSetupsController::providers ( ) const
inline

Definition at line 153 of file EventSetupsController.h.

153 { return providers_; }

References providers_.

◆ putESProducer()

void edm::eventsetup::EventSetupsController::putESProducer ( ParameterSet const &  pset,
std::shared_ptr< DataProxyProvider > const &  component,
unsigned  subProcessIndex 
)

Definition at line 198 of file EventSetupsController.cc.

200  {
201  auto newElement =
202  esproducers_.insert(std::pair<ParameterSetID, ESProducerInfo>(pset.id(), ESProducerInfo(&pset, component)));
203  // Register processes with an exact match
204  newElement->second.subProcessIndexes().push_back(subProcessIndex);
205  }

References esproducers_, and muonDTDigis_cfi::pset.

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

◆ putESSource()

void edm::eventsetup::EventSetupsController::putESSource ( ParameterSet const &  pset,
std::shared_ptr< EventSetupRecordIntervalFinder > const &  component,
unsigned  subProcessIndex 
)

Definition at line 224 of file EventSetupsController.cc.

226  {
227  auto newElement =
228  essources_.insert(std::pair<ParameterSetID, ESSourceInfo>(pset.id(), ESSourceInfo(&pset, component)));
229  // Register processes with an exact match
230  newElement->second.subProcessIndexes().push_back(subProcessIndex);
231  }

References essources_, and muonDTDigis_cfi::pset.

Referenced by edm::eventsetup::SourceMakerTraits::putComponent().

◆ setMaxConcurrentIOVs()

void edm::eventsetup::EventSetupsController::setMaxConcurrentIOVs ( unsigned int  nStreams,
unsigned int  nConcurrentLumis 
)

Member Data Documentation

◆ esproducers_

std::multimap<ParameterSetID, ESProducerInfo> edm::eventsetup::EventSetupsController::esproducers_
private

◆ essources_

std::multimap<ParameterSetID, ESSourceInfo> edm::eventsetup::EventSetupsController::essources_
private

◆ eventSetupRecordIOVQueues_

std::vector<propagate_const<std::unique_ptr<EventSetupRecordIOVQueue> > > edm::eventsetup::EventSetupsController::eventSetupRecordIOVQueues_
private

◆ hasNonconcurrentFinder_

bool edm::eventsetup::EventSetupsController::hasNonconcurrentFinder_ = false
private

Definition at line 187 of file EventSetupsController.h.

Referenced by finishConfiguration(), and hasNonconcurrentFinder().

◆ mustFinishConfiguration_

bool edm::eventsetup::EventSetupsController::mustFinishConfiguration_ = true
private

Definition at line 188 of file EventSetupsController.h.

Referenced by finishConfiguration(), and mustFinishConfiguration().

◆ numberOfConcurrentIOVs_

NumberOfConcurrentIOVs edm::eventsetup::EventSetupsController::numberOfConcurrentIOVs_
private

◆ providers_

std::vector<propagate_const<std::shared_ptr<EventSetupProvider> > > edm::eventsetup::EventSetupsController::providers_
private
edm::eventsetup::EventSetupsController::eventSetupForInstance
void eventSetupForInstance(IOVSyncValue const &, WaitingTaskHolder const &taskToStartAfterIOVInit, WaitingTaskList &endIOVWaitingTasks, std::vector< std::shared_ptr< const EventSetupImpl >> &)
Definition: EventSetupsController.cc:86
edm::errors::LogicError
Definition: EDMException.h:37
edm::eventsetup::EventSetupsController::eventSetupRecordIOVQueues_
std::vector< propagate_const< std::unique_ptr< EventSetupRecordIOVQueue > > > eventSetupRecordIOVQueues_
Definition: EventSetupsController.h:172
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
CMS_SA_ALLOW
#define CMS_SA_ALLOW
Definition: thread_safety_macros.h:5
edm::eventsetup::makeEventSetupProvider
std::unique_ptr< EventSetupProvider > makeEventSetupProvider(ParameterSet const &params, unsigned subProcessIndex, ActivityRegistry *)
Definition: EventSetupProviderMaker.cc:25
edm::eventsetup::EventSetupsController::providers_
std::vector< propagate_const< std::shared_ptr< EventSetupProvider > > > providers_
Definition: EventSetupsController.h:167
edm::eventsetup::EventSetupsController::essources_
std::multimap< ParameterSetID, ESSourceInfo > essources_
Definition: EventSetupsController.h:185
WaitingTaskHolder
edm::eventsetup::EventSetupsController::numberOfConcurrentIOVs_
NumberOfConcurrentIOVs numberOfConcurrentIOVs_
Definition: EventSetupsController.h:168
edm::eventsetup::EventSetupsController::checkESProducerSharing
void checkESProducerSharing()
Definition: EventSetupsController.cc:390
edm::eventsetup::NumberOfConcurrentIOVs::readConfigurationParameters
void readConfigurationParameters(ParameterSet const *eventSetupPset)
Definition: NumberOfConcurrentIOVs.cc:19
edm::eventsetup::EventSetupsController::hasNonconcurrentFinder_
bool hasNonconcurrentFinder_
Definition: EventSetupsController.h:187
edm::eventsetup::EventSetupsController::finishConfiguration
void finishConfiguration()
Definition: EventSetupsController.cc:60
WaitingTaskList
edm::make_empty_waiting_task
std::unique_ptr< edm::EmptyWaitingTask, waitingtask::TaskDestroyer > make_empty_waiting_task()
Create an EmptyWaitingTask which will properly be destroyed.
Definition: WaitingTaskList.h:96
edm::isTransientEqual
bool isTransientEqual(ParameterSet const &a, ParameterSet const &b)
Definition: ParameterSet.cc:770
edm::eventsetup::NumberOfConcurrentIOVs::numberOfConcurrentIOVs
unsigned int numberOfConcurrentIOVs(EventSetupRecordKey const &, bool printInfoMsg=false) const
Definition: NumberOfConcurrentIOVs.cc:47
edm::eventsetup::NumberOfConcurrentIOVs::clear
void clear()
Definition: NumberOfConcurrentIOVs.cc:75
edm::eventsetup::EventSetupsController::hasNonconcurrentFinder
bool hasNonconcurrentFinder() const
Definition: EventSetupsController.h:159
bookConverter.elements
elements
Definition: bookConverter.py:147
edm::eventsetup::NumberOfConcurrentIOVs::fillRecordsNotAllowingConcurrentIOVs
void fillRecordsNotAllowingConcurrentIOVs(EventSetupProvider const &)
Definition: NumberOfConcurrentIOVs.cc:43
Exception
Definition: hltDiff.cc:246
edm::eventsetup::fillEventSetupProvider
void fillEventSetupProvider(EventSetupsController &esController, EventSetupProvider &cp, ParameterSet &params)
Definition: EventSetupProviderMaker.cc:93
edm::eventsetup::EventSetupsController::initializeEventSetupRecordIOVQueues
void initializeEventSetupRecordIOVQueues()
Definition: EventSetupsController.cc:428
edm::eventsetup::EventSetupsController::mustFinishConfiguration_
bool mustFinishConfiguration_
Definition: EventSetupsController.h:188
edm::eventsetup::NumberOfConcurrentIOVs::setMaxConcurrentIOVs
void setMaxConcurrentIOVs(unsigned int nStreams, unsigned int nConcurrentLumis)
Definition: NumberOfConcurrentIOVs.cc:39
edm::eventsetup::EventSetupsController::clearComponents
void clearComponents()
Definition: EventSetupsController.cc:233
edm::eventsetup::EventSetupsController::esproducers_
std::multimap< ParameterSetID, ESProducerInfo > esproducers_
Definition: EventSetupsController.h:184
crabWrapper.key
key
Definition: crabWrapper.py:19
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27