32 namespace eventsetup {
42 std::shared_ptr<EventSetupProvider> returnValue(
90 std::vector<std::shared_ptr<const EventSetupImpl>>& eventSetupImpls) {
93 bool newEventSetupImpl =
false;
94 eventSetupImpls.clear();
101 eventSetupProvider->setAllValidityIntervals(syncValue);
109 eventSetupRecordIOVQueue->setNewIntervalForAnySubProcess();
117 eventSetupImpls.push_back(eventSetupProvider->eventSetupForInstance(syncValue, newEventSetupImpl));
121 eventSetupRecordIOVQueue->checkForNewIOVs(taskToStartAfterIOVInit, endIOVWaitingTasks, newEventSetupImpl);
139 waitUntilIOVInitializationCompletes->increment_ref_count();
143 std::vector<std::shared_ptr<const EventSetupImpl>> dummyEventSetupImpls;
151 dummyWaitingTaskList.
doneWaiting(std::exception_ptr{});
153 dummyWaitingTaskList.
doneWaiting(std::exception_ptr{});
154 waitingTaskHolder.doneWaiting(std::current_exception());
157 waitUntilIOVInitializationCompletes->wait_for_all();
159 if (waitUntilIOVInitializationCompletes->exceptionPtr() !=
nullptr) {
160 std::rethrow_exception(*(waitUntilIOVInitializationCompletes->exceptionPtr()));
167 if (eventSetupProvider->doWeNeedToWaitForIOVsToFinish(syncValue)) {
177 eventSetupProvider->forceCacheClear();
189 it->second.subProcessIndexes().push_back(subProcessIndex);
191 return it->second.provider();
195 return std::shared_ptr<DataProxyProvider>();
199 std::shared_ptr<DataProxyProvider>
const& component,
200 unsigned subProcessIndex) {
204 newElement->second.subProcessIndexes().push_back(subProcessIndex);
215 it->second.subProcessIndexes().push_back(subProcessIndex);
217 return it->second.finder();
221 return std::shared_ptr<EventSetupRecordIntervalFinder>();
225 std::shared_ptr<EventSetupRecordIntervalFinder>
const& component,
226 unsigned subProcessIndex) {
230 newElement->second.subProcessIndexes().push_back(subProcessIndex);
239 unsigned subProcessIndex,
240 unsigned precedingProcessIndex,
241 bool& firstProcessWithThisPSet,
242 bool& precedingHasMatchingPSet)
const {
245 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
247 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
248 if (iFound == subProcessIndexes.end()) {
252 if (iFound == subProcessIndexes.begin()) {
253 firstProcessWithThisPSet =
true;
254 precedingHasMatchingPSet =
false;
256 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
257 if (iFoundPreceding == iFound) {
258 firstProcessWithThisPSet =
false;
259 precedingHasMatchingPSet =
false;
261 firstProcessWithThisPSet =
false;
262 precedingHasMatchingPSet =
true;
268 <<
"Subprocess index not found. This should never happen\n"
269 <<
"Please report this to a Framework Developer\n";
273 unsigned subProcessIndex,
274 unsigned precedingProcessIndex)
const {
277 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
279 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
280 if (iFound == subProcessIndexes.end()) {
284 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
285 if (iFoundPreceding == iFound) {
288 return iFoundPreceding == subProcessIndexes.begin();
292 <<
"Subprocess index not found. This should never happen\n"
293 <<
"Please report this to a Framework Developer\n";
298 unsigned subProcessIndex,
299 unsigned precedingProcessIndex)
const {
302 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
304 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
305 if (iFound == subProcessIndexes.end()) {
309 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
310 if (iFoundPreceding == iFound) {
313 return (++iFoundPreceding) == iFound;
317 <<
"Subprocess index not found. This should never happen\n"
318 <<
"Please report this to a Framework Developer\n";
323 unsigned subProcessIndex,
324 unsigned precedingProcessIndex)
const {
327 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
329 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
330 if (iFound == subProcessIndexes.end()) {
334 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
335 if (iFoundPreceding == iFound) {
342 <<
"Subprocess index not found. This should never happen\n"
343 <<
"Please report this to a Framework Developer\n";
348 unsigned subProcessIndex,
349 unsigned precedingProcessIndex)
const {
352 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
354 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
355 if (iFound == subProcessIndexes.end()) {
359 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
360 if (iFoundPreceding == iFound) {
367 <<
"Subprocess index not found. This should never happen\n"
368 <<
"Please report this to a Framework Developer\n";
373 unsigned subProcessIndex)
const {
376 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
378 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
379 if (iFound == subProcessIndexes.end()) {
382 return it->second.pset();
385 <<
"Subprocess index not found. This should never happen\n"
386 <<
"Please report this to a Framework Developer\n";
394 if (esProvider != esProviderEnd)
396 for (; esProvider != esProviderEnd; ++esProvider) {
404 std::set<ParameterSetIDHolder> sharingCheckDone;
411 std::map<EventSetupRecordKey, std::vector<ComponentDescription const*>> referencedESProducers;
417 for (
auto precedingESProvider =
providers_.begin(); precedingESProvider != esProvider; ++precedingESProvider) {
418 (*esProvider)->checkESProducerSharing(**precedingESProvider, sharingCheckDone, referencedESProducers, *
this);
421 (*esProvider)->resetRecordToProxyPointers();
424 eventSetupProvider->clearInitializationData();
429 std::set<EventSetupRecordKey>
keys;
431 provider->fillKeys(
keys);