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 
80  void DataManagingProductResolver::mergeProduct(std::unique_ptr<WrapperBase> iFrom,
81  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  bool,
165  ModuleCallingContext const* mcc) const {
166  return resolveProductImpl<true>([this, &principal, mcc]() {
167  auto branchType = principal.branchType();
168  if (branchType == InLumi || branchType == InRun) {
169  //delayed get has not been allowed with Run or Lumis
170  // The file may already be closed so the reader is invalid
171  return;
172  }
173  if (mcc and (branchType == InEvent || branchType == InProcess) and aux_) {
175  }
176 
177  auto sentry(make_sentry(mcc, [this, branchType](ModuleCallingContext const* iContext) {
178  if ((branchType == InEvent || branchType == InProcess) and aux_) {
179  aux_->postModuleDelayedGetSignal_.emit(*(iContext->getStreamContext()), *iContext);
180  }
181  }));
182 
183  if (auto reader = principal.reader()) {
184  std::unique_lock<std::recursive_mutex> guard;
185  if (auto sr = reader->sharedResources().second) {
186  guard = std::unique_lock<std::recursive_mutex>(*sr);
187  }
188  if (not productResolved()) {
189  //another thread could have beaten us here
190  putProduct(reader->getProduct(branchDescription().branchID(), &principal, mcc));
191  }
192  }
193  });
194  }
195 
197  MergeableRunProductMetadata const* mergeableRunProductMetadata) const {
198  if (auto reader = principal.reader()) {
199  std::unique_lock<std::recursive_mutex> guard;
200  if (auto sr = reader->sharedResources().second) {
201  guard = std::unique_lock<std::recursive_mutex>(*sr);
202  }
203 
204  //Can't use resolveProductImpl since it first checks to see
205  // if the product was already retrieved and then returns if it is
206  std::unique_ptr<WrapperBase> edp(reader->getProduct(branchDescription().branchID(), &principal));
207 
208  if (edp.get() != nullptr) {
209  if (edp->isMergeable() && branchDescription().branchType() == InRun && !edp->hasSwap()) {
211  << "Missing definition of member function swap for branch name " << branchDescription().branchName()
212  << "\n"
213  << "Mergeable data types written to a Run must have the swap member function defined"
214  << "\n";
215  }
217  (status() == ProductStatus::ResolveFailed && !branchDescription().isMergeable())) {
218  putOrMergeProduct(std::move(edp), mergeableRunProductMetadata);
219  } else { // status() == ResolveFailed && branchDescription().isMergeable()
221  << "Merge of Run or Lumi product failed for branch " << branchDescription().branchName() << "\n"
222  << "The product branch was dropped in the first run or lumi fragment and present in a later one"
223  << "\n"
224  << "The solution is to drop the branch on input. Or better do not create inconsistent files\n"
225  << "that need to be merged in the first place.\n";
226  }
227  } else if (status() == defaultStatus()) {
228  setFailedStatus();
229  } else if (status() != ProductStatus::ResolveFailed && branchDescription().isMergeable()) {
231  << "Merge of Run or Lumi product failed for branch " << branchDescription().branchName() << "\n"
232  << "The product branch was present in first run or lumi fragment and dropped in a later one"
233  << "\n"
234  << "The solution is to drop the branch on input. Or better do not create inconsistent files\n"
235  << "that need to be merged in the first place.\n";
236  }
237  // Do nothing in other case. status is ResolveFailed already or
238  // it is not mergeable and the status is ProductSet
239  }
240  }
241 
244  }
245 
247  Principal const& principal,
248  bool skipCurrentProcess,
249  ServiceToken const& token,
251  ModuleCallingContext const* mcc) const {
252  //need to try changing m_prefetchRequested before adding to m_waitingTasks
253  bool expected = false;
254  bool prefetchRequested = m_prefetchRequested.compare_exchange_strong(expected, true);
255  m_waitingTasks.add(waitTask);
256 
257  if (prefetchRequested) {
258  auto workToDo = [this, mcc, &principal, token]() {
259  //need to make sure Service system is activated on the reading thread
261  // Caught exception is propagated via WaitingTaskList
262  CMS_SA_ALLOW try {
263  resolveProductImpl<true>([this, &principal, mcc]() {
264  if (principal.branchType() != InEvent) {
265  return;
266  }
267  if (auto reader = principal.reader()) {
268  std::unique_lock<std::recursive_mutex> guard;
269  if (auto sr = reader->sharedResources().second) {
270  guard = std::unique_lock<std::recursive_mutex>(*sr);
271  }
272  if (not productResolved()) {
273  //another thread could have finished this while we were waiting
274  putProduct(reader->getProduct(branchDescription().branchID(), &principal, mcc));
275  }
276  }
277  });
278  } catch (...) {
279  this->m_waitingTasks.doneWaiting(std::current_exception());
280  return;
281  }
282  this->m_waitingTasks.doneWaiting(nullptr);
283  };
284 
285  SerialTaskQueueChain* queue = nullptr;
286  if (auto reader = principal.reader()) {
287  if (auto shared_res = reader->sharedResources().first) {
288  queue = &(shared_res->serialQueueChain());
289  }
290  }
291  if (queue) {
292  queue->push(workToDo);
293  } else {
294  //Have to create a new task
295  auto t = make_functor_task(tbb::task::allocate_root(), workToDo);
296  tbb::task::spawn(*t);
297  }
298  }
299  }
300 
302  if (not deleteEarly) {
303  m_prefetchRequested = false;
305  }
307  }
308 
310  aux_ = iConfigure.auxiliary();
311  }
312 
313  bool InputProductResolver::isFromCurrentProcess() const { return false; }
314 
316  bool skipCurrentProcess,
318  ModuleCallingContext const*) const {
319  if (!skipCurrentProcess) {
320  //'false' means never call the lambda function
321  return resolveProductImpl<false>([]() { return; });
322  }
323  return Resolution(nullptr);
324  }
325 
327  Principal const& principal,
328  bool skipCurrentProcess,
329  ServiceToken const& token,
331  ModuleCallingContext const* mcc) const {
332  if (not skipCurrentProcess) {
333  if (branchDescription().availableOnlyAtEndTransition() and mcc) {
334  if (not mcc->parent().isAtEndTransition()) {
335  return;
336  }
337  }
338  //Need to try modifying prefetchRequested_ before adding to m_waitingTasks
339  bool expected = false;
340  bool prefetchRequested = prefetchRequested_.compare_exchange_strong(expected, true);
341  m_waitingTasks.add(waitTask);
342 
343  if (worker_ and prefetchRequested) {
344  //using a waiting task to do a callback guarantees that
345  // the m_waitingTasks list will be released from waiting even
346  // if the module does not put this data product or the
347  // module has an exception while running
348 
349  auto waiting = make_waiting_task(tbb::task::allocate_root(), [this](std::exception_ptr const* iException) {
350  if (nullptr != iException) {
351  m_waitingTasks.doneWaiting(*iException);
352  } else {
353  m_waitingTasks.doneWaiting(std::exception_ptr());
354  }
355  });
356  worker_->callWhenDoneAsync(waiting);
357  }
358  }
359  }
360 
361  void PuttableProductResolver::putProduct_(std::unique_ptr<WrapperBase> edp) const {
363  bool expected = false;
364  if (prefetchRequested_.compare_exchange_strong(expected, true)) {
365  m_waitingTasks.doneWaiting(std::exception_ptr());
366  }
367  }
368 
370  if (not deleteEarly) {
371  prefetchRequested_ = false;
373  }
375  }
376 
379  }
380 
382  aux_ = iConfigure.auxiliary();
384  assert(worker_ != nullptr);
385  }
386 
388  bool skipCurrentProcess,
390  ModuleCallingContext const* mcc) const {
391  if (!skipCurrentProcess and worker_) {
392  return resolveProductImpl<true>([this, sra, mcc]() {
393  try {
394  ParentContext parentContext(mcc);
396 
397  auto workCall = [this, &parentContext, mcc]() {
398  auto sentry(make_sentry(mcc, [this](ModuleCallingContext const* iContext) {
399  aux_->postModuleDelayedGetSignal_.emit(*(iContext->getStreamContext()), *iContext);
400  }));
401 
404  info, info.principal().streamID(), parentContext, mcc->getStreamContext());
405  };
406 
407  if (sra) {
408  assert(false);
409  } else {
410  workCall();
411  }
412 
413  } catch (cms::Exception& ex) {
414  std::ostringstream ost;
415  ost << "Calling produce method for unscheduled module " << worker_->description().moduleName() << "/'"
416  << worker_->description().moduleLabel() << "'";
417  ex.addContext(ost.str());
418  throw;
419  }
420  });
421  }
422  return Resolution(nullptr);
423  }
424 
426  Principal const& principal,
427  bool skipCurrentProcess,
428  ServiceToken const& token,
430  ModuleCallingContext const* mcc) const {
431  if (skipCurrentProcess) {
432  return;
433  }
434  //need to try changing prefetchRequested_ before adding to waitingTasks_
435  bool expected = false;
436  bool prefetchRequested = prefetchRequested_.compare_exchange_strong(expected, true);
437  waitingTasks_.add(waitTask);
438  if (prefetchRequested) {
439  //Have to create a new task which will make sure the state for UnscheduledProductResolver
440  // is properly set after the module has run
441  auto t = make_waiting_task(tbb::task::allocate_root(), [this](std::exception_ptr const* iPtr) {
442  //The exception is being rethrown because resolveProductImpl sets the ProductResolver to a failed
443  // state for the case where an exception occurs during the call to the function.
444  // Caught exception is propagated via WaitingTaskList
445  CMS_SA_ALLOW try {
446  resolveProductImpl<true>([iPtr]() {
447  if (iPtr) {
448  std::rethrow_exception(*iPtr);
449  }
450  });
451  } catch (...) {
452  waitingTasks_.doneWaiting(std::current_exception());
453  return;
454  }
455  waitingTasks_.doneWaiting(nullptr);
456  });
457 
458  ParentContext parentContext(mcc);
461  t, info, token, info.principal().streamID(), parentContext, mcc->getStreamContext());
462  }
463  }
464 
466  if (not deleteEarly) {
467  prefetchRequested_ = false;
469  }
471  }
472 
473  void ProducedProductResolver::putProduct_(std::unique_ptr<WrapperBase> edp) const {
474  if (status() != defaultStatus()) {
476  << "Attempt to insert more than one product on branch " << branchDescription().branchName() << "\n";
477  }
478 
479  setProduct(std::move(edp)); // ProductResolver takes ownership
480  }
481 
482  void InputProductResolver::putProduct_(std::unique_ptr<WrapperBase> edp) const {
483  if (not productResolved()) {
484  //Another thread could have set this
485  setProduct(std::move(edp));
486  }
487  }
488 
489  bool ProducedProductResolver::isFromCurrentProcess() const { return true; }
490 
492 
494  std::unique_ptr<WrapperBase> prod, MergeableRunProductMetadata const* mergeableRunProductMetadata) const {
495  if (not prod) {
496  return;
497  }
498  if (status() == defaultStatus()) {
499  //resolveProduct has not been called or it failed
501  } else {
502  mergeProduct(std::move(prod), mergeableRunProductMetadata);
503  }
504  }
505 
507  // Check if the types match.
508  TypeID typeID(prod.dynamicTypeInfo());
510  // Types do not match.
512  << "Product on branch " << branchDescription().branchName() << " is of wrong type.\n"
513  << "It is supposed to be of type " << branchDescription().className() << ".\n"
514  << "It is actually of type " << typeID.className() << ".\n";
515  }
516  }
517 
518  void DataManagingProductResolver::setProduct(std::unique_ptr<WrapperBase> edp) const {
519  if (edp) {
520  checkType(*edp);
523  } else {
524  setFailedStatus();
525  }
526  }
527  // This routine returns true if it is known that currently there is no real product.
528  // If there is a real product, it returns false.
529  // If it is not known if there is a real product, it returns false.
531  auto presentStatus = status();
532  if (presentStatus == ProductStatus::ProductSet) {
533  return !(getProductData().wrapper()->isPresent());
534  }
535  return presentStatus != ProductStatus::ResolveNotRun;
536  }
537 
539  auto s = status();
540  return (s != defaultStatus()) or (s == ProductStatus::ProductDeleted);
541  }
542 
543  // This routine returns true if the product was deleted early in order to save memory
545 
546  bool DataManagingProductResolver::productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const {
547  if (iSkipCurrentProcess and isFromCurrentProcess()) {
548  return false;
549  }
551  if (getProductData().wrapper()->isPresent()) {
552  return true;
553  }
554  }
555  return false;
556  }
557 
559  productData_.setProvenance(provRetriever);
560  }
561 
563 
565  MergeableRunProductMetadata const* mrpm) {
567  }
568 
570  return provenance()->productProvenance();
571  }
572 
576  }
577  if (deleteEarly) {
579  } else {
580  resetStatus();
581  }
582  }
583 
584  bool DataManagingProductResolver::singleProduct_() const { return true; }
585 
588  }
589 
591 
593  return provenance()->productProvenance();
594  }
595 
597 
598  bool AliasProductResolver::singleProduct_() const { return true; }
599 
600  void AliasProductResolver::putProduct_(std::unique_ptr<WrapperBase>) const {
602  << "AliasProductResolver::putProduct_() not implemented and should never be called.\n"
603  << "Contact a Framework developer\n";
604  }
605 
606  void AliasProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp,
607  MergeableRunProductMetadata const*) const {
609  << "AliasProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp, MergeableRunProductMetadata "
610  "const*) not implemented and should never be called.\n"
611  << "Contact a Framework developer\n";
612  }
613 
614  SwitchBaseProductResolver::SwitchBaseProductResolver(std::shared_ptr<BranchDescription const> bd,
616  : realProduct_(realProduct), productData_(std::move(bd)), prefetchRequested_(false) {
617  // Parentage of this branch is always the same by construction, so we can compute the ID just "once" here.
618  Parentage p;
619  p.setParents(std::vector<BranchID>{realProduct.branchDescription().originalBranchID()});
620  parentageID_ = p.id();
622  }
623 
624  void SwitchBaseProductResolver::connectTo(ProductResolverBase const& iOther, Principal const* iParentPrincipal) {
626  << "SwitchBaseProductResolver::connectTo() not implemented and should never be called.\n"
627  << "Contact a Framework developer\n";
628  }
629 
632  }
633 
635  if (res.data() == nullptr)
636  return res;
637  return Resolution(&productData_);
638  }
639 
641  // SwitchProducer will never put anything in the event, and
642  // "false" will make Event::commit_() to call putProduct() with
643  // null unique_ptr<WrapperBase> to signal that the produce() was
644  // run.
645  return false;
646  }
647 
648  void SwitchBaseProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp,
649  MergeableRunProductMetadata const*) const {
651  << "SwitchBaseProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp, "
652  "MergeableRunProductMetadata const*) not implemented and should never be called.\n"
653  << "Contact a Framework developer\n";
654  }
655 
657  productData_.setProvenance(provRetriever);
658  }
659 
661  // insertIntoSet is const, so let's exploit that to fake the getting of the "input" product
663  }
664 
667  realProduct_.resetProductData_(deleteEarly);
668  if (not deleteEarly) {
669  prefetchRequested_ = false;
671  }
672  }
673 
675  // update provenance
677  // Use the Wrapper of the pointed-to resolver, but the provenance of this resolver
678  productData_.unsafe_setWrapper(realProduct().getProductData().sharedConstWrapper());
679  }
680 
681  SwitchProducerProductResolver::SwitchProducerProductResolver(std::shared_ptr<BranchDescription const> bd,
683  : SwitchBaseProductResolver(std::move(bd), realProduct), status_(defaultStatus_) {}
684 
686  bool skipCurrentProcess,
688  ModuleCallingContext const* mcc) const {
690  return resolveProductImpl(realProduct().resolveProduct(principal, skipCurrentProcess, sra, mcc));
691  }
692  return Resolution(nullptr);
693  }
694 
696  Principal const& principal,
697  bool skipCurrentProcess,
698  ServiceToken const& token,
700  ModuleCallingContext const* mcc) const {
701  if (skipCurrentProcess) {
702  return;
703  }
704  if (branchDescription().availableOnlyAtEndTransition() and mcc and not mcc->parent().isAtEndTransition()) {
705  return;
706  }
707 
708  //need to try changing prefetchRequested before adding to waitingTasks
709  bool expected = false;
710  bool doPrefetchRequested = prefetchRequested().compare_exchange_strong(expected, true);
711  waitingTasks().add(waitTask);
712 
713  if (doPrefetchRequested) {
714  //using a waiting task to do a callback guarantees that
715  // the waitingTasks() list will be released from waiting even
716  // if the module does not put this data product or the
717  // module has an exception while running
718  auto waiting = make_waiting_task(tbb::task::allocate_root(), [this](std::exception_ptr const* iException) {
719  if (nullptr != iException) {
720  waitingTasks().doneWaiting(*iException);
721  } else {
723  waitingTasks().doneWaiting(std::exception_ptr());
724  }
725  });
726  worker()->callWhenDoneAsync(waiting);
727  }
728  }
729 
730  void SwitchProducerProductResolver::putProduct_(std::unique_ptr<WrapperBase> edp) const {
731  if (status_ != defaultStatus_) {
733  << "Attempt to insert more than one product for a branch " << branchDescription().branchName()
734  << "This makes no sense for SwitchProducerProductResolver.\nContact a Framework developer";
735  }
736  // Let's use ResolveFailed to signal that produce() was called, as
737  // there is no real product in this resolver
739  bool expected = false;
740  if (prefetchRequested().compare_exchange_strong(expected, true)) {
742  waitingTasks().doneWaiting(std::exception_ptr());
743  }
744  }
745 
747  // if produce() was run (ResolveFailed), ask from the real resolver
749  return realProduct().productUnavailable();
750  }
751  return true;
752  }
753 
756  if (not deleteEarly) {
758  }
759  }
760 
762  bool skipCurrentProcess,
764  ModuleCallingContext const* mcc) const {
765  return resolveProductImpl(realProduct().resolveProduct(principal, skipCurrentProcess, sra, mcc));
766  }
767 
769  Principal const& principal,
770  bool skipCurrentProcess,
771  ServiceToken const& token,
773  ModuleCallingContext const* mcc) const {
774  if (skipCurrentProcess) {
775  return;
776  }
777 
778  //need to try changing prefetchRequested_ before adding to waitingTasks_
779  bool expected = false;
780  bool doPrefetchRequested = prefetchRequested().compare_exchange_strong(expected, true);
781  waitingTasks().add(waitTask);
782 
783  if (doPrefetchRequested) {
784  //using a waiting task to do a callback guarantees that
785  // the waitingTasks() list will be released from waiting even
786  // if the module does not put this data product or the
787  // module has an exception while running
788  auto waiting = make_waiting_task(tbb::task::allocate_root(), [this](std::exception_ptr const* iException) {
789  if (nullptr != iException) {
790  waitingTasks().doneWaiting(*iException);
791  } else {
793  waitingTasks().doneWaiting(std::exception_ptr());
794  }
795  });
796  realProduct().prefetchAsync(waiting, principal, skipCurrentProcess, token, sra, mcc);
797  }
798  }
799 
800  void SwitchAliasProductResolver::putProduct_(std::unique_ptr<WrapperBase> edp) const {
802  << "SwitchAliasProductResolver::putProduct() not implemented and should never be called.\n"
803  << "Contact a Framework developer\n";
804  }
805 
807  provRetriever_ = provRetriever;
808  }
809 
811 
813  return provRetriever_ ? provRetriever_->branchIDToProvenance(bd_->originalBranchID()) : nullptr;
814  }
815 
817 
818  bool ParentProcessProductResolver::singleProduct_() const { return true; }
819 
820  void ParentProcessProductResolver::putProduct_(std::unique_ptr<WrapperBase>) const {
822  << "ParentProcessProductResolver::putProduct_() not implemented and should never be called.\n"
823  << "Contact a Framework developer\n";
824  }
825 
826  void ParentProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp,
827  MergeableRunProductMetadata const*) const {
829  << "ParentProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp, "
830  "MergeableRunProductMetadata const*) not implemented and should never be called.\n"
831  << "Contact a Framework developer\n";
832  }
833 
835  // In principle, this ought to be fixed. I noticed one hits this error
836  // when in a SubProcess and calling the Event::getProvenance function
837  // with a BranchID to a branch from an earlier SubProcess or the top
838  // level process and this branch is not kept in this SubProcess. It might
839  // be possible to hit this in other contexts. I say it ought to be
840  // fixed because one does not encounter this issue if the SubProcesses
841  // are split into genuinely different processes (in principle that
842  // ought to give identical behavior and results). No user has ever
843  // reported this issue which has been around for some time and it was only
844  // noticed when testing some rare corner cases after modifying Core code.
845  // After discussing this with Chris we decided that at least for the moment
846  // there are higher priorities than fixing this ... I converted it so it
847  // causes an exception instead of a seg fault. The issue that may need to
848  // be addressed someday is how ProductResolvers for non-kept branches are
849  // connected to earlier SubProcesses.
851  << "ParentProcessProductResolver::throwNullRealProduct RealProduct pointer not set in this context.\n"
852  << "Contact a Framework developer\n";
853  }
854 
855  NoProcessProductResolver::NoProcessProductResolver(std::vector<ProductResolverIndex> const& matchingHolders,
856  std::vector<bool> const& ambiguous,
857  bool madeAtEnd)
858  : matchingHolders_(matchingHolders),
859  ambiguous_(ambiguous),
860  lastCheckIndex_(ambiguous_.size() + kUnsetOffset),
861  lastSkipCurrentCheckIndex_(lastCheckIndex_.load()),
862  prefetchRequested_(false),
863  skippingPrefetchRequested_(false),
864  madeAtEnd_{madeAtEnd} {
865  assert(ambiguous_.size() == matchingHolders_.size());
866  }
867 
869  Principal const& principal,
870  bool skipCurrentProcess,
872  ModuleCallingContext const* mcc) const {
873  ProductResolverBase const* productResolver = principal.getProductResolverByIndex(matchingHolders_[index]);
874  return productResolver->resolveProduct(principal, skipCurrentProcess, sra, mcc);
875  }
876 
878  bool skipCurrentProcess,
880  ModuleCallingContext const* mcc) const {
881  //See if we've already cached which Resolver we should call or if
882  // we know it is ambiguous
883  const unsigned int choiceSize = ambiguous_.size();
884 
885  //madeAtEnd_==true and not at end transition is the same as skipping the current process
886  if ((not skipCurrentProcess) and (madeAtEnd_ and mcc)) {
887  skipCurrentProcess = not mcc->parent().isAtEndTransition();
888  }
889 
890  unsigned int checkCacheIndex = skipCurrentProcess ? lastSkipCurrentCheckIndex_.load() : lastCheckIndex_.load();
891  if (checkCacheIndex != choiceSize + kUnsetOffset) {
892  if (checkCacheIndex == choiceSize + kAmbiguousOffset) {
894  } else if (checkCacheIndex == choiceSize + kMissingOffset) {
895  return Resolution(nullptr);
896  }
897  return tryResolver(checkCacheIndex, principal, skipCurrentProcess, sra, mcc);
898  }
899 
900  std::atomic<unsigned int>& updateCacheIndex = skipCurrentProcess ? lastSkipCurrentCheckIndex_ : lastCheckIndex_;
901 
902  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
903  for (unsigned int k : lookupProcessOrder) {
904  assert(k < ambiguous_.size());
905  if (k == 0)
906  break; // Done
907  if (ambiguous_[k]) {
908  updateCacheIndex = choiceSize + kAmbiguousOffset;
910  }
912  auto resolution = tryResolver(k, principal, skipCurrentProcess, sra, mcc);
913  if (resolution.data() != nullptr) {
914  updateCacheIndex = k;
915  return resolution;
916  }
917  }
918  }
919 
920  updateCacheIndex = choiceSize + kMissingOffset;
921  return Resolution(nullptr);
922  }
923 
925  Principal const& principal,
926  bool skipCurrentProcess,
927  ServiceToken const& token,
929  ModuleCallingContext const* mcc) const {
930  bool timeToMakeAtEnd = true;
931  if (madeAtEnd_ and mcc) {
932  timeToMakeAtEnd = mcc->parent().isAtEndTransition();
933  }
934 
935  //If timeToMakeAtEnd is false, then it is equivalent to skipping the current process
936  if (not skipCurrentProcess and timeToMakeAtEnd) {
937  //need to try changing prefetchRequested_ before adding to waitingTasks_
938  bool expected = false;
939  bool prefetchRequested = prefetchRequested_.compare_exchange_strong(expected, true);
940  waitingTasks_.add(waitTask);
941 
942  if (prefetchRequested) {
943  //we are the first thread to request
944  tryPrefetchResolverAsync(0, principal, false, sra, mcc, token);
945  }
946  } else {
947  skippingWaitingTasks_.add(waitTask);
948  bool expected = false;
949  if (skippingPrefetchRequested_.compare_exchange_strong(expected, true)) {
950  //we are the first thread to request
951  tryPrefetchResolverAsync(0, principal, true, sra, mcc, token);
952  }
953  }
954  }
955 
956  void NoProcessProductResolver::setCache(bool iSkipCurrentProcess,
957  ProductResolverIndex iIndex,
958  std::exception_ptr iExceptPtr) const {
959  if (not iSkipCurrentProcess) {
960  lastCheckIndex_ = iIndex;
961  waitingTasks_.doneWaiting(iExceptPtr);
962  } else {
965  }
966  }
967 
968  namespace {
969  class TryNextResolverWaitingTask : public edm::WaitingTask {
970  public:
971  TryNextResolverWaitingTask(NoProcessProductResolver const* iResolver,
972  unsigned int iResolverIndex,
973  Principal const* iPrincipal,
975  ModuleCallingContext const* iMCC,
976  bool iSkipCurrentProcess,
977  ServiceToken iToken)
978  : resolver_(iResolver),
979  principal_(iPrincipal),
980  sra_(iSRA),
981  mcc_(iMCC),
982  serviceToken_(iToken),
983  index_(iResolverIndex),
984  skipCurrentProcess_(iSkipCurrentProcess) {}
985 
986  tbb::task* execute() override {
987  auto exceptPtr = exceptionPtr();
988  if (exceptPtr) {
989  resolver_->prefetchFailed(index_, *principal_, skipCurrentProcess_, *exceptPtr);
990  } else {
991  if (not resolver_->dataValidFromResolver(index_, *principal_, skipCurrentProcess_)) {
992  resolver_->tryPrefetchResolverAsync(
993  index_ + 1, *principal_, skipCurrentProcess_, sra_, mcc_, serviceToken_);
994  }
995  }
996  return nullptr;
997  }
998 
999  private:
1000  NoProcessProductResolver const* resolver_;
1001  Principal const* principal_;
1003  ModuleCallingContext const* mcc_;
1004  ServiceToken serviceToken_;
1005  unsigned int index_;
1006  bool skipCurrentProcess_;
1007  };
1008  } // namespace
1009 
1010  void NoProcessProductResolver::prefetchFailed(unsigned int iProcessingIndex,
1011  Principal const& principal,
1012  bool iSkipCurrentProcess,
1013  std::exception_ptr iExceptPtr) const {
1014  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
1015  auto k = lookupProcessOrder[iProcessingIndex];
1016 
1017  setCache(iSkipCurrentProcess, k, iExceptPtr);
1018  }
1019 
1020  bool NoProcessProductResolver::dataValidFromResolver(unsigned int iProcessingIndex,
1021  Principal const& principal,
1022  bool iSkipCurrentProcess) const {
1023  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
1024  auto k = lookupProcessOrder[iProcessingIndex];
1025  ProductResolverBase const* productResolver = principal.getProductResolverByIndex(matchingHolders_[k]);
1026 
1027  if (productResolver->productWasFetchedAndIsValid(iSkipCurrentProcess)) {
1028  setCache(iSkipCurrentProcess, k, nullptr);
1029  return true;
1030  }
1031  return false;
1032  }
1033 
1034  void NoProcessProductResolver::tryPrefetchResolverAsync(unsigned int iProcessingIndex,
1035  Principal const& principal,
1036  bool skipCurrentProcess,
1038  ModuleCallingContext const* mcc,
1039  ServiceToken token) const {
1040  std::vector<unsigned int> const& lookupProcessOrder = principal.lookupProcessOrder();
1041  auto index = iProcessingIndex;
1042 
1043  const unsigned int choiceSize = ambiguous_.size();
1044  unsigned int newCacheIndex = choiceSize + kMissingOffset;
1045  while (index < lookupProcessOrder.size()) {
1046  auto k = lookupProcessOrder[index];
1047  if (k == 0) {
1048  break;
1049  }
1050  assert(k < ambiguous_.size());
1051  if (ambiguous_[k]) {
1052  newCacheIndex = choiceSize + kAmbiguousOffset;
1053  break;
1054  }
1056  //make new task
1057 
1058  auto task = new (tbb::task::allocate_root())
1059  TryNextResolverWaitingTask(this, index, &principal, sra, mcc, skipCurrentProcess, token);
1060  task->increment_ref_count();
1061  ProductResolverBase const* productResolver = principal.getProductResolverByIndex(matchingHolders_[k]);
1062 
1063  //Make sure the Services are available on this thread
1065 
1066  productResolver->prefetchAsync(task, principal, skipCurrentProcess, token, sra, mcc);
1067  if (0 == task->decrement_ref_count()) {
1068  tbb::task::spawn(*task);
1069  }
1070  return;
1071  }
1072  ++index;
1073  }
1074  //data product unavailable
1075  setCache(skipCurrentProcess, newCacheIndex, nullptr);
1076  }
1077 
1079 
1081 
1083 
1084  inline unsigned int NoProcessProductResolver::unsetIndexValue() const { return ambiguous_.size() + kUnsetOffset; }
1085 
1087  // This function should never receive 'true'. On the other hand,
1088  // nothing should break if a 'true' is passed, because
1089  // NoProcessProductResolver just forwards the resolve
1090  const auto resetValue = unsetIndexValue();
1091  lastCheckIndex_ = resetValue;
1092  lastSkipCurrentCheckIndex_ = resetValue;
1093  prefetchRequested_ = false;
1095  waitingTasks_.reset();
1097  }
1098 
1099  bool NoProcessProductResolver::singleProduct_() const { return false; }
1100 
1103  << "NoProcessProductResolver::unscheduledWasNotRun_() not implemented and should never be called.\n"
1104  << "Contact a Framework developer\n";
1105  }
1106 
1109  << "NoProcessProductResolver::productUnavailable_() not implemented and should never be called.\n"
1110  << "Contact a Framework developer\n";
1111  }
1112 
1115  << "NoProcessProductResolver::productResolved_() not implemented and should never be called.\n"
1116  << "Contact a Framework developer\n";
1117  }
1118 
1121  << "NoProcessProductResolver::productWasDeleted_() not implemented and should never be called.\n"
1122  << "Contact a Framework developer\n";
1123  }
1124 
1125  bool NoProcessProductResolver::productWasFetchedAndIsValid_(bool /*iSkipCurrentProcess*/) const {
1127  << "NoProcessProductResolver::productWasFetchedAndIsValid_() not implemented and should never be called.\n"
1128  << "Contact a Framework developer\n";
1129  }
1130 
1131  void NoProcessProductResolver::putProduct_(std::unique_ptr<WrapperBase>) const {
1133  << "NoProcessProductResolver::putProduct_() not implemented and should never be called.\n"
1134  << "Contact a Framework developer\n";
1135  }
1136 
1137  void NoProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp,
1138  MergeableRunProductMetadata const*) const {
1140  << "NoProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp, MergeableRunProductMetadata "
1141  "const*) not implemented and should never be called.\n"
1142  << "Contact a Framework developer\n";
1143  }
1144 
1147  << "NoProcessProductResolver::branchDescription_() not implemented and should never be called.\n"
1148  << "Contact a Framework developer\n";
1149  }
1150 
1151  void NoProcessProductResolver::resetBranchDescription_(std::shared_ptr<BranchDescription const>) {
1153  << "NoProcessProductResolver::resetBranchDescription_() not implemented and should never be called.\n"
1154  << "Contact a Framework developer\n";
1155  }
1156 
1159  << "NoProcessProductResolver::provenance_() not implemented and should never be called.\n"
1160  << "Contact a Framework developer\n";
1161  }
1162 
1165  << "NoProcessProductResolver::connectTo() not implemented and should never be called.\n"
1166  << "Contact a Framework developer\n";
1167  }
1168 
1169  //---- SingleChoiceNoProcessProductResolver ----------------
1171  Principal const& principal,
1172  bool skipCurrentProcess,
1174  ModuleCallingContext const* mcc) const {
1175  //NOTE: Have to lookup the other ProductResolver each time rather than cache
1176  // it's pointer since it appears the pointer can change at some later stage
1178  ->resolveProduct(principal, skipCurrentProcess, sra, mcc);
1179  }
1180 
1182  Principal const& principal,
1183  bool skipCurrentProcess,
1184  ServiceToken const& token,
1186  ModuleCallingContext const* mcc) const {
1188  ->prefetchAsync(waitTask, principal, skipCurrentProcess, token, sra, mcc);
1189  }
1190 
1192 
1194 
1196 
1198 
1200 
1203  << "SingleChoiceNoProcessProductResolver::unscheduledWasNotRun_() not implemented and should never be called.\n"
1204  << "Contact a Framework developer\n";
1205  }
1206 
1209  << "SingleChoiceNoProcessProductResolver::productUnavailable_() not implemented and should never be called.\n"
1210  << "Contact a Framework developer\n";
1211  }
1212 
1215  << "SingleChoiceNoProcessProductResolver::productResolved_() not implemented and should never be called.\n"
1216  << "Contact a Framework developer\n";
1217  }
1218 
1221  << "SingleChoiceNoProcessProductResolver::productWasDeleted_() not implemented and should never be called.\n"
1222  << "Contact a Framework developer\n";
1223  }
1224 
1226  throw Exception(errors::LogicError) << "SingleChoiceNoProcessProductResolver::productWasFetchedAndIsValid_() not "
1227  "implemented and should never be called.\n"
1228  << "Contact a Framework developer\n";
1229  }
1230 
1231  void SingleChoiceNoProcessProductResolver::putProduct_(std::unique_ptr<WrapperBase>) const {
1233  << "SingleChoiceNoProcessProductResolver::putProduct_() not implemented and should never be called.\n"
1234  << "Contact a Framework developer\n";
1235  }
1236 
1237  void SingleChoiceNoProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp,
1238  MergeableRunProductMetadata const*) const {
1240  << "SingleChoiceNoProcessProductResolver::putOrMergeProduct_(std::unique_ptr<WrapperBase> edp, "
1241  "MergeableRunProductMetadata const*) not implemented and should never be called.\n"
1242  << "Contact a Framework developer\n";
1243  }
1244 
1247  << "SingleChoiceNoProcessProductResolver::branchDescription_() not implemented and should never be called.\n"
1248  << "Contact a Framework developer\n";
1249  }
1250 
1251  void SingleChoiceNoProcessProductResolver::resetBranchDescription_(std::shared_ptr<BranchDescription const>) {
1252  throw Exception(errors::LogicError) << "SingleChoiceNoProcessProductResolver::resetBranchDescription_() not "
1253  "implemented and should never be called.\n"
1254  << "Contact a Framework developer\n";
1255  }
1256 
1259  << "SingleChoiceNoProcessProductResolver::provenance_() not implemented and should never be called.\n"
1260  << "Contact a Framework developer\n";
1261  }
1262 
1265  << "SingleChoiceNoProcessProductResolver::connectTo() not implemented and should never be called.\n"
1266  << "Contact a Framework developer\n";
1267  }
1268 
1269 } // 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:377
edm::SwitchAliasProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const final
Definition: ProductResolvers.cc:761
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:387
edm::SharedResourcesAcquirer
Definition: SharedResourcesAcquirer.h:34
edm::ProducedProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:473
edm::ModuleDescription::moduleLabel
std::string const & moduleLabel() const
Definition: ModuleDescription.h:43
edm::DataManagingProductResolver::productWasFetchedAndIsValid_
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const final
Definition: ProductResolvers.cc:546
edm::ParentProcessProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:820
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::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:361
edm::NoProcessProductResolver::setProductID_
void setProductID_(ProductID const &pid) override
Definition: ProductResolvers.cc:1080
edm::InputProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:482
edm::NoProcessProductResolver::resetBranchDescription_
void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) override
Definition: ProductResolvers.cc:1151
MessageLogger.h
edm::Worker::doWorkAsync
void doWorkAsync(WaitingTask *, typename T::TransitionInfoType const &, ServiceToken const &, StreamID, ParentContext const &, typename T::Context const *)
Definition: Worker.h:920
funct::false
false
Definition: Factorize.h:29
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:598
edm::signalslot::Signal::emit
void emit(Args &&... args) const
Definition: Signal.h:48
edm::NoProcessProductResolver::unsetIndexValue
unsigned int unsetIndexValue() const
Definition: ProductResolvers.cc:1084
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:855
edm::SingleChoiceNoProcessProductResolver::connectTo
void connectTo(ProductResolverBase const &iOther, Principal const *) final
Definition: ProductResolvers.cc:1263
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:326
edm::BranchDescription::unwrappedType
TypeWithDict const & unwrappedType() const
Definition: BranchDescription.h:94
edm::SingleChoiceNoProcessProductResolver::unscheduledWasNotRun_
bool unscheduledWasNotRun_() const override
Definition: ProductResolvers.cc:1201
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:1086
kAmbiguousOffset
static constexpr unsigned int kAmbiguousOffset
Definition: ProductResolvers.cc:29
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:1101
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:90
edm::UnscheduledProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:465
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: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:606
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:1197
cms::cuda::assert
assert(be >=bs)
TypeID.h
edm::Principal
Definition: Principal.h:57
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
UnscheduledConfigurator.h
edm::SwitchProducerProductResolver::status_
ProductStatus status_
Definition: ProductResolvers.h:343
edm::ParentProcessProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:816
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:1010
edm::DataManagingProductResolver::setMergeableRunProductMetadataInProductData
void setMergeableRunProductMetadataInProductData(MergeableRunProductMetadata const *)
Definition: ProductResolvers.cc:564
edm::DataManagingProductResolver::ProductStatus::ProductDeleted
edm::ParentProcessProductResolver::singleProduct_
bool singleProduct_() const override
Definition: ProductResolvers.cc:818
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:660
edm::SingleChoiceNoProcessProductResolver::resetBranchDescription_
void resetBranchDescription_(std::shared_ptr< BranchDescription const > bd) override
Definition: ProductResolvers.cc:1251
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:246
edm::DataManagingProductResolver::defaultStatus
ProductStatus defaultStatus() const
Definition: ProductResolvers.h:65
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:275
edm::NoProcessProductResolver::tryResolver
Resolution tryResolver(unsigned int index, Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
Definition: ProductResolvers.cc:868
edm::Principal::getProductResolverByIndex
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
Definition: Principal.cc:553
edm::AliasProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:586
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:52
edm::SwitchBaseProductResolver::putOrMergeProduct_
void putOrMergeProduct_(std::unique_ptr< WrapperBase > edp, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
Definition: ProductResolvers.cc:648
edm::NoProcessProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:1131
SharedResourcesAcquirer.h
edm::NoProcessProductResolver::skippingPrefetchRequested_
std::atomic< bool > skippingPrefetchRequested_
Definition: ProductResolvers.h:503
edm::ServiceToken
Definition: ServiceToken.h:40
edm::InProcess
Definition: BranchType.h:11
edm::InputProductResolver::isFromCurrentProcess
bool isFromCurrentProcess() const final
Definition: ProductResolvers.cc:313
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:28
edm::DataManagingProductResolver::setProduct
void setProduct(std::unique_ptr< WrapperBase > edp) const
Definition: ProductResolvers.cc:518
edm::NoProcessProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:1078
edm::ProductProvenance
Definition: ProductProvenance.h:24
edm::ParentProcessProductResolver::throwNullRealProduct
void throwNullRealProduct() const
Definition: ProductResolvers.cc:834
SerialTaskQueue.h
edm::NoProcessProductResolver::resolveProduct_
Resolution resolveProduct_(Principal const &principal, bool skipCurrentProcess, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
Definition: ProductResolvers.cc:877
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:1181
DQM.reader
reader
Definition: DQM.py:105
edm::NoProcessProductResolver::singleProduct_
bool singleProduct_() const override
Definition: ProductResolvers.cc:1099
EventPrincipal.h
edm::DataManagingProductResolver::mergeProduct
void mergeProduct(std::unique_ptr< WrapperBase > edp, MergeableRunProductMetadata const *) const
Definition: ProductResolvers.cc:80
edm::Worker::callWhenDoneAsync
void callWhenDoneAsync(WaitingTask *task)
Definition: Worker.h:167
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:1125
edm::SwitchBaseProductResolver::resolveProductImpl
Resolution resolveProductImpl(Resolution) const
Definition: ProductResolvers.cc:634
edm::SingleChoiceNoProcessProductResolver::putOrMergeProduct_
void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
Definition: ProductResolvers.cc:1237
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
edm::SingleChoiceNoProcessProductResolver::productUnavailable_
bool productUnavailable_() const override
Definition: ProductResolvers.cc:1207
edm::DataManagingProductResolver::productUnavailable_
bool productUnavailable_() const final
Definition: ProductResolvers.cc:530
edm::BranchDescription::originalBranchID
BranchID const & originalBranchID() const
Definition: BranchDescription.h:77
edm::Principal::branchType
BranchType const & branchType() const
Definition: Principal.h:181
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:170
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:640
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:34
edm::SingleChoiceNoProcessProductResolver::realResolverIndex_
ProductResolverIndex realResolverIndex_
Definition: ProductResolvers.h:546
edm::SingleChoiceNoProcessProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:1191
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:1170
createBeamHaloJobs.queue
queue
Definition: createBeamHaloJobs.py:343
edm::DataManagingProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) final
Definition: ProductResolvers.cc:558
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:1034
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:956
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:1195
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
edm::NoProcessProductResolver::branchDescription_
BranchDescription const & branchDescription_() const override
Definition: ProductResolvers.cc:1145
Resolution
Definition: trackSplitPlot.h:33
edm::NoProcessProductResolver::provenance_
Provenance const * provenance_() const override
Definition: ProductResolvers.cc:1157
edm::ParentProcessProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) override
Definition: ProductResolvers.cc:806
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::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:1113
edm::InLumi
Definition: BranchType.h:11
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:768
edm::ParentProcessProductResolver::putOrMergeProduct_
void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
Definition: ProductResolvers.cc:826
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:1163
thread_safety_macros.h
edm::UnscheduledProductResolver::setupUnscheduled
void setupUnscheduled(UnscheduledConfigurator const &) final
Definition: ProductResolvers.cc:381
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:624
edm::ProductResolverIndexInvalid
Definition: ProductResolverIndex.h:16
edm::SingleChoiceNoProcessProductResolver::branchDescription_
BranchDescription const & branchDescription_() const override
Definition: ProductResolvers.cc:1245
UnscheduledAuxiliary.h
edm::DataManagingProductResolver::setProductID_
void setProductID_(ProductID const &pid) final
Definition: ProductResolvers.cc:562
edm::DataManagingOrAliasProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override=0
edm::SwitchBaseProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:665
edm::Worker::doWork
bool doWork(typename T::TransitionInfoType const &, StreamID, ParentContext const &, typename T::Context const *)
Definition: Worker.h:1077
edm::SingleChoiceNoProcessProductResolver::productResolved_
bool productResolved_() const final
Definition: ProductResolvers.cc:1213
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:924
edm::UnscheduledConfigurator::findWorker
Worker * findWorker(std::string const &iLabel) const
Definition: UnscheduledConfigurator.h:45
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:242
edm::UnscheduledConfigurator
Definition: UnscheduledConfigurator.h:32
edm::Worker::description
ModuleDescription const & description() const
Definition: Worker.h:188
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:489
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:1020
edm::DataManagingProductResolver::putOrMergeProduct_
void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
Definition: ProductResolvers.cc:493
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:1193
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:162
edm::DataManagingProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:573
edm::DataManagingProductResolver::singleProduct_
bool singleProduct_() const final
Definition: ProductResolvers.cc:584
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:369
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:315
edm::AliasProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:596
edm::UnscheduledConfigurator::auxiliary
UnscheduledAuxiliary const * auxiliary() const
Definition: UnscheduledConfigurator.h:53
edm::DataManagingProductResolver::checkType
void checkType(WrapperBase const &prod) const
Definition: ProductResolvers.cc:506
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: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:630
edm::TypeID
Definition: TypeID.h:22
edm::NoProcessProductResolver::putOrMergeProduct_
void putOrMergeProduct_(std::unique_ptr< WrapperBase > prod, MergeableRunProductMetadata const *mergeableRunProductMetadata) const final
Definition: ProductResolvers.cc:1137
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:1219
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:681
edm::WrapperBase::isPresent
bool isPresent() const
Definition: WrapperBase.h:30
edm::SingleChoiceNoProcessProductResolver::productWasFetchedAndIsValid_
bool productWasFetchedAndIsValid_(bool iSkipCurrentProcess) const override
Definition: ProductResolvers.cc:1225
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:730
edm::InputProductResolver::resetProductData_
void resetProductData_(bool deleteEarly) override
Definition: ProductResolvers.cc:301
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:810
edm::SwitchBaseProductResolver::setProductProvenanceRetriever_
void setProductProvenanceRetriever_(ProductProvenanceRetriever const *provRetriever) final
Definition: ProductResolvers.cc:656
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:754
edm::InputProductResolver::setupUnscheduled
void setupUnscheduled(UnscheduledConfigurator const &) final
Definition: ProductResolvers.cc:309
edm::AliasProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:600
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::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:746
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:695
edm::DataManagingProductResolver::resetStatus
void resetStatus()
Definition: ProductResolvers.h:58
edm::SingleChoiceNoProcessProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const override
Definition: ProductResolvers.cc:1231
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:491
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
TransitionInfoTypes.h
edm::DataManagingProductResolver::productResolved_
bool productResolved_() const final
Definition: ProductResolvers.cc:538
edm::SwitchAliasProductResolver::putProduct_
void putProduct_(std::unique_ptr< WrapperBase > edp) const final
Definition: ProductResolvers.cc:800
edm::InputProductResolver::retrieveAndMerge_
void retrieveAndMerge_(Principal const &principal, MergeableRunProductMetadata const *mergeableRunProductMetadata) const override
Definition: ProductResolvers.cc:196
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:1082
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:425
edm::DataManagingProductResolver::productProvenancePtr_
ProductProvenance const * productProvenancePtr_() const final
Definition: ProductResolvers.cc:569
edm::SwitchBaseProductResolver::unsafe_setWrapperAndProvenance
void unsafe_setWrapperAndProvenance() const
Definition: ProductResolvers.cc:674
edm::AliasProductResolver::setProductID_
void setProductID_(ProductID const &pid) override
Definition: ProductResolvers.cc:590
edm::ProductResolverBase::Resolution
Definition: ProductResolverBase.h:36
edm::Provenance
Definition: Provenance.h:34
edm::InputProductResolver::m_waitingTasks
WaitingTaskList m_waitingTasks
Definition: ProductResolvers.h:136
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:544
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:685
edm::NoProcessProductResolver::productWasDeleted_
bool productWasDeleted_() const override
Definition: ProductResolvers.cc:1119
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:1107
edm::ParentProcessProductResolver::productProvenancePtr_
ProductProvenance const * productProvenancePtr_() const override
Definition: ProductResolvers.cc:812
edm::AliasProductResolver::productProvenancePtr_
ProductProvenance const * productProvenancePtr_() const override
Definition: ProductResolvers.cc:592
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
edm::SingleChoiceNoProcessProductResolver::provenance_
Provenance const * provenance_() const override
Definition: ProductResolvers.cc:1257
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:1199
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:318
edm::SwitchBaseProductResolver::SwitchBaseProductResolver
SwitchBaseProductResolver(std::shared_ptr< BranchDescription const > bd, DataManagingOrAliasProductResolver &realProduct)
Definition: ProductResolvers.cc:614