CMS 3D CMS Logo

ProductResolvers.cc
Go to the documentation of this file.
1 /*----------------------------------------------------------------------
2 ----------------------------------------------------------------------*/
3 #include "ProductResolvers.h"
4 #include "Worker.h"
5 #include "UnscheduledAuxiliary.h"
22 
23 #include <cassert>
24 #include <utility>
25 
26 static constexpr unsigned int kUnsetOffset = 0;
27 static constexpr unsigned int kAmbiguousOffset = 1;
28 static constexpr unsigned int kMissingOffset = 2;
29 
30 namespace edm {
31 
34  exception << "DataManagingProductResolver::resolveProduct_: The product matching all criteria was already deleted\n"
35  << "Looking for type: " << branchDescription().unwrappedTypeID() << "\n"
36  << "Looking for module label: " << moduleLabel() << "\n"
37  << "Looking for productInstanceName: " << productInstanceName() << "\n"
38  << (processName().empty() ? "" : "Looking for process: ") << processName() << "\n"
39  << "This means there is a configuration error.\n"
40  << "The module which is asking for this data must be configured to state that it will read this data.";
41  throw exception;
42  }
43 
44  //This is a templated function in order to avoid calling another virtual function
45  template <bool callResolver, typename FUNC>
47  if (productWasDeleted()) {
49  }
50  auto presentStatus = status();
51 
52  if (callResolver && presentStatus == ProductStatus::ResolveNotRun) {
53  //if resolver fails because of exception or not setting product
54  // make sure the status goes to failed
55  auto failedStatusSetter = [this](ProductStatus* iPresentStatus) {
56  if (this->status() == ProductStatus::ResolveNotRun) {
57  this->setFailedStatus();
58  }
59  *iPresentStatus = this->status();
60  };
61  std::unique_ptr<ProductStatus, decltype(failedStatusSetter)> failedStatusGuard(&presentStatus,
62  failedStatusSetter);
63 
64  //If successful, this will call setProduct
65  resolver();
66  }
67 
68  if (presentStatus == ProductStatus::ProductSet) {
69  auto pd = &getProductData();
70  if (pd->wrapper()->isPresent()) {
71  return Resolution(pd);
72  }
73  }
74 
75  return Resolution(nullptr);
76  }
77 
78  void DataManagingProductResolver::mergeProduct(std::unique_ptr<WrapperBase> iFrom,
79  MergeableRunProductMetadata const* mergeableRunProductMetadata) const {
80  // if its not mergeable and the previous read failed, go ahead and use this one
82  setProduct(std::move(iFrom));
83  return;
84  }
85 
87  if (not iFrom) {
88  return;
89  }
90 
91  checkType(*iFrom);
92 
94  if (original->isMergeable()) {
95  if (original->isPresent() != iFrom->isPresent()) {
97  << "Merge of Run or Lumi product failed for branch " << branchDescription().branchName() << "\n"
98  << "Was trying to merge objects where one product had been put in the input file and the other had not "
99  "been."
100  << "\n"
101  << "The solution is to drop the branch on input. Or better do not create inconsistent files\n"
102  << "that need to be merged in the first place.\n";
103  }
104  if (original->isPresent()) {
105  BranchDescription const& desc = branchDescription_();
106  if (mergeableRunProductMetadata == nullptr || desc.branchType() != InRun) {
107  original->mergeProduct(iFrom.get());
108  } else {
110  mergeableRunProductMetadata->getMergeDecision(desc.processName());
111  if (decision == MergeableRunProductMetadata::MERGE) {
112  original->mergeProduct(iFrom.get());
113  } else if (decision == MergeableRunProductMetadata::REPLACE) {
114  // Note this swaps the content of the product where the
115  // both products branches are present and the product is
116  // also present (was put) in the branch. A module might
117  // have already gotten a pointer to the product so we
118  // keep those pointers valid. This does not call swap
119  // on the Wrapper.
120  original->swapProduct(iFrom.get());
121  }
122  // If the decision is IGNORE, do nothing
123  }
124  }
125  // If both have isPresent false, do nothing
126 
127  } else if (original->hasIsProductEqual()) {
128  if (original->isPresent() && iFrom->isPresent()) {
129  if (!original->isProductEqual(iFrom.get())) {
130  auto const& bd = branchDescription();
131  edm::LogError("RunLumiMerging")
132  << "ProductResolver::mergeTheProduct\n"
133  << "Two run/lumi products for the same run/lumi which should be equal are not\n"
134  << "Using the first, ignoring the second\n"
135  << "className = " << bd.className() << "\n"
136  << "moduleLabel = " << bd.moduleLabel() << "\n"
137  << "instance = " << bd.productInstanceName() << "\n"
138  << "process = " << bd.processName() << "\n";
139  }
140  } else if (!original->isPresent() && iFrom->isPresent()) {
141  setProduct(std::move(iFrom));
142  }
143  // if not iFrom->isPresent(), do nothing
144  } else {
145  auto const& bd = branchDescription();
146  edm::LogWarning("RunLumiMerging") << "ProductResolver::mergeTheProduct\n"
147  << "Run/lumi product has neither a mergeProduct nor isProductEqual function\n"
148  << "Using the first, ignoring the second in merge\n"
149  << "className = " << bd.className() << "\n"
150  << "moduleLabel = " << bd.moduleLabel() << "\n"
151  << "instance = " << bd.productInstanceName() << "\n"
152  << "process = " << bd.processName() << "\n";
153  if (!original->isPresent() && iFrom->isPresent()) {
154  setProduct(std::move(iFrom));
155  }
156  // In other cases, do nothing
157  }
158  }
159 
161  bool,
163  ModuleCallingContext const* mcc) const {
164  return resolveProductImpl<true>([this, &principal, mcc]() {
165  auto branchType = principal.branchType();
166  if (branchType != InEvent) {
167  //delayed get has not been allowed with Run or Lumis
168  // The file may already be closed so the reader is invalid
169  return;
170  }
171  if (mcc and (branchType == InEvent) and aux_) {
173  }
174 
175  auto sentry(make_sentry(mcc, [this, branchType](ModuleCallingContext const* iContext) {
176  if (branchType == InEvent and aux_) {
177  aux_->postModuleDelayedGetSignal_.emit(*(iContext->getStreamContext()), *iContext);
178  }
179  }));
180 
181  if (auto reader = principal.reader()) {
182  std::unique_lock<std::recursive_mutex> guard;
183  if (auto sr = reader->sharedResources().second) {
184  guard = std::unique_lock<std::recursive_mutex>(*sr);
185  }
186  if (not productResolved()) {
187  //another thread could have beaten us here
188  putProduct(reader->getProduct(branchDescription().branchID(), &principal, mcc));
189  }
190  }
191  });
192  }
193 
195  MergeableRunProductMetadata const* mergeableRunProductMetadata) const {
196  if (auto reader = principal.reader()) {
197  std::unique_lock<std::recursive_mutex> guard;
198  if (auto sr = reader->sharedResources().second) {
199  guard = std::unique_lock<std::recursive_mutex>(*sr);
200  }
201 
202  //Can't use resolveProductImpl since it first checks to see
203  // if the product was already retrieved and then returns if it is
204  std::unique_ptr<WrapperBase> edp(reader->getProduct(branchDescription().branchID(), &principal));
205 
206  if (edp.get() != nullptr) {
207  if (edp->isMergeable() && branchDescription().branchType() == InRun && !edp->hasSwap()) {
209  << "Missing definition of member function swap for branch name " << branchDescription().branchName()
210  << "\n"
211  << "Mergeable data types written to a Run must have the swap member function defined"
212  << "\n";
213  }
215  (status() == ProductStatus::ResolveFailed && !branchDescription().isMergeable())) {
216  putOrMergeProduct(std::move(edp), mergeableRunProductMetadata);
217  } else { // status() == ResolveFailed && branchDescription().isMergeable()
219  << "Merge of Run or Lumi product failed for branch " << branchDescription().branchName() << "\n"
220  << "The product branch was dropped in the first run or lumi fragment and present in a later one"
221  << "\n"
222  << "The solution is to drop the branch on input. Or better do not create inconsistent files\n"
223  << "that need to be merged in the first place.\n";
224  }
225  } else if (status() == defaultStatus()) {
226  setFailedStatus();
227  } else if (status() != ProductStatus::ResolveFailed && branchDescription().isMergeable()) {
229  << "Merge of Run or Lumi product failed for branch " << branchDescription().branchName() << "\n"
230  << "The product branch was present in first run or lumi fragment and dropped in a later one"
231  << "\n"
232  << "The solution is to drop the branch on input. Or better do not create inconsistent files\n"
233  << "that need to be merged in the first place.\n";
234  }
235  // Do nothing in other case. status is ResolveFailed already or
236  // it is not mergeable and the status is ProductSet
237  }
238  }
239 
242  }
243 
245  Principal const& principal,
246  bool skipCurrentProcess,
247  ServiceToken const& token,
249  ModuleCallingContext const* mcc) const {
250  //need to try changing m_prefetchRequested before adding to m_waitingTasks
251  bool expected = false;
252  bool prefetchRequested = m_prefetchRequested.compare_exchange_strong(expected, true);
253  m_waitingTasks.add(waitTask);
254 
255  if (prefetchRequested) {
256  auto workToDo = [this, mcc, &principal, token]() {
257  //need to make sure Service system is activated on the reading thread
259  // Caught exception is propagated via WaitingTaskList
260  CMS_SA_ALLOW try {
261  resolveProductImpl<true>([this, &principal, mcc]() {
262  if (principal.branchType() != InEvent) {
263  return;
264  }
265  if (auto reader = principal.reader()) {
266  std::unique_lock<std::recursive_mutex> guard;
267  if (auto sr = reader->sharedResources().second) {
268  guard = std::unique_lock<std::recursive_mutex>(*sr);
269  }
270  if (not productResolved()) {
271  //another thread could have finished this while we were waiting
272  putProduct(reader->getProduct(branchDescription().branchID(), &principal, mcc));
273  }
274  }
275  });
276  } catch (...) {
277  this->m_waitingTasks.doneWaiting(std::current_exception());
278  return;
279  }
280  this->m_waitingTasks.doneWaiting(nullptr);
281  };
282 
283  SerialTaskQueueChain* queue = nullptr;
284  if (auto reader = principal.reader()) {
285  if (auto shared_res = reader->sharedResources().first) {
286  queue = &(shared_res->serialQueueChain());
287  }
288  }
289  if (queue) {
290  queue->push(workToDo);
291  } else {
292  //Have to create a new task
293  auto t = make_functor_task(tbb::task::allocate_root(), workToDo);
294  tbb::task::spawn(*t);
295  }
296  }
297  }
298 
300  if (not deleteEarly) {
301  m_prefetchRequested = false;
303  }
305  }
306 
308  aux_ = iConfigure.auxiliary();
309  }
310 
311  bool InputProductResolver::isFromCurrentProcess() const { return false; }
312 
314  bool skipCurrentProcess,
316  ModuleCallingContext const*) const {
317  if (!skipCurrentProcess) {
318  //'false' means never call the lambda function
319  return resolveProductImpl<false>([]() { return; });
320  }
321  return Resolution(nullptr);
322  }
323 
325  Principal const& principal,
326  bool skipCurrentProcess,
327  ServiceToken const& token,
329  ModuleCallingContext const* mcc) const {
330  if (not skipCurrentProcess) {
331  if (branchDescription().availableOnlyAtEndTransition() and mcc) {
332  if (not mcc->parent().isAtEndTransition()) {
333  return;
334  }
335  }
336  //Need to try modifying prefetchRequested_ before adding to m_waitingTasks
337  bool expected = false;
338  bool prefetchRequested = prefetchRequested_.compare_exchange_strong(expected, true);
339  m_waitingTasks.add(waitTask);
340 
341  if (worker_ and prefetchRequested) {
342  //using a waiting task to do a callback guarantees that
343  // the m_waitingTasks list will be released from waiting even
344  // if the module does not put this data product or the
345  // module has an exception while running
346 
347  auto waiting = make_waiting_task(tbb::task::allocate_root(), [this](std::exception_ptr const* iException) {
348  if (nullptr != iException) {
349  m_waitingTasks.doneWaiting(*iException);
350  } else {
351  m_waitingTasks.doneWaiting(std::exception_ptr());
352  }
353  });
354  worker_->callWhenDoneAsync(waiting);
355  }
356  }
357  }
358 
359  void PuttableProductResolver::putProduct_(std::unique_ptr<WrapperBase> edp) const {
361  bool expected = false;
362  if (prefetchRequested_.compare_exchange_strong(expected, true)) {
363  m_waitingTasks.doneWaiting(std::exception_ptr());
364  }
365  }
366 
368  if (not deleteEarly) {
369  prefetchRequested_ = false;
371  }
373  }
374 
377  }
378 
380  aux_ = iConfigure.auxiliary();
382  assert(worker_ != nullptr);
383  }
384 
386  bool skipCurrentProcess,
388  ModuleCallingContext const* mcc) const {
389  if (!skipCurrentProcess and worker_) {
390  return resolveProductImpl<true>([&principal, this, sra, mcc]() {
391  try {
392  auto const& event = static_cast<EventPrincipal const&>(principal);
393  ParentContext parentContext(mcc);
395 
396  auto workCall = [this, &event, &parentContext, mcc]() {
397  auto sentry(make_sentry(mcc, [this](ModuleCallingContext const* iContext) {
398  aux_->postModuleDelayedGetSignal_.emit(*(iContext->getStreamContext()), *iContext);
399  }));
400 
402  event, *(aux_->eventSetup()), event.streamID(), parentContext, mcc->getStreamContext());
403  };
404 
405  if (sra) {
406  assert(false);
407  } else {
408  workCall();
409  }
410 
411  } catch (cms::Exception& ex) {
412  std::ostringstream ost;
413  ost << "Calling produce method for unscheduled module " << worker_->description().moduleName() << "/'"
414  << worker_->description().moduleLabel() << "'";
415  ex.addContext(ost.str());
416  throw;
417  }
418  });
419  }
420  return Resolution(nullptr);
421  }
422 
424  Principal const& principal,
425  bool skipCurrentProcess,
426  ServiceToken const& token,
428  ModuleCallingContext const* mcc) const {
429  if (skipCurrentProcess) {
430  return;
431  }
432  //need to try changing prefetchRequested_ before adding to waitingTasks_
433  bool expected = false;
434  bool prefetchRequested = prefetchRequested_.compare_exchange_strong(expected, true);
435  waitingTasks_.add(waitTask);
436  if (prefetchRequested) {
437  //Have to create a new task which will make sure the state for UnscheduledProductResolver
438  // is properly set after the module has run
439  auto t = make_waiting_task(tbb::task::allocate_root(), [this](std::exception_ptr const* iPtr) {
440  //The exception is being rethrown because resolveProductImpl sets the ProductResolver to a failed
441  // state for the case where an exception occurs during the call to the function.
442  // Caught exception is propagated via WaitingTaskList
443  CMS_SA_ALLOW try {
444  resolveProductImpl<true>([iPtr]() {
445  if (iPtr) {
446  std::rethrow_exception(*iPtr);
447  }
448  });
449  } catch (...) {
450  waitingTasks_.doneWaiting(std::current_exception());
451  return;
452  }
453  waitingTasks_.doneWaiting(nullptr);
454  });
455  auto const& event = static_cast<EventPrincipal const&>(principal);
456  ParentContext parentContext(mcc);
457 
459  t, event, *(aux_->eventSetup()), token, event.streamID(), parentContext, mcc->getStreamContext());
460  }
461  }
462 
464  if (not deleteEarly) {
465  prefetchRequested_ = false;
467  }
469  }
470 
471  void ProducedProductResolver::putProduct_(std::unique_ptr<WrapperBase> edp) const {
472  if (status() != defaultStatus()) {
474  << "Attempt to insert more than one product on branch " << branchDescription().branchName() << "\n";
475  }
476 
477  setProduct(std::move(edp)); // ProductResolver takes ownership
478  }
479 
480  void InputProductResolver::putProduct_(std::unique_ptr<WrapperBase> edp) const {
481  if (not productResolved()) {
482  //Another thread could have set this
483  setProduct(std::move(edp));
484  }
485  }
486 
487  bool ProducedProductResolver::isFromCurrentProcess() const { return true; }
488 
490 
492  std::unique_ptr<WrapperBase> prod, MergeableRunProductMetadata const* mergeableRunProductMetadata) const {
493  if (not prod) {
494  return;
495  }
496  if (status() == defaultStatus()) {
497  //resolveProduct has not been called or it failed
499  } else {
500  mergeProduct(std::move(prod), mergeableRunProductMetadata);
501  }
502  }
503 
505  // Check if the types match.
506  TypeID typeID(prod.dynamicTypeInfo());
508  // Types do not match.
510  << "Product on branch " << branchDescription().branchName() << " is of wrong type.\n"
511  << "It is supposed to be of type " << branchDescription().className() << ".\n"
512  << "It is actually of type " << typeID.className() << ".\n";
513  }
514  }
515 
516  void DataManagingProductResolver::setProduct(std::unique_ptr<WrapperBase> edp) const {
517  if (edp) {
518  checkType(*edp);
521  } else {
522  setFailedStatus();
523  }
524  }
525  // This routine returns true if it is known that currently there is no real product.
526  // If there is a real product, it returns false.
527  // If it is not known if there is a real product, it returns false.
529  auto presentStatus = status();
530  if (presentStatus == ProductStatus::ProductSet) {
531  return !(getProductData().wrapper()->isPresent());
532  }
533  return presentStatus != ProductStatus::ResolveNotRun;
534  }
535 
537  auto s = status();
538  return (s != defaultStatus()) or (s == ProductStatus::ProductDeleted);
539  }
540 
541  // This routine returns true if the product was deleted early in order to save memory
543 
544  bool DataManagingProductResolver::productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const {
545  if (iSkipCurrentProcess and isFromCurrentProcess()) {
546  return false;
547  }
549  if (getProductData().wrapper()->isPresent()) {
550  return true;
551  }
552  }
553  return false;
554  }
555 
557  productData_.setProvenance(provRetriever);
558  }
559 
561 
563  MergeableRunProductMetadata const* mrpm) {
565  }
566 
568  return provenance()->productProvenance();
569  }
570 
574  }
575  if (deleteEarly) {
577  } else {
578  resetStatus();
579  }
580  }
581 
582  bool DataManagingProductResolver::singleProduct_() const { return true; }
583 
586  }
587 
589 
591  return provenance()->productProvenance();
592  }
593 
595 
596  bool AliasProductResolver::singleProduct_() const { return true; }
597 
598  void AliasProductResolver::putProduct_(std::unique_ptr<WrapperBase>) const {
600  << "AliasProductResolver::putProduct_() not implemented and should never be called.\n"
601  << "Contact a Framework developer\n";
602  }
603 
604  void AliasProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp,
605  MergeableRunProductMetadata const*) const {
607  << "AliasProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp, MergeableRunProductMetadata "
608  "const*) not implemented and should never be called.\n"
609  << "Contact a Framework developer\n";
610  }
611 
612  SwitchBaseProductResolver::SwitchBaseProductResolver(std::shared_ptr<BranchDescription const> bd,
614  : realProduct_(realProduct), productData_(std::move(bd)), prefetchRequested_(false) {
615  // Parentage of this branch is always the same by construction, so we can compute the ID just "once" here.
616  Parentage p;
617  p.setParents(std::vector<BranchID>{realProduct.branchDescription().originalBranchID()});
618  parentageID_ = p.id();
620  }
621 
622  void SwitchBaseProductResolver::connectTo(ProductResolverBase const& iOther, Principal const* iParentPrincipal) {
624  << "SwitchBaseProductResolver::connectTo() not implemented and should never be called.\n"
625  << "Contact a Framework developer\n";
626  }
627 
630  }
631 
633  if (res.data() == nullptr)
634  return res;
635  return Resolution(&productData_);
636  }
637 
639  // SwitchProducer will never put anything in the event, and
640  // "false" will make Event::commit_() to call putProduct() with
641  // null unique_ptr<WrapperBase> to signal that the produce() was
642  // run.
643  return false;
644  }
645 
646  void SwitchBaseProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp,
647  MergeableRunProductMetadata const*) const {
649  << "SwitchBaseProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp, "
650  "MergeableRunProductMetadata const*) not implemented and should never be called.\n"
651  << "Contact a Framework developer\n";
652  }
653 
655  productData_.setProvenance(provRetriever);
656  }
657 
659  // insertIntoSet is const, so let's exploit that to fake the getting of the "input" product
661  }
662 
665  realProduct_.resetProductData_(deleteEarly);
666  if (not deleteEarly) {
667  prefetchRequested_ = false;
669  }
670  }
671 
673  // update provenance
675  // Use the Wrapper of the pointed-to resolver, but the provenance of this resolver
676  productData_.unsafe_setWrapper(realProduct().getProductData().sharedConstWrapper());
677  }
678 
679  SwitchProducerProductResolver::SwitchProducerProductResolver(std::shared_ptr<BranchDescription const> bd,
681  : SwitchBaseProductResolver(std::move(bd), realProduct), status_(defaultStatus_) {}
682 
684  bool skipCurrentProcess,
686  ModuleCallingContext const* mcc) const {
688  return resolveProductImpl(realProduct().resolveProduct(principal, skipCurrentProcess, sra, mcc));
689  }
690  return Resolution(nullptr);
691  }
692 
694  Principal const& principal,
695  bool skipCurrentProcess,
696  ServiceToken const& token,
698  ModuleCallingContext const* mcc) const {
699  if (skipCurrentProcess) {
700  return;
701  }
702  if (branchDescription().availableOnlyAtEndTransition() and mcc and not mcc->parent().isAtEndTransition()) {
703  return;
704  }
705 
706  //need to try changing prefetchRequested before adding to waitingTasks
707  bool expected = false;
708  bool doPrefetchRequested = prefetchRequested().compare_exchange_strong(expected, true);
709  waitingTasks().add(waitTask);
710 
711  if (doPrefetchRequested) {
712  //using a waiting task to do a callback guarantees that
713  // the waitingTasks() list will be released from waiting even
714  // if the module does not put this data product or the
715  // module has an exception while running
716  auto waiting = make_waiting_task(tbb::task::allocate_root(), [this](std::exception_ptr const* iException) {
717  if (nullptr != iException) {
718  waitingTasks().doneWaiting(*iException);
719  } else {
721  waitingTasks().doneWaiting(std::exception_ptr());
722  }
723  });
724  worker()->callWhenDoneAsync(waiting);
725  }
726  }
727 
728  void SwitchProducerProductResolver::putProduct_(std::unique_ptr<WrapperBase> edp) const {
729  if (status_ != defaultStatus_) {
731  << "Attempt to insert more than one product for a branch " << branchDescription().branchName()
732  << "This makes no sense for SwitchProducerProductResolver.\nContact a Framework developer";
733  }
734  // Let's use ResolveFailed to signal that produce() was called, as
735  // there is no real product in this resolver
737  bool expected = false;
738  if (prefetchRequested().compare_exchange_strong(expected, true)) {
740  waitingTasks().doneWaiting(std::exception_ptr());
741  }
742  }
743 
745  // if produce() was run (ResolveFailed), ask from the real resolver
747  return realProduct().productUnavailable();
748  }
749  return true;
750  }
751 
754  if (not deleteEarly) {
756  }
757  }
758 
760  bool skipCurrentProcess,
762  ModuleCallingContext const* mcc) const {
763  return resolveProductImpl(realProduct().resolveProduct(principal, skipCurrentProcess, sra, mcc));
764  }
765 
767  Principal const& principal,
768  bool skipCurrentProcess,
769  ServiceToken const& token,
771  ModuleCallingContext const* mcc) const {
772  if (skipCurrentProcess) {
773  return;
774  }
775 
776  //need to try changing prefetchRequested_ before adding to waitingTasks_
777  bool expected = false;
778  bool doPrefetchRequested = prefetchRequested().compare_exchange_strong(expected, true);
779  waitingTasks().add(waitTask);
780 
781  if (doPrefetchRequested) {
782  //using a waiting task to do a callback guarantees that
783  // the waitingTasks() list will be released from waiting even
784  // if the module does not put this data product or the
785  // module has an exception while running
786  auto waiting = make_waiting_task(tbb::task::allocate_root(), [this](std::exception_ptr const* iException) {
787  if (nullptr != iException) {
788  waitingTasks().doneWaiting(*iException);
789  } else {
791  waitingTasks().doneWaiting(std::exception_ptr());
792  }
793  });
794  realProduct().prefetchAsync(waiting, principal, skipCurrentProcess, token, sra, mcc);
795  }
796  }
797 
798  void SwitchAliasProductResolver::putProduct_(std::unique_ptr<WrapperBase> edp) const {
800  << "SwitchAliasProductResolver::putProduct() not implemented and should never be called.\n"
801  << "Contact a Framework developer\n";
802  }
803 
805  provRetriever_ = provRetriever;
806  }
807 
809 
811  return provRetriever_ ? provRetriever_->branchIDToProvenance(bd_->originalBranchID()) : nullptr;
812  }
813 
815 
816  bool ParentProcessProductResolver::singleProduct_() const { return true; }
817 
818  void ParentProcessProductResolver::putProduct_(std::unique_ptr<WrapperBase>) const {
820  << "ParentProcessProductResolver::putProduct_() not implemented and should never be called.\n"
821  << "Contact a Framework developer\n";
822  }
823 
824  void ParentProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp,
825  MergeableRunProductMetadata const*) const {
827  << "ParentProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp, "
828  "MergeableRunProductMetadata const*) not implemented and should never be called.\n"
829  << "Contact a Framework developer\n";
830  }
831 
833  // In principle, this ought to be fixed. I noticed one hits this error
834  // when in a SubProcess and calling the Event::getProvenance function
835  // with a BranchID to a branch from an earlier SubProcess or the top
836  // level process and this branch is not kept in this SubProcess. It might
837  // be possible to hit this in other contexts. I say it ought to be
838  // fixed because one does not encounter this issue if the SubProcesses
839  // are split into genuinely different processes (in principle that
840  // ought to give identical behavior and results). No user has ever
841  // reported this issue which has been around for some time and it was only
842  // noticed when testing some rare corner cases after modifying Core code.
843  // After discussing this with Chris we decided that at least for the moment
844  // there are higher priorities than fixing this ... I converted it so it
845  // causes an exception instead of a seg fault. The issue that may need to
846  // be addressed someday is how ProductResolvers for non-kept branches are
847  // connected to earlier SubProcesses.
849  << "ParentProcessProductResolver::throwNullRealProduct RealProduct pointer not set in this context.\n"
850  << "Contact a Framework developer\n";
851  }
852 
853  NoProcessProductResolver::NoProcessProductResolver(std::vector<ProductResolverIndex> const& matchingHolders,
854  std::vector<bool> const& ambiguous,
855  bool madeAtEnd)
856  : matchingHolders_(matchingHolders),
857  ambiguous_(ambiguous),
858  lastCheckIndex_(ambiguous_.size() + kUnsetOffset),
859  lastSkipCurrentCheckIndex_(lastCheckIndex_.load()),
860  prefetchRequested_(false),
861  skippingPrefetchRequested_(false),
862  madeAtEnd_{madeAtEnd} {
863  assert(ambiguous_.size() == matchingHolders_.size());
864  }
865 
867  Principal const& principal,
868  bool skipCurrentProcess,
870  ModuleCallingContext const* mcc) const {
871  ProductResolverBase const* productResolver = principal.getProductResolverByIndex(matchingHolders_[index]);
872  return productResolver->resolveProduct(principal, skipCurrentProcess, sra, mcc);
873  }
874 
876  bool skipCurrentProcess,
878  ModuleCallingContext const* mcc) const {
879  //See if we've already cached which Resolver we should call or if
880  // we know it is ambiguous
881  const unsigned int choiceSize = ambiguous_.size();
882 
883  //madeAtEnd_==true and not at end transition is the same as skipping the current process
884  if ((not skipCurrentProcess) and (madeAtEnd_ and mcc)) {
885  skipCurrentProcess = not mcc->parent().isAtEndTransition();
886  }
887 
888  unsigned int checkCacheIndex = skipCurrentProcess ? lastSkipCurrentCheckIndex_.load() : lastCheckIndex_.load();
889  if (checkCacheIndex != choiceSize + kUnsetOffset) {
890  if (checkCacheIndex == choiceSize + kAmbiguousOffset) {
892  } else if (checkCacheIndex == choiceSize + kMissingOffset) {
893  return Resolution(nullptr);
894  }
895  return tryResolver(checkCacheIndex, principal, skipCurrentProcess, sra, mcc);
896  }
897 
898  std::atomic<unsigned int>& updateCacheIndex = skipCurrentProcess ? lastSkipCurrentCheckIndex_ : lastCheckIndex_;
899 
900  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
901  for (unsigned int k : lookupProcessOrder) {
902  assert(k < ambiguous_.size());
903  if (k == 0)
904  break; // Done
905  if (ambiguous_[k]) {
906  updateCacheIndex = choiceSize + kAmbiguousOffset;
908  }
910  auto resolution = tryResolver(k, principal, skipCurrentProcess, sra, mcc);
911  if (resolution.data() != nullptr) {
912  updateCacheIndex = k;
913  return resolution;
914  }
915  }
916  }
917 
918  updateCacheIndex = choiceSize + kMissingOffset;
919  return Resolution(nullptr);
920  }
921 
923  Principal const& principal,
924  bool skipCurrentProcess,
925  ServiceToken const& token,
927  ModuleCallingContext const* mcc) const {
928  bool timeToMakeAtEnd = true;
929  if (madeAtEnd_ and mcc) {
930  timeToMakeAtEnd = mcc->parent().isAtEndTransition();
931  }
932 
933  //If timeToMakeAtEnd is false, then it is equivalent to skipping the current process
934  if (not skipCurrentProcess and timeToMakeAtEnd) {
935  //need to try changing prefetchRequested_ before adding to waitingTasks_
936  bool expected = false;
937  bool prefetchRequested = prefetchRequested_.compare_exchange_strong(expected, true);
938  waitingTasks_.add(waitTask);
939 
940  if (prefetchRequested) {
941  //we are the first thread to request
942  tryPrefetchResolverAsync(0, principal, false, sra, mcc, token);
943  }
944  } else {
945  skippingWaitingTasks_.add(waitTask);
946  bool expected = false;
947  if (skippingPrefetchRequested_.compare_exchange_strong(expected, true)) {
948  //we are the first thread to request
949  tryPrefetchResolverAsync(0, principal, true, sra, mcc, token);
950  }
951  }
952  }
953 
954  void NoProcessProductResolver::setCache(bool iSkipCurrentProcess,
955  ProductResolverIndex iIndex,
956  std::exception_ptr iExceptPtr) const {
957  if (not iSkipCurrentProcess) {
958  lastCheckIndex_ = iIndex;
959  waitingTasks_.doneWaiting(iExceptPtr);
960  } else {
963  }
964  }
965 
966  namespace {
967  class TryNextResolverWaitingTask : public edm::WaitingTask {
968  public:
969  TryNextResolverWaitingTask(NoProcessProductResolver const* iResolver,
970  unsigned int iResolverIndex,
971  Principal const* iPrincipal,
973  ModuleCallingContext const* iMCC,
974  bool iSkipCurrentProcess,
975  ServiceToken iToken)
976  : resolver_(iResolver),
977  principal_(iPrincipal),
978  sra_(iSRA),
979  mcc_(iMCC),
980  serviceToken_(iToken),
981  index_(iResolverIndex),
982  skipCurrentProcess_(iSkipCurrentProcess) {}
983 
984  tbb::task* execute() override {
985  auto exceptPtr = exceptionPtr();
986  if (exceptPtr) {
987  resolver_->prefetchFailed(index_, *principal_, skipCurrentProcess_, *exceptPtr);
988  } else {
989  if (not resolver_->dataValidFromResolver(index_, *principal_, skipCurrentProcess_)) {
990  resolver_->tryPrefetchResolverAsync(
991  index_ + 1, *principal_, skipCurrentProcess_, sra_, mcc_, serviceToken_);
992  }
993  }
994  return nullptr;
995  }
996 
997  private:
998  NoProcessProductResolver const* resolver_;
999  Principal const* principal_;
1001  ModuleCallingContext const* mcc_;
1002  ServiceToken serviceToken_;
1003  unsigned int index_;
1004  bool skipCurrentProcess_;
1005  };
1006  } // namespace
1007 
1008  void NoProcessProductResolver::prefetchFailed(unsigned int iProcessingIndex,
1009  Principal const& principal,
1010  bool iSkipCurrentProcess,
1011  std::exception_ptr iExceptPtr) const {
1012  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
1013  auto k = lookupProcessOrder[iProcessingIndex];
1014 
1015  setCache(iSkipCurrentProcess, k, iExceptPtr);
1016  }
1017 
1018  bool NoProcessProductResolver::dataValidFromResolver(unsigned int iProcessingIndex,
1019  Principal const& principal,
1020  bool iSkipCurrentProcess) const {
1021  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
1022  auto k = lookupProcessOrder[iProcessingIndex];
1023  ProductResolverBase const* productResolver = principal.getProductResolverByIndex(matchingHolders_[k]);
1024 
1025  if (productResolver->productWasFetchedAndIsValid(iSkipCurrentProcess)) {
1026  setCache(iSkipCurrentProcess, k, nullptr);
1027  return true;
1028  }
1029  return false;
1030  }
1031 
1032  void NoProcessProductResolver::tryPrefetchResolverAsync(unsigned int iProcessingIndex,
1033  Principal const& principal,
1034  bool skipCurrentProcess,
1036  ModuleCallingContext const* mcc,
1037  ServiceToken token) const {
1038  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
1039  auto index = iProcessingIndex;
1040 
1041  const unsigned int choiceSize = ambiguous_.size();
1042  unsigned int newCacheIndex = choiceSize + kMissingOffset;
1043  while (index < lookupProcessOrder.size()) {
1044  auto k = lookupProcessOrder[index];
1045  if (k == 0) {
1046  break;
1047  }
1048  assert(k < ambiguous_.size());
1049  if (ambiguous_[k]) {
1050  newCacheIndex = choiceSize + kAmbiguousOffset;
1051  break;
1052  }
1054  //make new task
1055 
1056  auto task = new (tbb::task::allocate_root())
1057  TryNextResolverWaitingTask(this, index, &principal, sra, mcc, skipCurrentProcess, token);
1058  task->increment_ref_count();
1059  ProductResolverBase const* productResolver = principal.getProductResolverByIndex(matchingHolders_[k]);
1060 
1061  //Make sure the Services are available on this thread
1063 
1064  productResolver->prefetchAsync(task, principal, skipCurrentProcess, token, sra, mcc);
1065  if (0 == task->decrement_ref_count()) {
1066  tbb::task::spawn(*task);
1067  }
1068  return;
1069  }
1070  ++index;
1071  }
1072  //data product unavailable
1073  setCache(skipCurrentProcess, newCacheIndex, nullptr);
1074  }
1075 
1077 
1079 
1081 
1082  inline unsigned int NoProcessProductResolver::unsetIndexValue() const { return ambiguous_.size() + kUnsetOffset; }
1083 
1085  // This function should never receive 'true'. On the other hand,
1086  // nothing should break if a 'true' is passed, because
1087  // NoProcessProductResolver just forwards the resolve
1088  const auto resetValue = unsetIndexValue();
1089  lastCheckIndex_ = resetValue;
1090  lastSkipCurrentCheckIndex_ = resetValue;
1091  prefetchRequested_ = false;
1093  waitingTasks_.reset();
1095  }
1096 
1097  bool NoProcessProductResolver::singleProduct_() const { return false; }
1098 
1101  << "NoProcessProductResolver::unscheduledWasNotRun_() not implemented and should never be called.\n"
1102  << "Contact a Framework developer\n";
1103  }
1104 
1107  << "NoProcessProductResolver::productUnavailable_() not implemented and should never be called.\n"
1108  << "Contact a Framework developer\n";
1109  }
1110 
1113  << "NoProcessProductResolver::productResolved_() not implemented and should never be called.\n"
1114  << "Contact a Framework developer\n";
1115  }
1116 
1119  << "NoProcessProductResolver::productWasDeleted_() not implemented and should never be called.\n"
1120  << "Contact a Framework developer\n";
1121  }
1122 
1123  bool NoProcessProductResolver::productWasFetchedAndIsValid_(bool /*iSkipCurrentProcess*/) const {
1125  << "NoProcessProductResolver::productWasFetchedAndIsValid_() not implemented and should never be called.\n"
1126  << "Contact a Framework developer\n";
1127  }
1128 
1129  void NoProcessProductResolver::putProduct_(std::unique_ptr<WrapperBase>) const {
1131  << "NoProcessProductResolver::putProduct_() not implemented and should never be called.\n"
1132  << "Contact a Framework developer\n";
1133  }
1134 
1135  void NoProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp,
1136  MergeableRunProductMetadata const*) const {
1138  << "NoProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp, MergeableRunProductMetadata "
1139  "const*) not implemented and should never be called.\n"
1140  << "Contact a Framework developer\n";
1141  }
1142 
1145  << "NoProcessProductResolver::branchDescription_() not implemented and should never be called.\n"
1146  << "Contact a Framework developer\n";
1147  }
1148 
1149  void NoProcessProductResolver::resetBranchDescription_(std::shared_ptr<BranchDescription const>) {
1151  << "NoProcessProductResolver::resetBranchDescription_() not implemented and should never be called.\n"
1152  << "Contact a Framework developer\n";
1153  }
1154 
1157  << "NoProcessProductResolver::provenance_() not implemented and should never be called.\n"
1158  << "Contact a Framework developer\n";
1159  }
1160 
1163  << "NoProcessProductResolver::connectTo() not implemented and should never be called.\n"
1164  << "Contact a Framework developer\n";
1165  }
1166 
1167  //---- SingleChoiceNoProcessProductResolver ----------------
1169  Principal const& principal,
1170  bool skipCurrentProcess,
1172  ModuleCallingContext const* mcc) const {
1173  //NOTE: Have to lookup the other ProductResolver each time rather than cache
1174  // it's pointer since it appears the pointer can change at some later stage
1176  ->resolveProduct(principal, skipCurrentProcess, sra, mcc);
1177  }
1178 
1180  Principal const& principal,
1181  bool skipCurrentProcess,
1182  ServiceToken const& token,
1184  ModuleCallingContext const* mcc) const {
1186  ->prefetchAsync(waitTask, principal, skipCurrentProcess, token, sra, mcc);
1187  }
1188 
1190 
1192 
1194 
1196 
1198 
1201  << "SingleChoiceNoProcessProductResolver::unscheduledWasNotRun_() not implemented and should never be called.\n"
1202  << "Contact a Framework developer\n";
1203  }
1204 
1207  << "SingleChoiceNoProcessProductResolver::productUnavailable_() not implemented and should never be called.\n"
1208  << "Contact a Framework developer\n";
1209  }
1210 
1213  << "SingleChoiceNoProcessProductResolver::productResolved_() not implemented and should never be called.\n"
1214  << "Contact a Framework developer\n";
1215  }
1216 
1219  << "SingleChoiceNoProcessProductResolver::productWasDeleted_() not implemented and should never be called.\n"
1220  << "Contact a Framework developer\n";
1221  }
1222 
1224  throw Exception(errors::LogicError) << "SingleChoiceNoProcessProductResolver::productWasFetchedAndIsValid_() not "
1225  "implemented and should never be called.\n"
1226  << "Contact a Framework developer\n";
1227  }
1228 
1229  void SingleChoiceNoProcessProductResolver::putProduct_(std::unique_ptr<WrapperBase>) const {
1231  << "SingleChoiceNoProcessProductResolver::putProduct_() not implemented and should never be called.\n"
1232  << "Contact a Framework developer\n";
1233  }
1234 
1235  void SingleChoiceNoProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp,
1236  MergeableRunProductMetadata const*) const {
1238  << "SingleChoiceNoProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp, "
1239  "MergeableRunProductMetadata const*) not implemented and should never be called.\n"
1240  << "Contact a Framework developer\n";
1241  }
1242 
1245  << "SingleChoiceNoProcessProductResolver::branchDescription_() not implemented and should never be called.\n"
1246  << "Contact a Framework developer\n";
1247  }
1248 
1249  void SingleChoiceNoProcessProductResolver::resetBranchDescription_(std::shared_ptr<BranchDescription const>) {
1250  throw Exception(errors::LogicError) << "SingleChoiceNoProcessProductResolver::resetBranchDescription_() not "
1251  "implemented and should never be called.\n"
1252  << "Contact a Framework developer\n";
1253  }
1254 
1257  << "SingleChoiceNoProcessProductResolver::provenance_() not implemented and should never be called.\n"
1258  << "Contact a Framework developer\n";
1259  }
1260 
1263  << "SingleChoiceNoProcessProductResolver::connectTo() not implemented and should never be called.\n"
1264  << "Contact a Framework developer\n";
1265  }
1266 
1267 } // namespace edm
edm::ProductDeletedException
Definition: ProductDeletedException.h:28
edm::PuttableProductResolver::setupUnscheduled
void setupUnscheduled(UnscheduledConfigurator const &) final
Definition: ProductResolvers.cc:375
edm::SwitchAliasProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const final
Definition: ProductResolvers.cc:759
edm::ProductResolverBase::provenance
Provenance const * provenance() const
Definition: ProductResolverBase.cc:31
edm::UnscheduledProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:385
edm::SharedResourcesAcquirer
Definition: SharedResourcesAcquirer.h:34
edm::ProducedProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:471
edm::ModuleDescription::moduleLabel
std::string const & moduleLabel() const
Definition: ModuleDescription.h:43
edm::DataManagingProductResolver::productWasFetchedAndIsValid_
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const final
Definition: ProductResolvers.cc:544
edm::ParentProcessProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:818
edm::errors::MismatchedInputFiles
Definition: EDMException.h:52
edm::ProductResolverIndex
unsigned int ProductResolverIndex
Definition: ProductResolverIndex.h:8
edm::ProductResolverBase::putProduct
void putProduct(std::unique_ptr< WrapperBase > edp) const
Definition: ProductResolverBase.h:163
edm::PuttableProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:359
edm::NoProcessProductResolver::setProductID_
void setProductID_(ProductID const &pid) override
Definition: ProductResolvers.cc:1078
edm::InputProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:480
edm::NoProcessProductResolver::resetBranchDescription_
void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) override
Definition: ProductResolvers.cc:1149
MessageLogger.h
funct::false
false
Definition: Factorize.h:34
edm::NoProcessProductResolver::matchingHolders_
std::vector< ProductResolverIndex > matchingHolders_
Definition: ProductResolvers.h:496
edm::ProductResolverBase::putOrMergeProduct
void putOrMergeProduct(std::unique_ptr< WrapperBase > edp, MergeableRunProductMetadata const *mergeableRunProductMetadata=nullptr) const
Definition: ProductResolverBase.h:166
cms::Exception::addContext
void addContext(std::string const &context)
Definition: Exception.cc:165
edm::ParentProcessProductResolver::bd_
std::shared_ptr< BranchDescription const > bd_
Definition: ProductResolvers.h:426
edm::AliasProductResolver::singleProduct_
bool singleProduct_() const override
Definition: ProductResolvers.cc:596
edm::UnscheduledAuxiliary::eventSetup
EventSetupImpl const * eventSetup() const
Definition: UnscheduledAuxiliary.h:38
edm::signalslot::Signal::emit
void emit(Args &&... args) const
Definition: Signal.h:46
edm::NoProcessProductResolver::unsetIndexValue
unsigned int unsetIndexValue() const
Definition: ProductResolvers.cc:1082
edm::MergeableRunProductMetadata::MERGE
Definition: MergeableRunProductMetadata.h:54
edm::errors::LogicError
Definition: EDMException.h:37
edm::NoProcessProductResolver::NoProcessProductResolver
NoProcessProductResolver(std::vector< ProductResolverIndex > const &matchingHolders, std::vector< bool > const &ambiguous, bool madeAtEnd)
Definition: ProductResolvers.cc:853
edm::SingleChoiceNoProcessProductResolver::connectTo
void connectTo(ProductResolverBase const &iOther, Principal const *) final
Definition: ProductResolvers.cc:1261
edm::PuttableProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:324
edm::BranchDescription::unwrappedType
TypeWithDict const & unwrappedType() const
Definition: BranchDescription.h:94
edm::SingleChoiceNoProcessProductResolver::unscheduledWasNotRun_
bool unscheduledWasNotRun_() const override
Definition: ProductResolvers.cc:1199
edm::NoProcessProductResolver::ambiguous_
std::vector< bool > ambiguous_
Definition: ProductResolvers.h:497
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::DataManagingOrAliasProductResolver
Definition: ProductResolvers.h:37
edm::ProductData::wrapper
WrapperBase const * wrapper() const
Definition: ProductData.h:35
edm::NoProcessProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:1084
kAmbiguousOffset
static constexpr unsigned int kAmbiguousOffset
Definition: ProductResolvers.cc:27
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::TypeWithDict::unvalidatedTypeInfo
std::type_info const & unvalidatedTypeInfo() const
Definition: TypeWithDict.h:81
edm::Provenance::productProvenance
ProductProvenance const * productProvenance() const
Definition: Provenance.cc:26
edm::NoProcessProductResolver::unscheduledWasNotRun_
bool unscheduledWasNotRun_() const override
Definition: ProductResolvers.cc:1099
edm::NoProcessProductResolver::lastSkipCurrentCheckIndex_
std::atomic< unsigned int > lastSkipCurrentCheckIndex_
Definition: ProductResolvers.h:501
edm::SwitchBaseProductResolver::waitingTasks_
WaitingTaskList waitingTasks_
Definition: ProductResolvers.h:310
edm::WaitingTaskList::add
void add(WaitingTask *)
Adds task to the waiting list.
Definition: WaitingTaskList.cc:89
edm::UnscheduledProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:463
edm::errors::EventCorruption
Definition: EDMException.h:43
edm::ParentageRegistry::instance
static ParentageRegistry * instance()
Definition: ParentageRegistry.cc:4
edm::ModuleDescription::moduleName
std::string const & moduleName() const
Definition: ModuleDescription.h:42
kMissingOffset
static constexpr unsigned int kMissingOffset
Definition: ProductResolvers.cc:28
FunctorTask.h
edm::DataManagingProductResolver::theStatus_
std::atomic< ProductStatus > theStatus_
Definition: ProductResolvers.h:100
edm::SwitchBaseProductResolver::worker
Worker * worker() const
Definition: ProductResolvers.h:276
edm::AliasProductResolver::putOrMergeProduct_
void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
Definition: ProductResolvers.cc:604
edm::make_functor_task
FunctorTask< F > * make_functor_task(ALLOC &&iAlloc, F f)
Definition: FunctorTask.h:47
edm::SingleChoiceNoProcessProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:1195
cms::cuda::assert
assert(be >=bs)
TypeID.h
edm::Principal
Definition: Principal.h:57
UnscheduledConfigurator.h
edm::SwitchProducerProductResolver::status_
ProductStatus status_
Definition: ProductResolvers.h:343
edm::ParentProcessProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:814
DelayedReader.h
edm::ProductResolverBase::productResolved
bool productResolved() const
Definition: ProductResolverBase.h:90
edm::NoProcessProductResolver::prefetchFailed
void prefetchFailed(unsigned int iProcessingIndex, Principal const &principal, bool iSkipCurrentProcess, std::exception_ptr iExceptPtr) const
Definition: ProductResolvers.cc:1008
edm::DataManagingProductResolver::setMergeableRunProductMetadataInProductData
void setMergeableRunProductMetadataInProductData(MergeableRunProductMetadata const *)
Definition: ProductResolvers.cc:562
edm::DataManagingProductResolver::ProductStatus::ProductDeleted
edm::ParentProcessProductResolver::singleProduct_
bool singleProduct_() const override
Definition: ProductResolvers.cc:816
edm::ParentProcessProductResolver::provRetriever_
ProductProvenanceRetriever const * provRetriever_
Definition: ProductResolvers.h:427
wrapper
static HepMC::HEPEVT_Wrapper wrapper
Definition: BeamHaloProducer.cc:47
edm::NoProcessProductResolver::lastCheckIndex_
std::atomic< unsigned int > lastCheckIndex_
Definition: ProductResolvers.h:500
edm::SwitchBaseProductResolver::setProductID_
void setProductID_(ProductID const &pid) final
Definition: ProductResolvers.cc:658
edm::SingleChoiceNoProcessProductResolver::resetBranchDescription_
void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) override
Definition: ProductResolvers.cc:1249
edm::InputProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:244
edm::DataManagingProductResolver::defaultStatus
ProductStatus defaultStatus() const
Definition: ProductResolvers.h:65
edm::InRun
Definition: BranchType.h:11
CMS_SA_ALLOW
#define CMS_SA_ALLOW
Definition: thread_safety_macros.h:5
edm::SwitchBaseProductResolver::waitingTasks
WaitingTaskList & waitingTasks() const
Definition: ProductResolvers.h:275
edm::NoProcessProductResolver::tryResolver
Resolution tryResolver(unsigned int index, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
Definition: ProductResolvers.cc:866
edm::Principal::getProductResolverByIndex
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
Definition: Principal.cc:535
edm::AliasProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:584
edm::ModuleCallingContext::parent
ParentContext const & parent() const
Definition: ModuleCallingContext.h:53
edm::ProductData::provenance
Provenance const & provenance() const
Definition: ProductData.h:33
edm::ProductResolverBase::productUnavailable
bool productUnavailable() const
Definition: ProductResolverBase.h:87
edm::DataManagingProductResolver::productData_
ProductData productData_
Definition: ProductResolvers.h:99
edm::WaitingTaskList::reset
void reset()
Resets access to the resource so that added tasks will wait.
Definition: WaitingTaskList.cc:51
edm::SwitchBaseProductResolver::putOrMergeProduct_
void putOrMergeProduct_(std::unique_ptr< WrapperBase > edp, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
Definition: ProductResolvers.cc:646
edm::NoProcessProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:1129
SharedResourcesAcquirer.h
edm::NoProcessProductResolver::skippingPrefetchRequested_
std::atomic< bool > skippingPrefetchRequested_
Definition: ProductResolvers.h:503
edm::ServiceToken
Definition: ServiceToken.h:40
edm::InputProductResolver::isFromCurrentProcess
bool isFromCurrentProcess() const final
Definition: ProductResolvers.cc:311
ParentageRegistry.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::SwitchBaseProductResolver::worker_
Worker * worker_
Definition: ProductResolvers.h:309
edm::ProductProvenanceRetriever::insertIntoSet
void insertIntoSet(ProductProvenance provenanceProduct) const
Definition: ProductProvenanceRetriever.cc:121
kUnsetOffset
static constexpr unsigned int kUnsetOffset
Definition: ProductResolvers.cc:26
edm::DataManagingProductResolver::setProduct
void setProduct(std::unique_ptr< WrapperBase > edp) const
Definition: ProductResolvers.cc:516
edm::NoProcessProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:1076
edm::ProductProvenance
Definition: ProductProvenance.h:24
edm::ParentProcessProductResolver::throwNullRealProduct
void throwNullRealProduct() const
Definition: ProductResolvers.cc:832
SerialTaskQueue.h
edm::NoProcessProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:875
edm::BranchDescription::processName
std::string const & processName() const
Definition: BranchDescription.h:73
edm::SingleChoiceNoProcessProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:1179
DQM.reader
reader
Definition: DQM.py:105
edm::NoProcessProductResolver::singleProduct_
bool singleProduct_() const override
Definition: ProductResolvers.cc:1097
edm::DataManagingProductResolver::mergeProduct
void mergeProduct(std::unique_ptr< WrapperBase > edp, MergeableRunProductMetadata const *) const
Definition: ProductResolvers.cc:78
edm::Worker::callWhenDoneAsync
void callWhenDoneAsync(WaitingTask *task)
Definition: Worker.h:167
edm::Principal::reader
DelayedReader * reader() const
Definition: Principal.h:185
edm::DataManagingProductResolver::resolveProductImpl
Resolution resolveProductImpl(FUNC resolver) const
edm::MergeableRunProductMetadata::getMergeDecision
MergeDecision getMergeDecision(std::string const &processThatCreatedProduct) const
Definition: MergeableRunProductMetadata.cc:260
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:252
edm::NoProcessProductResolver::productWasFetchedAndIsValid_
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const override
Definition: ProductResolvers.cc:1123
edm::SwitchBaseProductResolver::resolveProductImpl
Resolution resolveProductImpl(Resolution) const
Definition: ProductResolvers.cc:632
edm::SingleChoiceNoProcessProductResolver::putOrMergeProduct_
void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
Definition: ProductResolvers.cc:1235
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
edm::SingleChoiceNoProcessProductResolver::productUnavailable_
bool productUnavailable_() const override
Definition: ProductResolvers.cc:1205
edm::DataManagingProductResolver::productUnavailable_
bool productUnavailable_() const final
Definition: ProductResolvers.cc:528
edm::BranchDescription::originalBranchID
BranchID const & originalBranchID() const
Definition: BranchDescription.h:77
edm::Principal::branchType
BranchType const & branchType() const
Definition: Principal.h:179
edm::MergeableRunProductMetadata
Definition: MergeableRunProductMetadata.h:52
edm::ProductResolverBase::processName
std::string const & processName() const
Definition: ProductResolverBase.h:130
L1TObjectsTimingClient_cff.resolution
resolution
Definition: L1TObjectsTimingClient_cff.py:52
edm::OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >
Definition: OccurrenceTraits.h:34
edm::WaitingTaskList::doneWaiting
void doneWaiting(std::exception_ptr iPtr)
Signals that the resource is now available and tasks should be spawned.
Definition: WaitingTaskList.cc:169
edm::errors::InsertFailure
Definition: EDMException.h:35
edm::BranchDescription::unwrappedTypeID
TypeID unwrappedTypeID() const
Definition: BranchDescription.h:97
edm::SwitchBaseProductResolver::realProduct
DataManagingOrAliasProductResolver const & realProduct() const
Definition: ProductResolvers.h:277
make_sentry.h
svgfig.load
def load(fileName)
Definition: svgfig.py:547
edm::ProductResolverBase::resolveProduct
Resolution resolveProduct(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
Definition: ProductResolverBase.h:60
edm::UnscheduledProductResolver::waitingTasks_
WaitingTaskList waitingTasks_
Definition: ProductResolvers.h:204
edm::InEvent
Definition: BranchType.h:11
Transition.h
dqmdumpme.k
k
Definition: dqmdumpme.py:60
edm::UnscheduledProductResolver::aux_
UnscheduledAuxiliary const * aux_
Definition: ProductResolvers.h:205
edm::InputProductResolver::m_prefetchRequested
std::atomic< bool > m_prefetchRequested
Definition: ProductResolvers.h:135
edm::SwitchBaseProductResolver::productResolved_
bool productResolved_() const final
Definition: ProductResolvers.cc:638
OrderedSet.t
t
Definition: OrderedSet.py:90
edm::make_waiting_task
FunctorWaitingTask< F > * make_waiting_task(ALLOC &&iAlloc, F f)
Definition: WaitingTask.h:87
edm::DataManagingProductResolver::throwProductDeletedException
void throwProductDeletedException() const
Definition: ProductResolvers.cc:32
edm::SingleChoiceNoProcessProductResolver::realResolverIndex_
ProductResolverIndex realResolverIndex_
Definition: ProductResolvers.h:546
edm::SingleChoiceNoProcessProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:1189
edm::UnscheduledAuxiliary::preModuleDelayedGetSignal_
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preModuleDelayedGetSignal_
Definition: UnscheduledAuxiliary.h:45
edm::SingleChoiceNoProcessProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:1168
createBeamHaloJobs.queue
queue
Definition: createBeamHaloJobs.py:343
edm::DataManagingProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) final
Definition: ProductResolvers.cc:556
SharedResourcesAcquirer
edm::NoProcessProductResolver::tryPrefetchResolverAsync
void tryPrefetchResolverAsync(unsigned int iProcessingIndex, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc, ServiceToken token) const
Definition: ProductResolvers.cc:1032
edm::SwitchBaseProductResolver::realProduct_
DataManagingOrAliasProductResolver & realProduct_
Definition: ProductResolvers.h:306
edm::ParentContext
Definition: ParentContext.h:27
edm::Parentage
Definition: Parentage.h:25
edm::NoProcessProductResolver::setCache
void setCache(bool skipCurrentProcess, ProductResolverIndex index, std::exception_ptr exceptionPtr) const
Definition: ProductResolvers.cc:954
edm::LogWarning
Definition: MessageLogger.h:141
edm::ProductResolverBase::setProductID
void setProductID(ProductID const &pid)
Definition: ProductResolverBase.h:144
Principal.h
edm::SingleChoiceNoProcessProductResolver::productProvenancePtr_
ProductProvenance const * productProvenancePtr_() const override
Definition: ProductResolvers.cc:1193
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
edm::NoProcessProductResolver::branchDescription_
BranchDescription const & branchDescription_() const override
Definition: ProductResolvers.cc:1143
Resolution
Definition: trackSplitPlot.h:33
edm::NoProcessProductResolver::provenance_
Provenance const * provenance_() const override
Definition: ProductResolvers.cc:1155
edm::ParentProcessProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:804
edm::ProductData::setProvenance
void setProvenance(ProductProvenanceRetriever const *provRetriever)
Definition: ProductData.h:56
edm::InputProductResolver::aux_
UnscheduledAuxiliary const * aux_
Definition: ProductResolvers.h:137
edm::SwitchBaseProductResolver::prefetchRequested_
std::atomic< bool > prefetchRequested_
Definition: ProductResolvers.h:311
edm::LogError
Definition: MessageLogger.h:183
edm::DataManagingProductResolver::ProductStatus
ProductStatus
Definition: ProductResolvers.h:48
edm::SwitchBaseProductResolver::productData_
ProductData productData_
Definition: ProductResolvers.h:308
edm::NoProcessProductResolver::productResolved_
bool productResolved_() const final
Definition: ProductResolvers.cc:1111
edm::SwitchAliasProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const final
Definition: ProductResolvers.cc:766
edm::ParentProcessProductResolver::putOrMergeProduct_
void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
Definition: ProductResolvers.cc:824
edm::ModuleCallingContext::getStreamContext
StreamContext const * getStreamContext() const
Definition: ModuleCallingContext.cc:32
edm::Worker::doWorkAsync
void doWorkAsync(WaitingTask *task, typename T::MyPrincipal const &, EventSetupImpl const &c, ServiceToken const &token, StreamID stream, ParentContext const &parentContext, typename T::Context const *context)
Definition: Worker.h:831
edm::NoProcessProductResolver::connectTo
void connectTo(ProductResolverBase const &iOther, Principal const *) final
Definition: ProductResolvers.cc:1161
thread_safety_macros.h
edm::UnscheduledProductResolver::setupUnscheduled
void setupUnscheduled(UnscheduledConfigurator const &) final
Definition: ProductResolvers.cc:379
edm::DataManagingProductResolver::ProductStatus::ProductSet
definitions.original
original
Definition: definitions.py:57
edm::PuttableProductResolver::prefetchRequested_
std::atomic< bool > prefetchRequested_
Definition: ProductResolvers.h:179
edm::MergeableRunProductMetadata::MergeDecision
MergeDecision
Definition: MergeableRunProductMetadata.h:54
edm::SwitchBaseProductResolver::connectTo
void connectTo(ProductResolverBase const &iOther, Principal const *iParentPrincipal) final
Definition: ProductResolvers.cc:622
edm::ProductResolverIndexInvalid
Definition: ProductResolverIndex.h:16
edm::SingleChoiceNoProcessProductResolver::branchDescription_
BranchDescription const & branchDescription_() const override
Definition: ProductResolvers.cc:1243
UnscheduledAuxiliary.h
edm::DataManagingProductResolver::setProductID_
void setProductID_(ProductID const &pid) final
Definition: ProductResolvers.cc:560
edm::DataManagingOrAliasProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override=0
edm::SwitchBaseProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:663
edm::SingleChoiceNoProcessProductResolver::productResolved_
bool productResolved_() const final
Definition: ProductResolvers.cc:1211
edm::DataManagingProductResolver::ProductStatus::ResolveNotRun
edm::Provenance::store
ProductProvenanceRetriever const * store() const
Definition: Provenance.h:60
edm::WrapperBase
Definition: WrapperBase.h:23
edm::NoProcessProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:922
edm::UnscheduledConfigurator::findWorker
Worker * findWorker(std::string const &iLabel) const
Definition: UnscheduledConfigurator.h:42
edm::PuttableProductResolver::m_waitingTasks
WaitingTaskList m_waitingTasks
Definition: ProductResolvers.h:177
edm::BranchDescription::branchType
BranchType const & branchType() const
Definition: BranchDescription.h:121
edm::BranchDescription::branchName
std::string const & branchName() const
Definition: BranchDescription.h:119
edm::InputProductResolver::setMergeableRunProductMetadata_
void setMergeableRunProductMetadata_(MergeableRunProductMetadata const *) override
Definition: ProductResolvers.cc:240
edm::UnscheduledConfigurator
Definition: UnscheduledConfigurator.h:32
edm::Worker::description
ModuleDescription const & description() const
Definition: Worker.h:190
edm::ProductResolverBase::productWasFetchedAndIsValid
bool productWasFetchedAndIsValid(bool iSkipCurrentProcess) const
Definition: ProductResolverBase.h:102
edm::Principal::lookupProcessOrder
std::vector< unsigned int > const & lookupProcessOrder() const
Definition: Principal.h:195
edm::ProducedProductResolver::isFromCurrentProcess
bool isFromCurrentProcess() const final
Definition: ProductResolvers.cc:487
edm::NoProcessProductResolver::madeAtEnd_
const bool madeAtEnd_
Definition: ProductResolvers.h:504
ServiceToken
edm::NoProcessProductResolver::dataValidFromResolver
bool dataValidFromResolver(unsigned int iProcessingIndex, Principal const &principal, bool iSkipCurrentProcess) const
Definition: ProductResolvers.cc:1018
edm::DataManagingProductResolver::putOrMergeProduct_
void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
Definition: ProductResolvers.cc:491
edm::ProductResolverBase::Resolution::makeAmbiguous
static Resolution makeAmbiguous()
Definition: ProductResolverBase.h:48
res
Definition: Electron.h:6
edm::NoProcessProductResolver::waitingTasks_
WaitingTaskList waitingTasks_
Definition: ProductResolvers.h:498
edm::SingleChoiceNoProcessProductResolver::setProductID_
void setProductID_(ProductID const &pid) override
Definition: ProductResolvers.cc:1191
edm::ProductResolverBase::moduleLabel
std::string const & moduleLabel() const
Definition: ProductResolverBase.h:119
edm::InputProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:160
edm::DataManagingProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:571
edm::DataManagingProductResolver::singleProduct_
bool singleProduct_() const final
Definition: ProductResolvers.cc:582
cms::cuda::device::unique_ptr
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
Definition: device_unique_ptr.h:33
ProductProvenanceRetriever.h
edm::PuttableProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:367
edm::DataManagingProductResolver::branchDescription_
BranchDescription const & branchDescription_() const final
Definition: ProductResolvers.h:87
edm::ProductProvenanceRetriever
Definition: ProductProvenanceRetriever.h:56
edm::PuttableProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:313
edm::AliasProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:594
edm::UnscheduledConfigurator::auxiliary
UnscheduledAuxiliary const * auxiliary() const
Definition: UnscheduledConfigurator.h:50
edm::DataManagingProductResolver::checkType
void checkType(WrapperBase const &prod) const
Definition: ProductResolvers.cc:504
edm::ProductData::unsafe_wrapper
WrapperBase * unsafe_wrapper() const
Definition: ProductData.h:36
edm::WaitingTask
Definition: WaitingTask.h:36
edm::DataManagingProductResolver::status
ProductStatus status() const
Definition: ProductResolvers.h:64
edm::ParentageRegistry::insertMapped
bool insertMapped(value_type const &v)
Definition: ParentageRegistry.cc:24
edm::SwitchBaseProductResolver::setupUnscheduled
void setupUnscheduled(UnscheduledConfigurator const &iConfigure) final
Definition: ProductResolvers.cc:628
edm::TypeID
Definition: TypeID.h:22
edm::NoProcessProductResolver::putOrMergeProduct_
void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
Definition: ProductResolvers.cc:1135
edm::DataManagingProductResolver::getProductData
ProductData const & getProductData() const final
Definition: ProductResolvers.h:70
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ProductResolverBase::branchDescription
BranchDescription const & branchDescription() const
Definition: ProductResolverBase.h:110
edm::SingleChoiceNoProcessProductResolver::productWasDeleted_
bool productWasDeleted_() const override
Definition: ProductResolvers.cc:1217
std
Definition: JetResolutionObject.h:76
edm::NoProcessProductResolver::skippingWaitingTasks_
WaitingTaskList skippingWaitingTasks_
Definition: ProductResolvers.h:499
edm::SwitchBaseProductResolver::getProductData
ProductData const & getProductData() const final
Definition: ProductResolvers.h:302
edm::SwitchProducerProductResolver::SwitchProducerProductResolver
SwitchProducerProductResolver(std::shared_ptr< BranchDescription const > bd, DataManagingOrAliasProductResolver &realProduct)
Definition: ProductResolvers.cc:679
edm::WrapperBase::isPresent
bool isPresent() const
Definition: WrapperBase.h:30
edm::SingleChoiceNoProcessProductResolver::productWasFetchedAndIsValid_
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const override
Definition: ProductResolvers.cc:1223
edm::UnscheduledProductResolver::worker_
Worker * worker_
Definition: ProductResolvers.h:206
MergeableRunProductMetadata.h
edm::ProductData::setMergeableRunProductMetadata
void setMergeableRunProductMetadata(MergeableRunProductMetadataBase const *mrpm)
Definition: ProductData.h:60
edm::ProductResolverBase
Definition: ProductResolverBase.h:34
edm::SwitchProducerProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const final
Definition: ProductResolvers.cc:728
edm::InputProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:299
Exception
Definition: hltDiff.cc:246
edm::SwitchBaseProductResolver::parentageID_
ParentageID parentageID_
Definition: ProductResolvers.h:313
edm::ParentProcessProductResolver::setProductID_
void setProductID_(ProductID const &pid) override
Definition: ProductResolvers.cc:808
edm::SwitchBaseProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) final
Definition: ProductResolvers.cc:654
Worker.h
edm::MergeableRunProductMetadata::REPLACE
Definition: MergeableRunProductMetadata.h:54
edm::DataManagingProductResolver::setFailedStatus
void setFailedStatus() const
Definition: ProductResolvers.h:66
edm::ProductProvenanceRetriever::branchIDToProvenance
ProductProvenance const * branchIDToProvenance(BranchID const &bid) const
Definition: ProductProvenanceRetriever.cc:148
edm::PuttableProductResolver::worker_
Worker * worker_
Definition: ProductResolvers.h:178
edm::ProductResolverBase::productWasDeleted
bool productWasDeleted() const
Definition: ProductResolverBase.h:100
edm::NoProcessProductResolver
Definition: ProductResolvers.h:431
edm::make_sentry
std::unique_ptr< T, F > make_sentry(T *iObject, F iFunc)
NOTE: if iObject is null, then iFunc will not be called.
Definition: make_sentry.h:30
ProductResolvers.h
ProductDeletedException.h
edm::SwitchProducerProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) final
Definition: ProductResolvers.cc:752
edm::InputProductResolver::setupUnscheduled
void setupUnscheduled(UnscheduledConfigurator const &) final
Definition: ProductResolvers.cc:307
edm::AliasProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:598
edm::Worker::doWork
bool doWork(typename T::MyPrincipal const &, EventSetupImpl const &c, StreamID stream, ParentContext const &parentContext, typename T::Context const *context)
Definition: Worker.h:974
edm::UnscheduledAuxiliary::postModuleDelayedGetSignal_
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postModuleDelayedGetSignal_
Definition: UnscheduledAuxiliary.h:46
BranchKey.h
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::ProductResolverBase::prefetchAsync
void prefetchAsync(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
Definition: ProductResolverBase.h:69
edm::SwitchProducerProductResolver::productUnavailable_
bool productUnavailable_() const final
Definition: ProductResolvers.cc:744
edm::NoProcessProductResolver::prefetchRequested_
std::atomic< bool > prefetchRequested_
Definition: ProductResolvers.h:502
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::SwitchProducerProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const final
Definition: ProductResolvers.cc:693
edm::DataManagingProductResolver::resetStatus
void resetStatus()
Definition: ProductResolvers.h:58
edm::SingleChoiceNoProcessProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:1229
edm::SwitchBaseProductResolver::prefetchRequested
std::atomic< bool > & prefetchRequested() const
Definition: ProductResolvers.h:278
edm::BranchDescription
Definition: BranchDescription.h:32
edm::AliasProductResolver::realProduct_
DataManagingOrAliasProductResolver & realProduct_
Definition: ProductResolvers.h:259
edm::DataManagingProductResolver::connectTo
void connectTo(ProductResolverBase const &, Principal const *) final
Definition: ProductResolvers.cc:489
edm::BranchDescription::className
std::string const & className() const
Definition: BranchDescription.h:79
edm::SwitchProducerProductResolver::defaultStatus_
constexpr static const ProductStatus defaultStatus_
Definition: ProductResolvers.h:338
cms::Exception
Definition: Exception.h:70
edm::DataManagingProductResolver::productResolved_
bool productResolved_() const final
Definition: ProductResolvers.cc:536
edm::SwitchAliasProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const final
Definition: ProductResolvers.cc:798
edm::InputProductResolver::retrieveAndMerge_
void retrieveAndMerge_(Principal const &principal, MergeableRunProductMetadata const *mergeableRunProductMetadata) const override
Definition: ProductResolvers.cc:194
edm::ProductResolverBase::productInstanceName
std::string const & productInstanceName() const
Definition: ProductResolverBase.h:127
edm::ProductData::resetProductData
void resetProductData()
Definition: ProductData.h:52
edm::ProductData::setProductID
void setProductID(ProductID const &pid)
Definition: ProductData.h:58
edm::NoProcessProductResolver::productProvenancePtr_
ProductProvenance const * productProvenancePtr_() const override
Definition: ProductResolvers.cc:1080
edm::UnscheduledProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTask *waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:423
edm::DataManagingProductResolver::productProvenancePtr_
ProductProvenance const * productProvenancePtr_() const final
Definition: ProductResolvers.cc:567
edm::SwitchBaseProductResolver::unsafe_setWrapperAndProvenance
void unsafe_setWrapperAndProvenance() const
Definition: ProductResolvers.cc:672
edm::AliasProductResolver::setProductID_
void setProductID_(ProductID const &pid) override
Definition: ProductResolvers.cc:588
edm::ProductResolverBase::Resolution
Definition: ProductResolverBase.h:36
edm::Provenance
Definition: Provenance.h:34
event
Definition: event.py:1
edm::InputProductResolver::m_waitingTasks
WaitingTaskList m_waitingTasks
Definition: ProductResolvers.h:136
edm::SerialTaskQueueChain
Definition: SerialTaskQueueChain.h:32
edm::ParentContext::isAtEndTransition
bool isAtEndTransition() const
Definition: ParentContext.cc:66
event
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of "!*" before the partial wildcard feature was incorporated). The per-event "cost" of each negative criterion with multiple relevant triggers is about the same as ! *was in the past
edm::ServiceRegistry::Operate
Definition: ServiceRegistry.h:40
edm::DataManagingProductResolver::productWasDeleted_
bool productWasDeleted_() const final
Definition: ProductResolvers.cc:542
edm::SwitchBaseProductResolver
Definition: ProductResolvers.h:264
edm::DataManagingProductResolver::isFromCurrentProcess
virtual bool isFromCurrentProcess() const =0
edm::ProductResolverBase::setProductProvenanceRetriever
void setProductProvenanceRetriever(ProductProvenanceRetriever const *provRetriever)
Definition: ProductResolverBase.h:139
edm::SwitchProducerProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const final
Definition: ProductResolvers.cc:683
edm::NoProcessProductResolver::productWasDeleted_
bool productWasDeleted_() const override
Definition: ProductResolvers.cc:1117
edm::ProductID
Definition: ProductID.h:27
edm::DataManagingProductResolver::ProductStatus::ResolveFailed
edm::UnscheduledProductResolver::prefetchRequested_
std::atomic< bool > prefetchRequested_
Definition: ProductResolvers.h:207
edm::NoProcessProductResolver::productUnavailable_
bool productUnavailable_() const override
Definition: ProductResolvers.cc:1105
edm::ParentProcessProductResolver::productProvenancePtr_
ProductProvenance const * productProvenancePtr_() const override
Definition: ProductResolvers.cc:810
edm::AliasProductResolver::productProvenancePtr_
ProductProvenance const * productProvenancePtr_() const override
Definition: ProductResolvers.cc:590
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
edm::SingleChoiceNoProcessProductResolver::provenance_
Provenance const * provenance_() const override
Definition: ProductResolvers.cc:1255
edm::ProductData::unsafe_setWrapper
void unsafe_setWrapper(std::unique_ptr< WrapperBase > iValue) const
Definition: ProductData.cc:27
edm::SingleChoiceNoProcessProductResolver::singleProduct_
bool singleProduct_() const override
Definition: ProductResolvers.cc:1197
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316
edm::SwitchBaseProductResolver::SwitchBaseProductResolver
SwitchBaseProductResolver(std::shared_ptr< BranchDescription const > bd, DataManagingOrAliasProductResolver &realProduct)
Definition: ProductResolvers.cc:612