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"
24 
25 #include <cassert>
26 #include <utility>
27 
28 static constexpr unsigned int kUnsetOffset = 0;
29 static constexpr unsigned int kAmbiguousOffset = 1;
30 static constexpr unsigned int kMissingOffset = 2;
31 
32 namespace edm {
33 
36  exception << "DataManagingProductResolver::resolveProduct_: The product matching all criteria was already deleted\n"
37  << "Looking for type: " << branchDescription().unwrappedTypeID() << "\n"
38  << "Looking for module label: " << moduleLabel() << "\n"
39  << "Looking for productInstanceName: " << productInstanceName() << "\n"
40  << (processName().empty() ? "" : "Looking for process: ") << processName() << "\n"
41  << "This means there is a configuration error.\n"
42  << "The module which is asking for this data must be configured to state that it will read this data.";
43  throw exception;
44  }
45 
46  //This is a templated function in order to avoid calling another virtual function
47  template <bool callResolver, typename FUNC>
49  if (productWasDeleted()) {
51  }
52  auto presentStatus = status();
53 
54  if (callResolver && presentStatus == ProductStatus::ResolveNotRun) {
55  //if resolver fails because of exception or not setting product
56  // make sure the status goes to failed
57  auto failedStatusSetter = [this](ProductStatus* iPresentStatus) {
58  if (this->status() == ProductStatus::ResolveNotRun) {
59  this->setFailedStatus();
60  }
61  *iPresentStatus = this->status();
62  };
63  std::unique_ptr<ProductStatus, decltype(failedStatusSetter)> failedStatusGuard(&presentStatus,
64  failedStatusSetter);
65 
66  //If successful, this will call setProduct
67  resolver();
68  }
69 
70  if (presentStatus == ProductStatus::ProductSet) {
71  auto pd = &getProductData();
72  if (pd->wrapper()->isPresent()) {
73  return Resolution(pd);
74  }
75  }
76 
77  return Resolution(nullptr);
78  }
79 
81  std::shared_ptr<WrapperBase> iFrom, MergeableRunProductMetadata const* mergeableRunProductMetadata) const {
82  // if its not mergeable and the previous read failed, go ahead and use this one
84  setProduct(std::move(iFrom));
85  return;
86  }
87 
89  if (not iFrom) {
90  return;
91  }
92 
93  checkType(*iFrom);
94 
96  if (original->isMergeable()) {
97  if (original->isPresent() != iFrom->isPresent()) {
99  << "Merge of Run or Lumi product failed for branch " << branchDescription().branchName() << "\n"
100  << "Was trying to merge objects where one product had been put in the input file and the other had not "
101  "been."
102  << "\n"
103  << "The solution is to drop the branch on input. Or better do not create inconsistent files\n"
104  << "that need to be merged in the first place.\n";
105  }
106  if (original->isPresent()) {
108  if (mergeableRunProductMetadata == nullptr || desc.branchType() != InRun) {
109  original->mergeProduct(iFrom.get());
110  } else {
112  mergeableRunProductMetadata->getMergeDecision(desc.processName());
113  if (decision == MergeableRunProductMetadata::MERGE) {
114  original->mergeProduct(iFrom.get());
115  } else if (decision == MergeableRunProductMetadata::REPLACE) {
116  // Note this swaps the content of the product where the
117  // both products branches are present and the product is
118  // also present (was put) in the branch. A module might
119  // have already gotten a pointer to the product so we
120  // keep those pointers valid. This does not call swap
121  // on the Wrapper.
122  original->swapProduct(iFrom.get());
123  }
124  // If the decision is IGNORE, do nothing
125  }
126  }
127  // If both have isPresent false, do nothing
128 
129  } else if (original->hasIsProductEqual()) {
130  if (original->isPresent() && iFrom->isPresent()) {
131  if (!original->isProductEqual(iFrom.get())) {
132  auto const& bd = branchDescription();
133  edm::LogError("RunLumiMerging")
134  << "ProductResolver::mergeTheProduct\n"
135  << "Two run/lumi products for the same run/lumi which should be equal are not\n"
136  << "Using the first, ignoring the second\n"
137  << "className = " << bd.className() << "\n"
138  << "moduleLabel = " << bd.moduleLabel() << "\n"
139  << "instance = " << bd.productInstanceName() << "\n"
140  << "process = " << bd.processName() << "\n";
141  }
142  } else if (!original->isPresent() && iFrom->isPresent()) {
143  setProduct(std::move(iFrom));
144  }
145  // if not iFrom->isPresent(), do nothing
146  } else {
147  auto const& bd = branchDescription();
148  edm::LogWarning("RunLumiMerging") << "ProductResolver::mergeTheProduct\n"
149  << "Run/lumi product has neither a mergeProduct nor isProductEqual function\n"
150  << "Using the first, ignoring the second in merge\n"
151  << "className = " << bd.className() << "\n"
152  << "moduleLabel = " << bd.moduleLabel() << "\n"
153  << "instance = " << bd.productInstanceName() << "\n"
154  << "process = " << bd.processName() << "\n";
155  if (!original->isPresent() && iFrom->isPresent()) {
156  setProduct(std::move(iFrom));
157  }
158  // In other cases, do nothing
159  }
160  }
161 
163  Principal const& principal, bool, SharedResourcesAcquirer*, ModuleCallingContext const* mcc) const {
164  return resolveProductImpl<true>([this, &principal, mcc]() {
165  auto branchType = principal.branchType();
166  if (branchType == InLumi || branchType == InRun) {
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 || branchType == InProcess) and aux_) {
173  }
174 
175  auto sentry(make_sentry(mcc, [this, branchType](ModuleCallingContext const* iContext) {
176  if ((branchType == InEvent || branchType == InProcess) 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  setProduct(reader->getProduct(branchDescription().branchID(), &principal, mcc));
189  }
190  }
191  });
192  }
193 
195  Principal const& principal, 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  auto 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  setOrMergeProduct(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 
241  std::shared_ptr<WrapperBase> prod, MergeableRunProductMetadata const* mergeableRunProductMetadata) const {
242  if (status() == defaultStatus()) {
243  //resolveProduct has not been called or it failed
245  } else {
246  mergeProduct(std::move(prod), mergeableRunProductMetadata);
247  }
248  }
249 
252  }
253 
255  Principal const& principal,
256  bool skipCurrentProcess,
257  ServiceToken const& token,
259  ModuleCallingContext const* mcc) const {
260  //need to try changing m_prefetchRequested before adding to m_waitingTasks
261  bool expected = false;
262  bool prefetchRequested = m_prefetchRequested.compare_exchange_strong(expected, true);
263  m_waitingTasks.add(waitTask);
264 
265  if (prefetchRequested) {
266  ServiceWeakToken weakToken = token;
267  auto workToDo = [this, mcc, &principal, weakToken]() {
268  //need to make sure Service system is activated on the reading thread
269  ServiceRegistry::Operate operate(weakToken.lock());
270  // Caught exception is propagated via WaitingTaskList
271  CMS_SA_ALLOW try {
272  resolveProductImpl<true>([this, &principal, mcc]() {
273  if (principal.branchType() != InEvent) {
274  return;
275  }
276  if (auto reader = principal.reader()) {
277  std::unique_lock<std::recursive_mutex> guard;
278  if (auto sr = reader->sharedResources().second) {
279  guard = std::unique_lock<std::recursive_mutex>(*sr);
280  }
281  if (not productResolved()) {
282  //another thread could have finished this while we were waiting
283  setProduct(reader->getProduct(branchDescription().branchID(), &principal, mcc));
284  }
285  }
286  });
287  } catch (...) {
288  this->m_waitingTasks.doneWaiting(std::current_exception());
289  return;
290  }
291  this->m_waitingTasks.doneWaiting(nullptr);
292  };
293 
294  SerialTaskQueueChain* queue = nullptr;
295  if (auto reader = principal.reader()) {
296  if (auto shared_res = reader->sharedResources().first) {
297  queue = &(shared_res->serialQueueChain());
298  }
299  }
300  if (queue) {
301  queue->push(*waitTask.group(), workToDo);
302  } else {
303  //Have to create a new task
304  auto t = make_functor_task(workToDo);
305  waitTask.group()->run([t]() {
306  TaskSentry s{t};
307  t->execute();
308  });
309  }
310  }
311  }
312 
314  if (not deleteEarly) {
315  m_prefetchRequested = false;
317  }
319  }
320 
322  aux_ = iConfigure.auxiliary();
323  }
324 
326 
327  void PutOnReadInputProductResolver::putProduct(std::unique_ptr<WrapperBase> edp) const {
328  if (status() != defaultStatus()) {
330  << "Attempt to insert more than one product on branch " << branchDescription().branchName() << "\n";
331  }
332 
333  setProduct(std::move(edp)); // ProductResolver takes ownership
334  }
335 
337 
339  bool skipCurrentProcess,
341  ModuleCallingContext const*) const {
342  return resolveProductImpl<false>([]() { return; });
343  }
344 
346  Principal const& principal,
347  bool skipCurrentProcess,
348  ServiceToken const& token,
350  ModuleCallingContext const* mcc) const {}
351 
352  void PutOnReadInputProductResolver::putOrMergeProduct(std::unique_ptr<WrapperBase> edp) const {
353  setOrMergeProduct(std::move(edp), nullptr);
354  }
355 
357  bool skipCurrentProcess,
359  ModuleCallingContext const*) const {
360  if (!skipCurrentProcess) {
361  //'false' means never call the lambda function
362  return resolveProductImpl<false>([]() { return; });
363  }
364  return Resolution(nullptr);
365  }
366 
368  Principal const& principal,
369  bool skipCurrentProcess,
370  ServiceToken const& token,
372  ModuleCallingContext const* mcc) const {
373  if (not skipCurrentProcess) {
374  if (branchDescription().availableOnlyAtEndTransition() and mcc) {
375  if (not mcc->parent().isAtEndTransition()) {
376  return;
377  }
378  }
379  //Need to try modifying prefetchRequested_ before adding to m_waitingTasks
380  bool expected = false;
381  bool prefetchRequested = prefetchRequested_.compare_exchange_strong(expected, true);
382  m_waitingTasks.add(waitTask);
383 
384  if (worker_ and prefetchRequested) {
385  //using a waiting task to do a callback guarantees that
386  // the m_waitingTasks list will be released from waiting even
387  // if the module does not put this data product or the
388  // module has an exception while running
389 
390  auto waiting = make_waiting_task([this](std::exception_ptr const* iException) {
391  if (nullptr != iException) {
392  m_waitingTasks.doneWaiting(*iException);
393  } else {
394  m_waitingTasks.doneWaiting(std::exception_ptr());
395  }
396  });
397  worker_->callWhenDoneAsync(WaitingTaskHolder(*waitTask.group(), waiting));
398  }
399  }
400  }
401 
402  void PuttableProductResolver::putProduct(std::unique_ptr<WrapperBase> edp) const {
404  bool expected = false;
405  if (prefetchRequested_.compare_exchange_strong(expected, true)) {
406  m_waitingTasks.doneWaiting(std::exception_ptr());
407  }
408  }
409 
411  if (not deleteEarly) {
412  prefetchRequested_ = false;
414  }
416  }
417 
420  }
421 
423  aux_ = iConfigure.auxiliary();
425  }
426 
428  bool skipCurrentProcess,
430  ModuleCallingContext const*) const {
431  if (!skipCurrentProcess and worker_) {
432  return resolveProductImpl<true>([this]() {
434  ex << "Attempting to run unscheduled module without doing prefetching";
435  std::ostringstream ost;
436  ost << "Calling produce method for unscheduled module " << worker_->description()->moduleName() << "/'"
437  << worker_->description()->moduleLabel() << "'";
438  ex.addContext(ost.str());
439  throw ex;
440  });
441  }
442  return Resolution(nullptr);
443  }
444 
446  Principal const& principal,
447  bool skipCurrentProcess,
448  ServiceToken const& token,
450  ModuleCallingContext const* mcc) const {
451  if (skipCurrentProcess) {
452  return;
453  }
454  if (worker_ == nullptr) {
455  throw cms::Exception("LogicError") << "UnscheduledProductResolver::prefetchAsync_() called with null worker_. "
456  "This should not happen, please contact framework developers.";
457  }
458  //need to try changing prefetchRequested_ before adding to waitingTasks_
459  bool expected = false;
460  bool prefetchRequested = prefetchRequested_.compare_exchange_strong(expected, true);
461  waitingTasks_.add(waitTask);
462  if (prefetchRequested) {
463  //Have to create a new task which will make sure the state for UnscheduledProductResolver
464  // is properly set after the module has run
465  auto t = make_waiting_task([this](std::exception_ptr const* iPtr) {
466  //The exception is being rethrown because resolveProductImpl sets the ProductResolver to a failed
467  // state for the case where an exception occurs during the call to the function.
468  // Caught exception is propagated via WaitingTaskList
469  CMS_SA_ALLOW try {
470  resolveProductImpl<true>([iPtr]() {
471  if (iPtr) {
472  std::rethrow_exception(*iPtr);
473  }
474  });
475  } catch (...) {
476  waitingTasks_.doneWaiting(std::current_exception());
477  return;
478  }
479  waitingTasks_.doneWaiting(nullptr);
480  });
481 
482  ParentContext parentContext(mcc);
485  WaitingTaskHolder(*waitTask.group(), t),
486  info,
487  token,
488  info.principal().streamID(),
489  parentContext,
490  mcc->getStreamContext());
491  }
492  }
493 
495  if (not deleteEarly) {
496  prefetchRequested_ = false;
498  }
500  }
501 
502  void ProducedProductResolver::putProduct(std::unique_ptr<WrapperBase> edp) const {
503  if (status() != defaultStatus()) {
505  << "Attempt to insert more than one product on branch " << branchDescription().branchName() << "\n";
506  }
507 
508  setProduct(std::move(edp)); // ProductResolver takes ownership
509  }
510 
511  bool ProducedProductResolver::isFromCurrentProcess() const { return true; }
512 
514 
516  // Check if the types match.
517  TypeID typeID(prod.dynamicTypeInfo());
519  // Types do not match.
521  << "Product on branch " << branchDescription().branchName() << " is of wrong type.\n"
522  << "It is supposed to be of type " << branchDescription().className() << ".\n"
523  << "It is actually of type " << typeID.className() << ".\n";
524  }
525  }
526 
527  void DataManagingProductResolver::setProduct(std::unique_ptr<WrapperBase> edp) const {
528  if (edp) {
529  checkType(*edp);
532  } else {
533  setFailedStatus();
534  }
535  }
536  void DataManagingProductResolver::setProduct(std::shared_ptr<WrapperBase> edp) const {
537  if (edp) {
538  checkType(*edp);
541  } else {
542  setFailedStatus();
543  }
544  }
545 
546  // This routine returns true if it is known that currently there is no real product.
547  // If there is a real product, it returns false.
548  // If it is not known if there is a real product, it returns false.
550  auto presentStatus = status();
551  if (presentStatus == ProductStatus::ProductSet) {
552  return !(getProductData().wrapper()->isPresent());
553  }
554  return presentStatus != ProductStatus::ResolveNotRun;
555  }
556 
558  auto s = status();
559  return (s != defaultStatus()) or (s == ProductStatus::ProductDeleted);
560  }
561 
562  // This routine returns true if the product was deleted early in order to save memory
564 
565  bool DataManagingProductResolver::productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const {
566  if (iSkipCurrentProcess and isFromCurrentProcess()) {
567  return false;
568  }
570  if (getProductData().wrapper()->isPresent()) {
571  return true;
572  }
573  }
574  return false;
575  }
576 
578  productData_.setProvenance(provRetriever);
579  }
580 
582 
584  MergeableRunProductMetadata const* mrpm) {
586  }
587 
589  return provenance()->productProvenance();
590  }
591 
595  }
596  if (deleteEarly) {
598  } else {
599  resetStatus();
600  }
601  }
602 
603  bool DataManagingProductResolver::singleProduct_() const { return true; }
604 
607  }
608 
610 
612  return provenance()->productProvenance();
613  }
614 
616 
617  bool AliasProductResolver::singleProduct_() const { return true; }
618 
619  SwitchBaseProductResolver::SwitchBaseProductResolver(std::shared_ptr<BranchDescription const> bd,
621  : realProduct_(realProduct), productData_(std::move(bd)), prefetchRequested_(false) {
622  // Parentage of this branch is always the same by construction, so we can compute the ID just "once" here.
623  Parentage p;
624  p.setParents(std::vector<BranchID>{realProduct.branchDescription().originalBranchID()});
625  parentageID_ = p.id();
627  }
628 
629  void SwitchBaseProductResolver::connectTo(ProductResolverBase const& iOther, Principal const* iParentPrincipal) {
631  << "SwitchBaseProductResolver::connectTo() not implemented and should never be called.\n"
632  << "Contact a Framework developer\n";
633  }
634 
637  }
638 
640  if (res.data() == nullptr)
641  return res;
642  return Resolution(&productData_);
643  }
644 
646  // SwitchProducer will never put anything in the event, and
647  // "false" will make Event::commit_() to call putProduct() with
648  // null unique_ptr<WrapperBase> to signal that the produce() was
649  // run.
650  return false;
651  }
652 
654  productData_.setProvenance(provRetriever);
655  }
656 
658  // insertIntoSet is const, so let's exploit that to fake the getting of the "input" product
660  }
661 
664  realProduct_.resetProductData_(deleteEarly);
665  if (not deleteEarly) {
666  prefetchRequested_ = false;
668  }
669  }
670 
672  // update provenance
674  // Use the Wrapper of the pointed-to resolver, but the provenance of this resolver
675  productData_.unsafe_setWrapper(realProduct().getProductData().sharedConstWrapper());
676  }
677 
678  SwitchProducerProductResolver::SwitchProducerProductResolver(std::shared_ptr<BranchDescription const> bd,
680  : SwitchBaseProductResolver(std::move(bd), realProduct), status_(defaultStatus_) {}
681 
683  bool skipCurrentProcess,
685  ModuleCallingContext const* mcc) const {
687  return resolveProductImpl(realProduct().resolveProduct(principal, skipCurrentProcess, sra, mcc));
688  }
689  return Resolution(nullptr);
690  }
691 
693  Principal const& principal,
694  bool skipCurrentProcess,
695  ServiceToken const& token,
697  ModuleCallingContext const* mcc) const {
698  if (skipCurrentProcess) {
699  return;
700  }
701  if (branchDescription().availableOnlyAtEndTransition() and mcc and not mcc->parent().isAtEndTransition()) {
702  return;
703  }
704 
705  //need to try changing prefetchRequested before adding to waitingTasks
706  bool expected = false;
707  bool doPrefetchRequested = prefetchRequested().compare_exchange_strong(expected, true);
708  waitingTasks().add(waitTask);
709 
710  if (doPrefetchRequested) {
711  //using a waiting task to do a callback guarantees that
712  // the waitingTasks() list will be released from waiting even
713  // if the module does not put this data product or the
714  // module has an exception while running
715  auto waiting = make_waiting_task([this](std::exception_ptr const* iException) {
716  if (nullptr != iException) {
717  waitingTasks().doneWaiting(*iException);
718  } else {
720  waitingTasks().doneWaiting(std::exception_ptr());
721  }
722  });
723  worker()->callWhenDoneAsync(WaitingTaskHolder(*waitTask.group(), waiting));
724  }
725  }
726 
727  void SwitchProducerProductResolver::putProduct(std::unique_ptr<WrapperBase> edp) const {
728  if (status_ != defaultStatus_) {
730  << "Attempt to insert more than one product for a branch " << branchDescription().branchName()
731  << "This makes no sense for SwitchProducerProductResolver.\nContact a Framework developer";
732  }
733  // Let's use ResolveFailed to signal that produce() was called, as
734  // there is no real product in this resolver
736  bool expected = false;
737  if (prefetchRequested().compare_exchange_strong(expected, true)) {
739  waitingTasks().doneWaiting(std::exception_ptr());
740  }
741  }
742 
744  // if produce() was run (ResolveFailed), ask from the real resolver
746  return realProduct().productUnavailable();
747  }
748  return true;
749  }
750 
753  if (not deleteEarly) {
755  }
756  }
757 
759  bool skipCurrentProcess,
761  ModuleCallingContext const* mcc) const {
762  return resolveProductImpl(realProduct().resolveProduct(principal, skipCurrentProcess, sra, mcc));
763  }
764 
766  Principal const& principal,
767  bool skipCurrentProcess,
768  ServiceToken const& token,
770  ModuleCallingContext const* mcc) const {
771  if (skipCurrentProcess) {
772  return;
773  }
774 
775  //need to try changing prefetchRequested_ before adding to waitingTasks_
776  bool expected = false;
777  bool doPrefetchRequested = prefetchRequested().compare_exchange_strong(expected, true);
778  waitingTasks().add(waitTask);
779 
780  if (doPrefetchRequested) {
781  //using a waiting task to do a callback guarantees that
782  // the waitingTasks() list will be released from waiting even
783  // if the module does not put this data product or the
784  // module has an exception while running
785  auto waiting = make_waiting_task([this](std::exception_ptr const* iException) {
786  if (nullptr != iException) {
787  waitingTasks().doneWaiting(*iException);
788  } else {
790  waitingTasks().doneWaiting(std::exception_ptr());
791  }
792  });
794  WaitingTaskHolder(*waitTask.group(), waiting), principal, skipCurrentProcess, token, sra, mcc);
795  }
796  }
797 
799  provRetriever_ = provRetriever;
800  }
801 
803 
805  return provRetriever_ ? provRetriever_->branchIDToProvenance(bd_->originalBranchID()) : nullptr;
806  }
807 
809 
810  bool ParentProcessProductResolver::singleProduct_() const { return true; }
811 
813  // In principle, this ought to be fixed. I noticed one hits this error
814  // when in a SubProcess and calling the Event::getProvenance function
815  // with a BranchID to a branch from an earlier SubProcess or the top
816  // level process and this branch is not kept in this SubProcess. It might
817  // be possible to hit this in other contexts. I say it ought to be
818  // fixed because one does not encounter this issue if the SubProcesses
819  // are split into genuinely different processes (in principle that
820  // ought to give identical behavior and results). No user has ever
821  // reported this issue which has been around for some time and it was only
822  // noticed when testing some rare corner cases after modifying Core code.
823  // After discussing this with Chris we decided that at least for the moment
824  // there are higher priorities than fixing this ... I converted it so it
825  // causes an exception instead of a seg fault. The issue that may need to
826  // be addressed someday is how ProductResolvers for non-kept branches are
827  // connected to earlier SubProcesses.
829  << "ParentProcessProductResolver::throwNullRealProduct RealProduct pointer not set in this context.\n"
830  << "Contact a Framework developer\n";
831  }
832 
833  NoProcessProductResolver::NoProcessProductResolver(std::vector<ProductResolverIndex> const& matchingHolders,
834  std::vector<bool> const& ambiguous,
835  bool madeAtEnd)
836  : matchingHolders_(matchingHolders),
837  ambiguous_(ambiguous),
838  lastCheckIndex_(ambiguous_.size() + kUnsetOffset),
839  lastSkipCurrentCheckIndex_(lastCheckIndex_.load()),
840  prefetchRequested_(false),
841  skippingPrefetchRequested_(false),
842  madeAtEnd_{madeAtEnd} {
843  assert(ambiguous_.size() == matchingHolders_.size());
844  }
845 
847  Principal const& principal,
848  bool skipCurrentProcess,
850  ModuleCallingContext const* mcc) const {
851  ProductResolverBase const* productResolver = principal.getProductResolverByIndex(matchingHolders_[index]);
852  return productResolver->resolveProduct(principal, skipCurrentProcess, sra, mcc);
853  }
854 
856  bool skipCurrentProcess,
858  ModuleCallingContext const* mcc) const {
859  //See if we've already cached which Resolver we should call or if
860  // we know it is ambiguous
861  const unsigned int choiceSize = ambiguous_.size();
862 
863  //madeAtEnd_==true and not at end transition is the same as skipping the current process
864  if ((not skipCurrentProcess) and (madeAtEnd_ and mcc)) {
865  skipCurrentProcess = not mcc->parent().isAtEndTransition();
866  }
867 
868  unsigned int checkCacheIndex = skipCurrentProcess ? lastSkipCurrentCheckIndex_.load() : lastCheckIndex_.load();
869  if (checkCacheIndex != choiceSize + kUnsetOffset) {
870  if (checkCacheIndex == choiceSize + kAmbiguousOffset) {
872  } else if (checkCacheIndex == choiceSize + kMissingOffset) {
873  return Resolution(nullptr);
874  }
875  return tryResolver(checkCacheIndex, principal, skipCurrentProcess, sra, mcc);
876  }
877 
878  std::atomic<unsigned int>& updateCacheIndex = skipCurrentProcess ? lastSkipCurrentCheckIndex_ : lastCheckIndex_;
879 
880  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
881  for (unsigned int k : lookupProcessOrder) {
882  assert(k < ambiguous_.size());
883  if (k == 0)
884  break; // Done
885  if (ambiguous_[k]) {
886  updateCacheIndex = choiceSize + kAmbiguousOffset;
888  }
890  auto resolution = tryResolver(k, principal, skipCurrentProcess, sra, mcc);
891  if (resolution.data() != nullptr) {
892  updateCacheIndex = k;
893  return resolution;
894  }
895  }
896  }
897 
898  updateCacheIndex = choiceSize + kMissingOffset;
899  return Resolution(nullptr);
900  }
901 
903  Principal const& principal,
904  bool skipCurrentProcess,
905  ServiceToken const& token,
907  ModuleCallingContext const* mcc) const {
908  bool timeToMakeAtEnd = true;
909  if (madeAtEnd_ and mcc) {
910  timeToMakeAtEnd = mcc->parent().isAtEndTransition();
911  }
912 
913  //If timeToMakeAtEnd is false, then it is equivalent to skipping the current process
914  if (not skipCurrentProcess and timeToMakeAtEnd) {
915  //need to try changing prefetchRequested_ before adding to waitingTasks_
916  bool expected = false;
917  bool prefetchRequested = prefetchRequested_.compare_exchange_strong(expected, true);
918  waitingTasks_.add(waitTask);
919 
920  if (prefetchRequested) {
921  //we are the first thread to request
922  tryPrefetchResolverAsync(0, principal, false, sra, mcc, token, waitTask.group());
923  }
924  } else {
925  skippingWaitingTasks_.add(waitTask);
926  bool expected = false;
927  if (skippingPrefetchRequested_.compare_exchange_strong(expected, true)) {
928  //we are the first thread to request
929  tryPrefetchResolverAsync(0, principal, true, sra, mcc, token, waitTask.group());
930  }
931  }
932  }
933 
934  void NoProcessProductResolver::setCache(bool iSkipCurrentProcess,
935  ProductResolverIndex iIndex,
936  std::exception_ptr iExceptPtr) const {
937  if (not iSkipCurrentProcess) {
938  lastCheckIndex_ = iIndex;
939  waitingTasks_.doneWaiting(iExceptPtr);
940  } else {
943  }
944  }
945 
946  namespace {
947  class TryNextResolverWaitingTask : public edm::WaitingTask {
948  public:
949  TryNextResolverWaitingTask(NoProcessProductResolver const* iResolver,
950  unsigned int iResolverIndex,
951  Principal const* iPrincipal,
953  ModuleCallingContext const* iMCC,
954  bool iSkipCurrentProcess,
955  ServiceToken iToken,
956  tbb::task_group* iGroup)
957  : resolver_(iResolver),
958  principal_(iPrincipal),
959  sra_(iSRA),
960  mcc_(iMCC),
961  group_(iGroup),
962  serviceToken_(iToken),
963  index_(iResolverIndex),
964  skipCurrentProcess_(iSkipCurrentProcess) {}
965 
966  void execute() final {
967  auto exceptPtr = exceptionPtr();
968  if (exceptPtr) {
969  resolver_->prefetchFailed(index_, *principal_, skipCurrentProcess_, *exceptPtr);
970  } else {
971  if (not resolver_->dataValidFromResolver(index_, *principal_, skipCurrentProcess_)) {
972  resolver_->tryPrefetchResolverAsync(
973  index_ + 1, *principal_, skipCurrentProcess_, sra_, mcc_, serviceToken_.lock(), group_);
974  }
975  }
976  }
977 
978  private:
979  NoProcessProductResolver const* resolver_;
980  Principal const* principal_;
982  ModuleCallingContext const* mcc_;
983  tbb::task_group* group_;
984  ServiceWeakToken serviceToken_;
985  unsigned int index_;
986  bool skipCurrentProcess_;
987  };
988  } // namespace
989 
990  void NoProcessProductResolver::prefetchFailed(unsigned int iProcessingIndex,
991  Principal const& principal,
992  bool iSkipCurrentProcess,
993  std::exception_ptr iExceptPtr) const {
994  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
995  auto k = lookupProcessOrder[iProcessingIndex];
996 
997  setCache(iSkipCurrentProcess, k, iExceptPtr);
998  }
999 
1000  bool NoProcessProductResolver::dataValidFromResolver(unsigned int iProcessingIndex,
1001  Principal const& principal,
1002  bool iSkipCurrentProcess) const {
1003  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
1004  auto k = lookupProcessOrder[iProcessingIndex];
1005  ProductResolverBase const* productResolver = principal.getProductResolverByIndex(matchingHolders_[k]);
1006 
1007  if (productResolver->productWasFetchedAndIsValid(iSkipCurrentProcess)) {
1008  setCache(iSkipCurrentProcess, k, nullptr);
1009  return true;
1010  }
1011  return false;
1012  }
1013 
1014  void NoProcessProductResolver::tryPrefetchResolverAsync(unsigned int iProcessingIndex,
1015  Principal const& principal,
1016  bool skipCurrentProcess,
1018  ModuleCallingContext const* mcc,
1020  tbb::task_group* group) const {
1021  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
1022  auto index = iProcessingIndex;
1023 
1024  const unsigned int choiceSize = ambiguous_.size();
1025  unsigned int newCacheIndex = choiceSize + kMissingOffset;
1026  while (index < lookupProcessOrder.size()) {
1027  auto k = lookupProcessOrder[index];
1028  if (k == 0) {
1029  break;
1030  }
1031  assert(k < ambiguous_.size());
1032  if (ambiguous_[k]) {
1033  newCacheIndex = choiceSize + kAmbiguousOffset;
1034  break;
1035  }
1037  //make new task
1038 
1039  auto task = new TryNextResolverWaitingTask(this, index, &principal, sra, mcc, skipCurrentProcess, token, group);
1040  WaitingTaskHolder hTask(*group, task);
1041  ProductResolverBase const* productResolver = principal.getProductResolverByIndex(matchingHolders_[k]);
1042 
1043  //Make sure the Services are available on this thread
1045 
1046  productResolver->prefetchAsync(hTask, principal, skipCurrentProcess, token, sra, mcc);
1047  return;
1048  }
1049  ++index;
1050  }
1051  //data product unavailable
1052  setCache(skipCurrentProcess, newCacheIndex, nullptr);
1053  }
1054 
1056 
1058 
1060 
1061  inline unsigned int NoProcessProductResolver::unsetIndexValue() const { return ambiguous_.size() + kUnsetOffset; }
1062 
1064  // This function should never receive 'true'. On the other hand,
1065  // nothing should break if a 'true' is passed, because
1066  // NoProcessProductResolver just forwards the resolve
1067  const auto resetValue = unsetIndexValue();
1068  lastCheckIndex_ = resetValue;
1069  lastSkipCurrentCheckIndex_ = resetValue;
1070  prefetchRequested_ = false;
1072  waitingTasks_.reset();
1074  }
1075 
1076  bool NoProcessProductResolver::singleProduct_() const { return false; }
1077 
1080  << "NoProcessProductResolver::unscheduledWasNotRun_() not implemented and should never be called.\n"
1081  << "Contact a Framework developer\n";
1082  }
1083 
1086  << "NoProcessProductResolver::productUnavailable_() not implemented and should never be called.\n"
1087  << "Contact a Framework developer\n";
1088  }
1089 
1092  << "NoProcessProductResolver::productResolved_() not implemented and should never be called.\n"
1093  << "Contact a Framework developer\n";
1094  }
1095 
1098  << "NoProcessProductResolver::productWasDeleted_() not implemented and should never be called.\n"
1099  << "Contact a Framework developer\n";
1100  }
1101 
1102  bool NoProcessProductResolver::productWasFetchedAndIsValid_(bool /*iSkipCurrentProcess*/) const {
1104  << "NoProcessProductResolver::productWasFetchedAndIsValid_() not implemented and should never be called.\n"
1105  << "Contact a Framework developer\n";
1106  }
1107 
1110  << "NoProcessProductResolver::branchDescription_() not implemented and should never be called.\n"
1111  << "Contact a Framework developer\n";
1112  }
1113 
1114  void NoProcessProductResolver::resetBranchDescription_(std::shared_ptr<BranchDescription const>) {
1116  << "NoProcessProductResolver::resetBranchDescription_() not implemented and should never be called.\n"
1117  << "Contact a Framework developer\n";
1118  }
1119 
1122  << "NoProcessProductResolver::provenance_() not implemented and should never be called.\n"
1123  << "Contact a Framework developer\n";
1124  }
1125 
1128  << "NoProcessProductResolver::connectTo() not implemented and should never be called.\n"
1129  << "Contact a Framework developer\n";
1130  }
1131 
1132  //---- SingleChoiceNoProcessProductResolver ----------------
1134  Principal const& principal,
1135  bool skipCurrentProcess,
1137  ModuleCallingContext const* mcc) const {
1138  //NOTE: Have to lookup the other ProductResolver each time rather than cache
1139  // it's pointer since it appears the pointer can change at some later stage
1141  ->resolveProduct(principal, skipCurrentProcess, sra, mcc);
1142  }
1143 
1145  Principal const& principal,
1146  bool skipCurrentProcess,
1147  ServiceToken const& token,
1149  ModuleCallingContext const* mcc) const {
1151  ->prefetchAsync(waitTask, principal, skipCurrentProcess, token, sra, mcc);
1152  }
1153 
1155 
1157 
1159 
1161 
1163 
1166  << "SingleChoiceNoProcessProductResolver::unscheduledWasNotRun_() not implemented and should never be called.\n"
1167  << "Contact a Framework developer\n";
1168  }
1169 
1172  << "SingleChoiceNoProcessProductResolver::productUnavailable_() not implemented and should never be called.\n"
1173  << "Contact a Framework developer\n";
1174  }
1175 
1178  << "SingleChoiceNoProcessProductResolver::productResolved_() not implemented and should never be called.\n"
1179  << "Contact a Framework developer\n";
1180  }
1181 
1184  << "SingleChoiceNoProcessProductResolver::productWasDeleted_() not implemented and should never be called.\n"
1185  << "Contact a Framework developer\n";
1186  }
1187 
1189  throw Exception(errors::LogicError) << "SingleChoiceNoProcessProductResolver::productWasFetchedAndIsValid_() not "
1190  "implemented and should never be called.\n"
1191  << "Contact a Framework developer\n";
1192  }
1193 
1196  << "SingleChoiceNoProcessProductResolver::branchDescription_() not implemented and should never be called.\n"
1197  << "Contact a Framework developer\n";
1198  }
1199 
1200  void SingleChoiceNoProcessProductResolver::resetBranchDescription_(std::shared_ptr<BranchDescription const>) {
1201  throw Exception(errors::LogicError) << "SingleChoiceNoProcessProductResolver::resetBranchDescription_() not "
1202  "implemented and should never be called.\n"
1203  << "Contact a Framework developer\n";
1204  }
1205 
1208  << "SingleChoiceNoProcessProductResolver::provenance_() not implemented and should never be called.\n"
1209  << "Contact a Framework developer\n";
1210  }
1211 
1214  << "SingleChoiceNoProcessProductResolver::connectTo() not implemented and should never be called.\n"
1215  << "Contact a Framework developer\n";
1216  }
1217 
1218 } // namespace edm
edm::ProductDeletedException
Definition: ProductDeletedException.h:28
edm::EventTransitionInfo
Definition: TransitionInfoTypes.h:26
edm::PuttableProductResolver::setupUnscheduled
void setupUnscheduled(UnscheduledConfigurator const &) final
Definition: ProductResolvers.cc:418
edm::SwitchAliasProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const final
Definition: ProductResolvers.cc:758
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:427
edm::SharedResourcesAcquirer
Definition: SharedResourcesAcquirer.h:34
edm::ModuleDescription::moduleLabel
std::string const & moduleLabel() const
Definition: ModuleDescription.h:43
edm::DataManagingProductResolver::productWasFetchedAndIsValid_
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const final
Definition: ProductResolvers.cc:565
edm::UnscheduledAuxiliary::eventTransitionInfo
EventTransitionInfo const & eventTransitionInfo() const
Definition: UnscheduledAuxiliary.h:36
edm::errors::MismatchedInputFiles
Definition: EDMException.h:52
edm::ProductResolverIndex
unsigned int ProductResolverIndex
Definition: ProductResolverIndex.h:8
edm::NoProcessProductResolver::setProductID_
void setProductID_(ProductID const &pid) override
Definition: ProductResolvers.cc:1057
edm::NoProcessProductResolver::resetBranchDescription_
void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) override
Definition: ProductResolvers.cc:1114
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
edm::NoProcessProductResolver::matchingHolders_
std::vector< ProductResolverIndex > matchingHolders_
Definition: ProductResolvers.h:531
cms::Exception::addContext
void addContext(std::string const &context)
Definition: Exception.cc:165
edm::MergeableInputProductResolver::setOrMergeProduct
void setOrMergeProduct(std::shared_ptr< WrapperBase > prod, MergeableRunProductMetadata const *mergeableRunProductMetadata) const
Definition: ProductResolvers.cc:240
edm::ParentProcessProductResolver::bd_
std::shared_ptr< BranchDescription const > bd_
Definition: ProductResolvers.h:463
edm::ServiceWeakToken
Definition: ServiceToken.h:86
edm::SingleChoiceNoProcessProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTaskHolder waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:1144
edm::AliasProductResolver::singleProduct_
bool singleProduct_() const override
Definition: ProductResolvers.cc:617
edm::signalslot::Signal::emit
void emit(Args &&... args) const
Definition: Signal.h:48
edm::NoProcessProductResolver::unsetIndexValue
unsigned int unsetIndexValue() const
Definition: ProductResolvers.cc:1061
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:833
edm::SingleChoiceNoProcessProductResolver::connectTo
void connectTo(ProductResolverBase const &iOther, Principal const *) final
Definition: ProductResolvers.cc:1212
edm::BranchDescription::unwrappedType
TypeWithDict const & unwrappedType() const
Definition: BranchDescription.h:95
edm::DelayedReaderInputProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:313
edm::SingleChoiceNoProcessProductResolver::unscheduledWasNotRun_
bool unscheduledWasNotRun_() const override
Definition: ProductResolvers.cc:1164
edm::NoProcessProductResolver::ambiguous_
std::vector< bool > ambiguous_
Definition: ProductResolvers.h:532
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::DataManagingOrAliasProductResolver
Definition: ProductResolvers.h:40
edm::ProductData::wrapper
WrapperBase const * wrapper() const
Definition: ProductData.h:35
edm::NoProcessProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:1063
kAmbiguousOffset
static constexpr unsigned int kAmbiguousOffset
Definition: ProductResolvers.cc:29
edm::SwitchAliasProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTaskHolder waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const final
Definition: ProductResolvers.cc:765
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::TypeWithDict::unvalidatedTypeInfo
std::type_info const & unvalidatedTypeInfo() const
Definition: TypeWithDict.h:81
deep_tau::DeepTauBase::BasicDiscriminator
BasicDiscriminator
Definition: DeepTauBase.h:115
edm::Provenance::productProvenance
ProductProvenance const * productProvenance() const
Definition: Provenance.cc:24
edm::NoProcessProductResolver::unscheduledWasNotRun_
bool unscheduledWasNotRun_() const override
Definition: ProductResolvers.cc:1078
edm::NoProcessProductResolver::lastSkipCurrentCheckIndex_
std::atomic< unsigned int > lastSkipCurrentCheckIndex_
Definition: ProductResolvers.h:536
edm::SwitchBaseProductResolver::waitingTasks_
WaitingTaskList waitingTasks_
Definition: ProductResolvers.h:351
edm::UnscheduledProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:494
edm::DelayedReaderInputProductResolver::retrieveAndMerge_
void retrieveAndMerge_(Principal const &principal, MergeableRunProductMetadata const *mergeableRunProductMetadata) const override
Definition: ProductResolvers.cc:194
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:30
FunctorTask.h
edm::DataManagingProductResolver::theStatus_
std::atomic< ProductStatus > theStatus_
Definition: ProductResolvers.h:101
edm::SwitchBaseProductResolver::worker
Worker * worker() const
Definition: ProductResolvers.h:319
edm::SingleChoiceNoProcessProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:1160
cms::cuda::assert
assert(be >=bs)
TypeID.h
edm::Principal
Definition: Principal.h:56
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
UnscheduledConfigurator.h
edm::SwitchProducerProductResolver::status_
ProductStatus status_
Definition: ProductResolvers.h:384
edm::ParentProcessProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:808
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:990
edm::DataManagingProductResolver::setMergeableRunProductMetadataInProductData
void setMergeableRunProductMetadataInProductData(MergeableRunProductMetadata const *)
Definition: ProductResolvers.cc:583
edm::DataManagingProductResolver::ProductStatus::ProductDeleted
edm::ParentProcessProductResolver::singleProduct_
bool singleProduct_() const override
Definition: ProductResolvers.cc:810
edm::PutOnReadInputProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTaskHolder waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const final
Definition: ProductResolvers.cc:345
edm::ParentProcessProductResolver::provRetriever_
ProductProvenanceRetriever const * provRetriever_
Definition: ProductResolvers.h:464
wrapper
static HepMC::HEPEVT_Wrapper wrapper
Definition: BeamHaloProducer.cc:47
edm::NoProcessProductResolver::lastCheckIndex_
std::atomic< unsigned int > lastCheckIndex_
Definition: ProductResolvers.h:535
edm::SwitchBaseProductResolver::setProductID_
void setProductID_(ProductID const &pid) final
Definition: ProductResolvers.cc:657
edm::TaskSentry
Definition: TaskBase.h:50
edm::SingleChoiceNoProcessProductResolver::resetBranchDescription_
void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) override
Definition: ProductResolvers.cc:1200
edm::DataManagingProductResolver::defaultStatus
ProductStatus defaultStatus() const
Definition: ProductResolvers.h:69
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
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:318
edm::NoProcessProductResolver::tryResolver
Resolution tryResolver(unsigned int index, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
Definition: ProductResolvers.cc:846
edm::Principal::getProductResolverByIndex
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
Definition: Principal.cc:562
edm::AliasProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:605
edm::ModuleCallingContext::parent
ParentContext const & parent() const
Definition: ModuleCallingContext.h:53
edm::ProductData::provenance
Provenance const & provenance() const
Definition: ProductData.h:33
edm::ProductResolverBase::prefetchAsync
void prefetchAsync(WaitingTaskHolder waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
Definition: ProductResolverBase.h:69
edm::ProductResolverBase::productUnavailable
bool productUnavailable() const
Definition: ProductResolverBase.h:87
edm::DataManagingProductResolver::productData_
ProductData productData_
Definition: ProductResolvers.h:100
edm::Exception
Definition: EDMException.h:77
edm::WaitingTaskList::reset
void reset()
Resets access to the resource so that added tasks will wait.
Definition: WaitingTaskList.cc:53
edm::make_functor_task
FunctorTask< F > * make_functor_task(F f)
Definition: FunctorTask.h:44
edm::Worker::description
ModuleDescription const * description() const
Definition: Worker.h:186
SharedResourcesAcquirer.h
edm::NoProcessProductResolver::skippingPrefetchRequested_
std::atomic< bool > skippingPrefetchRequested_
Definition: ProductResolvers.h:538
edm::ServiceToken
Definition: ServiceToken.h:42
edm::InProcess
Definition: BranchType.h:11
ParentageRegistry.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::MergeableInputProductResolver::mergeProduct
void mergeProduct(std::shared_ptr< WrapperBase > edp, MergeableRunProductMetadata const *) const
Definition: ProductResolvers.cc:80
edm::SwitchBaseProductResolver::worker_
Worker * worker_
Definition: ProductResolvers.h:350
edm::Worker::doWorkAsync
void doWorkAsync(WaitingTaskHolder, typename T::TransitionInfoType const &, ServiceToken const &, StreamID, ParentContext const &, typename T::Context const *)
Definition: Worker.h:928
edm::ProductProvenanceRetriever::insertIntoSet
void insertIntoSet(ProductProvenance provenanceProduct) const
Definition: ProductProvenanceRetriever.cc:121
edm::UnscheduledProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTaskHolder waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:445
kUnsetOffset
static constexpr unsigned int kUnsetOffset
Definition: ProductResolvers.cc:28
edm::PutOnReadInputProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const final
Definition: ProductResolvers.cc:338
edm::DataManagingProductResolver::setProduct
void setProduct(std::unique_ptr< WrapperBase > edp) const
Definition: ProductResolvers.cc:527
edm::NoProcessProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:1055
edm::ProductProvenance
Definition: ProductProvenance.h:24
edm::ParentProcessProductResolver::throwNullRealProduct
void throwNullRealProduct() const
Definition: ProductResolvers.cc:812
SerialTaskQueue.h
edm::NoProcessProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:855
edm::DelayedReaderInputProductResolver::setMergeableRunProductMetadata_
void setMergeableRunProductMetadata_(MergeableRunProductMetadata const *) override
Definition: ProductResolvers.cc:250
DQM.reader
reader
Definition: DQM.py:105
edm::NoProcessProductResolver::singleProduct_
bool singleProduct_() const override
Definition: ProductResolvers.cc:1076
EventPrincipal.h
edm::ProducedProductResolver::putProduct
void putProduct(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:502
edm::Principal::reader
DelayedReader * reader() const
Definition: Principal.h:187
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:1102
edm::SwitchBaseProductResolver::resolveProductImpl
Resolution resolveProductImpl(Resolution) const
Definition: ProductResolvers.cc:639
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
edm::SingleChoiceNoProcessProductResolver::productUnavailable_
bool productUnavailable_() const override
Definition: ProductResolvers.cc:1170
edm::DataManagingProductResolver::productUnavailable_
bool productUnavailable_() const final
Definition: ProductResolvers.cc:549
edm::BranchDescription::originalBranchID
BranchID const & originalBranchID() const
Definition: BranchDescription.h:77
edm::Principal::branchType
BranchType const & branchType() const
Definition: Principal.h:181
edm::PutOnReadInputProductResolver::putOrMergeProduct
void putOrMergeProduct(std::unique_ptr< WrapperBase > prod) const override
Definition: ProductResolvers.cc:352
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:38
edm::WaitingTaskList::doneWaiting
void doneWaiting(std::exception_ptr iPtr)
Signals that the resource is now available and tasks should be spawned.
Definition: WaitingTaskList.cc:212
edm::errors::InsertFailure
Definition: EDMException.h:35
edm::BranchDescription::unwrappedTypeID
TypeID unwrappedTypeID() const
Definition: BranchDescription.h:98
edm::SwitchBaseProductResolver::realProduct
DataManagingOrAliasProductResolver const & realProduct() const
Definition: ProductResolvers.h:320
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:250
edm::InEvent
Definition: BranchType.h:11
Transition.h
dqmdumpme.k
k
Definition: dqmdumpme.py:60
edm::UnscheduledProductResolver::aux_
UnscheduledAuxiliary const * aux_
Definition: ProductResolvers.h:251
edm::SwitchBaseProductResolver::productResolved_
bool productResolved_() const final
Definition: ProductResolvers.cc:645
edm::DataManagingProductResolver::throwProductDeletedException
void throwProductDeletedException() const
Definition: ProductResolvers.cc:34
edm::DelayedReaderInputProductResolver::m_prefetchRequested
std::atomic< bool > m_prefetchRequested
Definition: ProductResolvers.h:151
edm::SingleChoiceNoProcessProductResolver::realResolverIndex_
ProductResolverIndex realResolverIndex_
Definition: ProductResolvers.h:578
edm::SingleChoiceNoProcessProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:1154
edm::UnscheduledAuxiliary::preModuleDelayedGetSignal_
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preModuleDelayedGetSignal_
Definition: UnscheduledAuxiliary.h:43
edm::SingleChoiceNoProcessProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:1133
createBeamHaloJobs.queue
queue
Definition: createBeamHaloJobs.py:343
edm::DataManagingProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) final
Definition: ProductResolvers.cc:577
SharedResourcesAcquirer
edm::SwitchBaseProductResolver::realProduct_
DataManagingOrAliasProductResolver & realProduct_
Definition: ProductResolvers.h:347
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:934
edm::DelayedReaderInputProductResolver::m_waitingTasks
WaitingTaskList m_waitingTasks
Definition: ProductResolvers.h:152
edm::PutOnReadInputProductResolver::putProduct
void putProduct(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:327
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:1158
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
edm::NoProcessProductResolver::branchDescription_
BranchDescription const & branchDescription_() const override
Definition: ProductResolvers.cc:1108
Resolution
Definition: trackSplitPlot.h:33
edm::NoProcessProductResolver::provenance_
Provenance const * provenance_() const override
Definition: ProductResolvers.cc:1120
edm::ParentProcessProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:798
edm::ProductData::setProvenance
void setProvenance(ProductProvenanceRetriever const *provRetriever)
Definition: ProductData.h:56
edm::NoProcessProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTaskHolder waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:902
edm::SwitchBaseProductResolver::prefetchRequested_
std::atomic< bool > prefetchRequested_
Definition: ProductResolvers.h:352
edm::make_waiting_task
FunctorWaitingTask< F > * make_waiting_task(F f)
Definition: WaitingTask.h:101
edm::DataManagingProductResolver::ProductStatus
ProductStatus
Definition: ProductResolvers.h:51
edm::SwitchBaseProductResolver::productData_
ProductData productData_
Definition: ProductResolvers.h:349
edm::NoProcessProductResolver::productResolved_
bool productResolved_() const final
Definition: ProductResolvers.cc:1090
edm::WaitingTaskHolder
Definition: WaitingTaskHolder.h:32
edm::InLumi
Definition: BranchType.h:11
edm::ModuleCallingContext::getStreamContext
StreamContext const * getStreamContext() const
Definition: ModuleCallingContext.cc:32
edm::NoProcessProductResolver::connectTo
void connectTo(ProductResolverBase const &iOther, Principal const *) final
Definition: ProductResolvers.cc:1126
thread_safety_macros.h
edm::UnscheduledProductResolver::setupUnscheduled
void setupUnscheduled(UnscheduledConfigurator const &) final
Definition: ProductResolvers.cc:422
edm::DataManagingProductResolver::ProductStatus::ProductSet
definitions.original
original
Definition: definitions.py:57
edm::PuttableProductResolver::prefetchRequested_
std::atomic< bool > prefetchRequested_
Definition: ProductResolvers.h:225
edm::MergeableRunProductMetadata::MergeDecision
MergeDecision
Definition: MergeableRunProductMetadata.h:54
edm::SwitchBaseProductResolver::connectTo
void connectTo(ProductResolverBase const &iOther, Principal const *iParentPrincipal) final
Definition: ProductResolvers.cc:629
edm::ProductResolverIndexInvalid
Definition: ProductResolverIndex.h:16
edm::SingleChoiceNoProcessProductResolver::branchDescription_
BranchDescription const & branchDescription_() const override
Definition: ProductResolvers.cc:1194
edm::PuttableProductResolver::putProduct
void putProduct(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:402
UnscheduledAuxiliary.h
edm::DataManagingProductResolver::setProductID_
void setProductID_(ProductID const &pid) final
Definition: ProductResolvers.cc:581
edm::DataManagingOrAliasProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override=0
edm::SwitchBaseProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:662
edm::SingleChoiceNoProcessProductResolver::productResolved_
bool productResolved_() const final
Definition: ProductResolvers.cc:1176
edm::DataManagingProductResolver::ProductStatus::ResolveNotRun
edm::Provenance::store
ProductProvenanceRetriever const * store() const
Definition: Provenance.h:60
edm::WrapperBase
Definition: WrapperBase.h:23
edm::UnscheduledConfigurator::findWorker
Worker * findWorker(std::string const &iLabel) const
Definition: UnscheduledConfigurator.h:45
edm::SwitchProducerProductResolver::putProduct
void putProduct(std::unique_ptr< WrapperBase > edp) const final
Definition: ProductResolvers.cc:727
edm::PuttableProductResolver::m_waitingTasks
WaitingTaskList m_waitingTasks
Definition: ProductResolvers.h:223
edm::BranchDescription::branchType
BranchType const & branchType() const
Definition: BranchDescription.h:122
edm::BranchDescription::branchName
std::string const & branchName() const
Definition: BranchDescription.h:120
edm::ServiceWeakToken::lock
ServiceToken lock() const
Definition: ServiceToken.h:101
edm::DelayedReaderInputProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:162
edm::UnscheduledConfigurator
Definition: UnscheduledConfigurator.h:32
edm::Worker::callWhenDoneAsync
void callWhenDoneAsync(WaitingTaskHolder task)
Definition: Worker.h:165
edm::ProductResolverBase::productWasFetchedAndIsValid
bool productWasFetchedAndIsValid(bool iSkipCurrentProcess) const
Definition: ProductResolverBase.h:102
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
edm::Principal::lookupProcessOrder
std::vector< unsigned int > const & lookupProcessOrder() const
Definition: Principal.h:197
edm::ProducedProductResolver::isFromCurrentProcess
bool isFromCurrentProcess() const final
Definition: ProductResolvers.cc:511
edm::NoProcessProductResolver::madeAtEnd_
const bool madeAtEnd_
Definition: ProductResolvers.h:539
edm::NoProcessProductResolver::dataValidFromResolver
bool dataValidFromResolver(unsigned int iProcessingIndex, Principal const &principal, bool iSkipCurrentProcess) const
Definition: ProductResolvers.cc:1000
edm::ProductResolverBase::Resolution::makeAmbiguous
static Resolution makeAmbiguous()
Definition: ProductResolverBase.h:48
res
Definition: Electron.h:6
edm::NoProcessProductResolver::waitingTasks_
WaitingTaskList waitingTasks_
Definition: ProductResolvers.h:533
edm::SingleChoiceNoProcessProductResolver::setProductID_
void setProductID_(ProductID const &pid) override
Definition: ProductResolvers.cc:1156
edm::ProductResolverBase::moduleLabel
std::string const & moduleLabel() const
Definition: ProductResolverBase.h:119
edm::SwitchProducerProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTaskHolder waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const final
Definition: ProductResolvers.cc:692
edm::DataManagingProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:592
edm::DataManagingProductResolver::singleProduct_
bool singleProduct_() const final
Definition: ProductResolvers.cc:603
edm::DelayedReaderInputProductResolver::isFromCurrentProcess
bool isFromCurrentProcess() const final
Definition: ProductResolvers.cc:325
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:410
edm::WaitingTaskList::add
void add(tbb::task_group *, WaitingTask *)
Adds task to the waiting list.
Definition: WaitingTaskList.cc:125
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:356
edm::AliasProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:615
edm::UnscheduledConfigurator::auxiliary
UnscheduledAuxiliary const * auxiliary() const
Definition: UnscheduledConfigurator.h:53
edm::DataManagingProductResolver::checkType
void checkType(WrapperBase const &prod) const
Definition: ProductResolvers.cc:515
edm::ProductData::unsafe_wrapper
WrapperBase * unsafe_wrapper() const
Definition: ProductData.h:36
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::WaitingTask
Definition: WaitingTask.h:36
edm::DataManagingProductResolver::status
ProductStatus status() const
Definition: ProductResolvers.h:68
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:635
edm::TypeID
Definition: TypeID.h:22
edm::DataManagingProductResolver::getProductData
ProductData const & getProductData() const final
Definition: ProductResolvers.h:74
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:1182
std
Definition: JetResolutionObject.h:76
edm::NoProcessProductResolver::skippingWaitingTasks_
WaitingTaskList skippingWaitingTasks_
Definition: ProductResolvers.h:534
edm::SwitchBaseProductResolver::getProductData
ProductData const & getProductData() const final
Definition: ProductResolvers.h:343
edm::SwitchProducerProductResolver::SwitchProducerProductResolver
SwitchProducerProductResolver(std::shared_ptr< BranchDescription const > bd, DataManagingOrAliasProductResolver &realProduct)
Definition: ProductResolvers.cc:678
edm::WrapperBase::isPresent
bool isPresent() const
Definition: WrapperBase.h:30
edm::SingleChoiceNoProcessProductResolver::productWasFetchedAndIsValid_
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const override
Definition: ProductResolvers.cc:1188
edm::UnscheduledProductResolver::worker_
Worker * worker_
Definition: ProductResolvers.h:252
MergeableRunProductMetadata.h
edm::ProductData::setMergeableRunProductMetadata
void setMergeableRunProductMetadata(MergeableRunProductMetadataBase const *mrpm)
Definition: ProductData.h:60
edm::ProductResolverBase
Definition: ProductResolverBase.h:34
Exception
Definition: hltDiff.cc:245
edm::SwitchBaseProductResolver::parentageID_
ParentageID parentageID_
Definition: ProductResolvers.h:354
edm::ParentProcessProductResolver::setProductID_
void setProductID_(ProductID const &pid) override
Definition: ProductResolvers.cc:802
edm::SwitchBaseProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) final
Definition: ProductResolvers.cc:653
Worker.h
edm::PuttableProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTaskHolder waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:367
edm::MergeableRunProductMetadata::REPLACE
Definition: MergeableRunProductMetadata.h:54
edm::DataManagingProductResolver::setFailedStatus
void setFailedStatus() const
Definition: ProductResolvers.h:70
edm::ProductProvenanceRetriever::branchIDToProvenance
ProductProvenance const * branchIDToProvenance(BranchID const &bid) const
Definition: ProductProvenanceRetriever.cc:146
edm::PuttableProductResolver::worker_
Worker * worker_
Definition: ProductResolvers.h:224
edm::ProductResolverBase::productWasDeleted
bool productWasDeleted() const
Definition: ProductResolverBase.h:100
edm::NoProcessProductResolver
Definition: ProductResolvers.h:468
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:751
edm::DelayedReaderInputProductResolver::prefetchAsync_
void prefetchAsync_(WaitingTaskHolder waitTask, Principal const &principal, bool skipCurrentProcess, ServiceToken const &token, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:254
edm::UnscheduledAuxiliary::postModuleDelayedGetSignal_
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postModuleDelayedGetSignal_
Definition: UnscheduledAuxiliary.h:44
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::PutOnReadInputProductResolver::isFromCurrentProcess
bool isFromCurrentProcess() const final
Definition: ProductResolvers.cc:336
edm::SwitchProducerProductResolver::productUnavailable_
bool productUnavailable_() const final
Definition: ProductResolvers.cc:743
edm::NoProcessProductResolver::prefetchRequested_
std::atomic< bool > prefetchRequested_
Definition: ProductResolvers.h:537
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::DataManagingProductResolver::resetStatus
void resetStatus()
Definition: ProductResolvers.h:61
edm::SwitchBaseProductResolver::prefetchRequested
std::atomic< bool > & prefetchRequested() const
Definition: ProductResolvers.h:321
edm::BranchDescription
Definition: BranchDescription.h:32
edm::NoProcessProductResolver::tryPrefetchResolverAsync
void tryPrefetchResolverAsync(unsigned int iProcessingIndex, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc, ServiceToken token, tbb::task_group *) const
Definition: ProductResolvers.cc:1014
edm::AliasProductResolver::realProduct_
DataManagingOrAliasProductResolver & realProduct_
Definition: ProductResolvers.h:302
edm::DataManagingProductResolver::connectTo
void connectTo(ProductResolverBase const &, Principal const *) final
Definition: ProductResolvers.cc:513
edm::DelayedReaderInputProductResolver::aux_
UnscheduledAuxiliary const * aux_
Definition: ProductResolvers.h:153
edm::BranchDescription::className
std::string const & className() const
Definition: BranchDescription.h:79
edm::SwitchProducerProductResolver::defaultStatus_
constexpr static const ProductStatus defaultStatus_
Definition: ProductResolvers.h:379
TransitionInfoTypes.h
edm::DataManagingProductResolver::productResolved_
bool productResolved_() const final
Definition: ProductResolvers.cc:557
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:1059
edm::DelayedReaderInputProductResolver::setupUnscheduled
void setupUnscheduled(UnscheduledConfigurator const &) final
Definition: ProductResolvers.cc:321
edm::DataManagingProductResolver::productProvenancePtr_
ProductProvenance const * productProvenancePtr_() const final
Definition: ProductResolvers.cc:588
edm::SwitchBaseProductResolver::unsafe_setWrapperAndProvenance
void unsafe_setWrapperAndProvenance() const
Definition: ProductResolvers.cc:671
edm::AliasProductResolver::setProductID_
void setProductID_(ProductID const &pid) override
Definition: ProductResolvers.cc:609
edm::ProductResolverBase::Resolution
Definition: ProductResolverBase.h:36
edm::Provenance
Definition: Provenance.h:34
edm::SerialTaskQueueChain
Definition: SerialTaskQueueChain.h:32
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::ParentContext::isAtEndTransition
bool isAtEndTransition() const
Definition: ParentContext.cc:66
edm::ServiceRegistry::Operate
Definition: ServiceRegistry.h:40
edm::DataManagingProductResolver::productWasDeleted_
bool productWasDeleted_() const final
Definition: ProductResolvers.cc:563
edm::SwitchBaseProductResolver
Definition: ProductResolvers.h:307
edm::DataManagingProductResolver::isFromCurrentProcess
virtual bool isFromCurrentProcess() const =0
edm::errors::UnimplementedFeature
Definition: EDMException.h:38
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:682
edm::NoProcessProductResolver::productWasDeleted_
bool productWasDeleted_() const override
Definition: ProductResolvers.cc:1096
edm::WaitingTaskHolder::group
tbb::task_group * group() const noexcept
Definition: WaitingTaskHolder.h:77
edm::ProductID
Definition: ProductID.h:27
edm::DataManagingProductResolver::ProductStatus::ResolveFailed
edm::UnscheduledProductResolver::prefetchRequested_
std::atomic< bool > prefetchRequested_
Definition: ProductResolvers.h:253
edm::NoProcessProductResolver::productUnavailable_
bool productUnavailable_() const override
Definition: ProductResolvers.cc:1084
edm::ParentProcessProductResolver::productProvenancePtr_
ProductProvenance const * productProvenancePtr_() const override
Definition: ProductResolvers.cc:804
edm::AliasProductResolver::productProvenancePtr_
ProductProvenance const * productProvenancePtr_() const override
Definition: ProductResolvers.cc:611
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
edm::SingleChoiceNoProcessProductResolver::provenance_
Provenance const * provenance_() const override
Definition: ProductResolvers.cc:1206
watchdog.group
group
Definition: watchdog.py:82
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:1162
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:619