32 namespace eventsetup {
38 eventSetupRecordIOVQueue->endIOVAsync(iEndTask);
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);
134 if (eventSetupProvider->doWeNeedToWaitForIOVsToFinish(syncValue)) {
144 eventSetupProvider->forceCacheClear();
156 it->second.subProcessIndexes().push_back(subProcessIndex);
158 return it->second.provider();
162 return std::shared_ptr<DataProxyProvider>();
166 std::shared_ptr<DataProxyProvider>
const& component,
167 unsigned subProcessIndex) {
171 newElement->second.subProcessIndexes().push_back(subProcessIndex);
182 it->second.subProcessIndexes().push_back(subProcessIndex);
184 return it->second.finder();
188 return std::shared_ptr<EventSetupRecordIntervalFinder>();
192 std::shared_ptr<EventSetupRecordIntervalFinder>
const& component,
193 unsigned subProcessIndex) {
197 newElement->second.subProcessIndexes().push_back(subProcessIndex);
206 unsigned subProcessIndex,
207 unsigned precedingProcessIndex,
208 bool& firstProcessWithThisPSet,
209 bool& precedingHasMatchingPSet)
const {
212 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
214 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
215 if (iFound == subProcessIndexes.end()) {
219 if (iFound == subProcessIndexes.begin()) {
220 firstProcessWithThisPSet =
true;
221 precedingHasMatchingPSet =
false;
223 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
224 if (iFoundPreceding == iFound) {
225 firstProcessWithThisPSet =
false;
226 precedingHasMatchingPSet =
false;
228 firstProcessWithThisPSet =
false;
229 precedingHasMatchingPSet =
true;
235 <<
"Subprocess index not found. This should never happen\n"
236 <<
"Please report this to a Framework Developer\n";
240 unsigned subProcessIndex,
241 unsigned precedingProcessIndex)
const {
244 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
246 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
247 if (iFound == subProcessIndexes.end()) {
251 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
252 if (iFoundPreceding == iFound) {
255 return iFoundPreceding == subProcessIndexes.begin();
259 <<
"Subprocess index not found. This should never happen\n"
260 <<
"Please report this to a Framework Developer\n";
265 unsigned subProcessIndex,
266 unsigned precedingProcessIndex)
const {
269 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
271 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
272 if (iFound == subProcessIndexes.end()) {
276 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
277 if (iFoundPreceding == iFound) {
280 return (++iFoundPreceding) == iFound;
284 <<
"Subprocess index not found. This should never happen\n"
285 <<
"Please report this to a Framework Developer\n";
290 unsigned subProcessIndex,
291 unsigned precedingProcessIndex)
const {
294 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
296 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
297 if (iFound == subProcessIndexes.end()) {
301 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
302 if (iFoundPreceding == iFound) {
309 <<
"Subprocess index not found. This should never happen\n"
310 <<
"Please report this to a Framework Developer\n";
315 unsigned subProcessIndex,
316 unsigned precedingProcessIndex)
const {
319 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
321 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
322 if (iFound == subProcessIndexes.end()) {
326 auto iFoundPreceding =
std::find(subProcessIndexes.begin(), iFound, precedingProcessIndex);
327 if (iFoundPreceding == iFound) {
334 <<
"Subprocess index not found. This should never happen\n"
335 <<
"Please report this to a Framework Developer\n";
340 unsigned subProcessIndex)
const {
343 std::vector<unsigned>
const& subProcessIndexes = it->second.subProcessIndexes();
345 auto iFound =
std::find(subProcessIndexes.begin(), subProcessIndexes.end(), subProcessIndex);
346 if (iFound == subProcessIndexes.end()) {
349 return it->second.pset();
352 <<
"Subprocess index not found. This should never happen\n"
353 <<
"Please report this to a Framework Developer\n";
361 if (esProvider != esProviderEnd)
363 for (; esProvider != esProviderEnd; ++esProvider) {
371 std::set<ParameterSetIDHolder> sharingCheckDone;
378 std::map<EventSetupRecordKey, std::vector<ComponentDescription const*>> referencedESProducers;
384 for (
auto precedingESProvider =
providers_.begin(); precedingESProvider != esProvider; ++precedingESProvider) {
385 (*esProvider)->checkESProducerSharing(**precedingESProvider, sharingCheckDone, referencedESProducers, *
this);
388 (*esProvider)->resetRecordToProxyPointers();
391 eventSetupProvider->clearInitializationData();
396 std::set<EventSetupRecordKey>
keys;
398 provider->fillKeys(
keys);
415 tbb::task_group& iGroup,
421 std::vector<std::shared_ptr<const EventSetupImpl>> dummyEventSetupImpls;
424 WaitingTaskHolder waitingTaskHolder(iGroup, &waitUntilIOVInitializationCompletes);
429 syncValue, waitingTaskHolder, dummyWaitingTaskList, dummyEventSetupImpls);
430 dummyWaitingTaskList.
doneWaiting(std::exception_ptr{});
432 dummyWaitingTaskList.
doneWaiting(std::exception_ptr{});
433 waitingTaskHolder.
doneWaiting(std::current_exception());
438 }
while (not waitUntilIOVInitializationCompletes.
done());
440 if (waitUntilIOVInitializationCompletes.
exceptionPtr() !=
nullptr) {
441 std::rethrow_exception(*(waitUntilIOVInitializationCompletes.
exceptionPtr()));