32 namespace eventsetup {
38 eventSetupRecordIOVQueue->endIOVAsync(iEndTask);
45 unsigned int maxConcurrentIOVs,
50 std::shared_ptr<EventSetupProvider> returnValue(
94 std::vector<std::shared_ptr<const EventSetupImpl>>& eventSetupImpls) {
97 bool newEventSetupImpl =
false;
98 eventSetupImpls.clear();
105 eventSetupProvider->setAllValidityIntervals(syncValue);
113 eventSetupRecordIOVQueue->setNewIntervalForAnySubProcess();
121 eventSetupImpls.push_back(eventSetupProvider->eventSetupForInstance(syncValue, newEventSetupImpl));
125 eventSetupRecordIOVQueue->checkForNewIOVs(taskToStartAfterIOVInit, endIOVWaitingTasks, newEventSetupImpl);
132 if (eventSetupProvider->doWeNeedToWaitForIOVsToFinish(syncValue)) {
142 eventSetupProvider->forceCacheClear();
154 it->second.subProcessIndexes().push_back(subProcessIndex);
156 return it->second.provider();
160 return std::shared_ptr<DataProxyProvider>();
164 std::shared_ptr<DataProxyProvider>
const& component,
165 unsigned subProcessIndex) {
169 newElement->second.subProcessIndexes().push_back(subProcessIndex);
180 it->second.subProcessIndexes().push_back(subProcessIndex);
182 return it->second.finder();
186 return std::shared_ptr<EventSetupRecordIntervalFinder>();
190 std::shared_ptr<EventSetupRecordIntervalFinder>
const& component,
191 unsigned subProcessIndex) {
195 newElement->second.subProcessIndexes().push_back(subProcessIndex);
204 unsigned subProcessIndex,
205 unsigned precedingProcessIndex,
206 bool& firstProcessWithThisPSet,
207 bool& precedingHasMatchingPSet)
const {
210 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
212 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
213 if (iFound == subProcessIndexes.end()) {
217 if (iFound == subProcessIndexes.begin()) {
218 firstProcessWithThisPSet =
true;
219 precedingHasMatchingPSet =
false;
221 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
222 if (iFoundPreceding == iFound) {
223 firstProcessWithThisPSet =
false;
224 precedingHasMatchingPSet =
false;
226 firstProcessWithThisPSet =
false;
227 precedingHasMatchingPSet =
true;
233 <<
"Subprocess index not found. This should never happen\n"
234 <<
"Please report this to a Framework Developer\n";
238 unsigned subProcessIndex,
239 unsigned precedingProcessIndex)
const {
242 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
244 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
245 if (iFound == subProcessIndexes.end()) {
249 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
250 if (iFoundPreceding == iFound) {
253 return iFoundPreceding == subProcessIndexes.begin();
257 <<
"Subprocess index not found. This should never happen\n"
258 <<
"Please report this to a Framework Developer\n";
263 unsigned subProcessIndex,
264 unsigned precedingProcessIndex)
const {
267 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
269 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
270 if (iFound == subProcessIndexes.end()) {
274 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
275 if (iFoundPreceding == iFound) {
278 return (++iFoundPreceding) == iFound;
282 <<
"Subprocess index not found. This should never happen\n"
283 <<
"Please report this to a Framework Developer\n";
288 unsigned subProcessIndex,
289 unsigned precedingProcessIndex)
const {
292 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
294 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
295 if (iFound == subProcessIndexes.end()) {
299 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
300 if (iFoundPreceding == iFound) {
307 <<
"Subprocess index not found. This should never happen\n"
308 <<
"Please report this to a Framework Developer\n";
313 unsigned subProcessIndex,
314 unsigned precedingProcessIndex)
const {
317 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
319 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
320 if (iFound == subProcessIndexes.end()) {
324 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
325 if (iFoundPreceding == iFound) {
332 <<
"Subprocess index not found. This should never happen\n"
333 <<
"Please report this to a Framework Developer\n";
338 unsigned subProcessIndex)
const {
341 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
343 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
344 if (iFound == subProcessIndexes.end()) {
347 return it->second.pset();
350 <<
"Subprocess index not found. This should never happen\n"
351 <<
"Please report this to a Framework Developer\n";
359 if (esProvider != esProviderEnd)
361 for (; esProvider != esProviderEnd; ++esProvider) {
369 std::set<ParameterSetIDHolder> sharingCheckDone;
376 std::map<EventSetupRecordKey, std::vector<ComponentDescription const*>> referencedESProducers;
382 for (
auto precedingESProvider =
providers_.begin(); precedingESProvider != esProvider; ++precedingESProvider) {
383 (*esProvider)->checkESProducerSharing(**precedingESProvider, sharingCheckDone, referencedESProducers, *
this);
386 (*esProvider)->resetRecordToProxyPointers();
389 eventSetupProvider->clearInitializationData();
394 std::set<EventSetupRecordKey>
keys;
396 provider->fillKeys(
keys);
413 tbb::task_group& iGroup,
419 std::vector<std::shared_ptr<const EventSetupImpl>> dummyEventSetupImpls;
422 WaitingTaskHolder waitingTaskHolder(iGroup, &waitUntilIOVInitializationCompletes);
427 syncValue, waitingTaskHolder, dummyWaitingTaskList, dummyEventSetupImpls);
428 dummyWaitingTaskList.
doneWaiting(std::exception_ptr{});
430 dummyWaitingTaskList.
doneWaiting(std::exception_ptr{});
431 waitingTaskHolder.
doneWaiting(std::current_exception());
436 }
while (not waitUntilIOVInitializationCompletes.
done());
438 if (waitUntilIOVInitializationCompletes.
exceptionPtr() !=
nullptr) {
439 std::rethrow_exception(*(waitUntilIOVInitializationCompletes.
exceptionPtr()));