32 namespace eventsetup {
38 eventSetupRecordIOVQueue->endIOV();
48 std::shared_ptr<EventSetupProvider> returnValue(
96 std::vector<std::shared_ptr<const EventSetupImpl>>& eventSetupImpls) {
99 bool newEventSetupImpl =
false;
100 eventSetupImpls.clear();
107 eventSetupProvider->setAllValidityIntervals(syncValue);
115 eventSetupRecordIOVQueue->setNewIntervalForAnySubProcess();
123 eventSetupImpls.push_back(eventSetupProvider->eventSetupForInstance(syncValue, newEventSetupImpl));
127 eventSetupRecordIOVQueue->checkForNewIOVs(taskToStartAfterIOVInit, endIOVWaitingTasks, newEventSetupImpl);
145 waitUntilIOVInitializationCompletes->increment_ref_count();
149 std::vector<std::shared_ptr<const EventSetupImpl>> dummyEventSetupImpls;
157 dummyWaitingTaskList.
doneWaiting(std::exception_ptr{});
159 dummyWaitingTaskList.
doneWaiting(std::exception_ptr{});
160 waitingTaskHolder.doneWaiting(std::current_exception());
163 waitUntilIOVInitializationCompletes->wait_for_all();
165 if (waitUntilIOVInitializationCompletes->exceptionPtr() !=
nullptr) {
166 std::rethrow_exception(*(waitUntilIOVInitializationCompletes->exceptionPtr()));
173 if (eventSetupProvider->doWeNeedToWaitForIOVsToFinish(syncValue)) {
183 eventSetupProvider->forceCacheClear();
195 it->second.subProcessIndexes().push_back(subProcessIndex);
197 return it->second.provider();
201 return std::shared_ptr<DataProxyProvider>();
205 std::shared_ptr<DataProxyProvider>
const& component,
206 unsigned subProcessIndex) {
210 newElement->second.subProcessIndexes().push_back(subProcessIndex);
221 it->second.subProcessIndexes().push_back(subProcessIndex);
223 return it->second.finder();
227 return std::shared_ptr<EventSetupRecordIntervalFinder>();
231 std::shared_ptr<EventSetupRecordIntervalFinder>
const& component,
232 unsigned subProcessIndex) {
236 newElement->second.subProcessIndexes().push_back(subProcessIndex);
245 unsigned subProcessIndex,
246 unsigned precedingProcessIndex,
247 bool& firstProcessWithThisPSet,
248 bool& precedingHasMatchingPSet)
const {
251 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
253 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
254 if (iFound == subProcessIndexes.end()) {
258 if (iFound == subProcessIndexes.begin()) {
259 firstProcessWithThisPSet =
true;
260 precedingHasMatchingPSet =
false;
262 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
263 if (iFoundPreceding == iFound) {
264 firstProcessWithThisPSet =
false;
265 precedingHasMatchingPSet =
false;
267 firstProcessWithThisPSet =
false;
268 precedingHasMatchingPSet =
true;
274 <<
"Subprocess index not found. This should never happen\n"
275 <<
"Please report this to a Framework Developer\n";
279 unsigned subProcessIndex,
280 unsigned precedingProcessIndex)
const {
283 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
285 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
286 if (iFound == subProcessIndexes.end()) {
290 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
291 if (iFoundPreceding == iFound) {
294 return iFoundPreceding == subProcessIndexes.begin();
298 <<
"Subprocess index not found. This should never happen\n"
299 <<
"Please report this to a Framework Developer\n";
304 unsigned subProcessIndex,
305 unsigned precedingProcessIndex)
const {
308 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
310 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
311 if (iFound == subProcessIndexes.end()) {
315 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
316 if (iFoundPreceding == iFound) {
319 return (++iFoundPreceding) == iFound;
323 <<
"Subprocess index not found. This should never happen\n"
324 <<
"Please report this to a Framework Developer\n";
329 unsigned subProcessIndex,
330 unsigned precedingProcessIndex)
const {
333 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
335 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
336 if (iFound == subProcessIndexes.end()) {
340 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
341 if (iFoundPreceding == iFound) {
348 <<
"Subprocess index not found. This should never happen\n"
349 <<
"Please report this to a Framework Developer\n";
354 unsigned subProcessIndex,
355 unsigned precedingProcessIndex)
const {
358 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
360 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
361 if (iFound == subProcessIndexes.end()) {
365 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
366 if (iFoundPreceding == iFound) {
373 <<
"Subprocess index not found. This should never happen\n"
374 <<
"Please report this to a Framework Developer\n";
379 unsigned subProcessIndex)
const {
382 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
384 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
385 if (iFound == subProcessIndexes.end()) {
388 return it->second.pset();
391 <<
"Subprocess index not found. This should never happen\n"
392 <<
"Please report this to a Framework Developer\n";
400 if (esProvider != esProviderEnd)
402 for (; esProvider != esProviderEnd; ++esProvider) {
410 std::set<ParameterSetIDHolder> sharingCheckDone;
417 std::map<EventSetupRecordKey, std::vector<ComponentDescription const*>> referencedESProducers;
423 for (
auto precedingESProvider =
providers_.begin(); precedingESProvider != esProvider; ++precedingESProvider) {
424 (*esProvider)->checkESProducerSharing(**precedingESProvider, sharingCheckDone, referencedESProducers, *
this);
427 (*esProvider)->resetRecordToProxyPointers();
430 eventSetupProvider->clearInitializationData();
435 std::set<EventSetupRecordKey>
keys;
437 provider->fillKeys(
keys);