CMS 3D CMS Logo

SubProcess.cc
Go to the documentation of this file.
2 
40 
41 #include "boost/range/adaptor/reversed.hpp"
42 
43 #include <cassert>
44 #include <string>
45 
46 namespace edm {
47 
49  ParameterSet const& topLevelParameterSet,
50  std::shared_ptr<ProductRegistry const> parentProductRegistry,
51  std::shared_ptr<BranchIDListHelper const> parentBranchIDListHelper,
52  ThinnedAssociationsHelper const& parentThinnedAssociationsHelper,
53  SubProcessParentageHelper const& parentSubProcessParentageHelper,
55  ActivityRegistry& parentActReg,
56  ServiceToken const& token,
58  PreallocationConfiguration const& preallocConfig,
59  ProcessContext const* parentProcessContext)
60  : EDConsumerBase(),
61  serviceToken_(),
62  parentPreg_(parentProductRegistry),
63  preg_(),
64  branchIDListHelper_(),
65  act_table_(),
66  processConfiguration_(),
67  historyLumiOffset_(preallocConfig.numberOfStreams()),
68  historyRunOffset_(historyLumiOffset_ + preallocConfig.numberOfLuminosityBlocks()),
69  processHistoryRegistries_(historyRunOffset_ + preallocConfig.numberOfRuns()),
70  historyAppenders_(historyRunOffset_ + preallocConfig.numberOfRuns()),
71  principalCache_(),
72  esp_(),
73  schedule_(),
74  parentToChildPhID_(),
75  subProcesses_(),
76  processParameterSet_(),
77  productSelectorRules_(parameterSet, "outputCommands", "OutputModule"),
78  productSelector_(),
79  wantAllEvents_(true) {
80  //Setup the event selection
82 
83  ParameterSet selectevents = parameterSet.getUntrackedParameterSet("SelectEvents", ParameterSet());
84 
85  selectevents.registerIt(); // Just in case this PSet is not registered
87  selectevents, tns->getProcessName(), getAllTriggerNames(), selectors_, consumesCollector());
88  std::map<std::string, std::vector<std::pair<std::string, int>>> outputModulePathPositions;
90  selectevents, "", outputModulePathPositions, parentProductRegistry->anyProductProduced());
91 
92  std::map<BranchID, bool> keepAssociation;
93  selectProducts(*parentProductRegistry, parentThinnedAssociationsHelper, keepAssociation);
94 
95  std::string const maxEvents("maxEvents");
96  std::string const maxLumis("maxLuminosityBlocks");
97 
98  // propagate_const<T> has no reset() function
100  std::unique_ptr<ParameterSet>(parameterSet.popParameterSet(std::string("process")).release());
101 
102  // if this process has a maxEvents or maxLuminosityBlocks parameter set, remove them.
103  if (processParameterSet_->exists(maxEvents)) {
104  processParameterSet_->popParameterSet(maxEvents);
105  }
106  if (processParameterSet_->exists(maxLumis)) {
107  processParameterSet_->popParameterSet(maxLumis);
108  }
109 
110  // if the top level process has a maxEvents or maxLuminosityBlocks parameter set, add them to this process.
111  if (topLevelParameterSet.exists(maxEvents)) {
112  processParameterSet_->addUntrackedParameter<ParameterSet>(
113  maxEvents, topLevelParameterSet.getUntrackedParameterSet(maxEvents));
114  }
115  if (topLevelParameterSet.exists(maxLumis)) {
116  processParameterSet_->addUntrackedParameter<ParameterSet>(
117  maxLumis, topLevelParameterSet.getUntrackedParameterSet(maxLumis));
118  }
119 
120  // If there are subprocesses, pop the subprocess parameter sets out of the process parameter set
121  auto subProcessVParameterSet = popSubProcessVParameterSet(*processParameterSet_);
122  bool hasSubProcesses = subProcessVParameterSet.size() != 0ull;
123 
124  // Validates the parameters in the 'options', 'maxEvents', and 'maxLuminosityBlocks'
125  // top level parameter sets. Default values are also set in here if the
126  // parameters were not explicitly set.
128 
129  ScheduleItems items(*parentProductRegistry, *this);
130  actReg_ = items.actReg_;
131 
132  //initialize the services
133  ServiceToken iToken;
134 
135  // get any configured services.
136  auto serviceSets = processParameterSet_->popVParameterSet(std::string("services"));
137 
138  ServiceToken newToken = items.initServices(serviceSets, *processParameterSet_, token, iLegacy, false);
139  parentActReg.connectToSubProcess(*items.actReg_);
140  serviceToken_ = items.addCPRandTNS(*processParameterSet_, newToken);
141 
142  //make the services available
144 
145  // intialize miscellaneous items
146  items.initMisc(*processParameterSet_);
147 
148  // intialize the event setup provider
149  esp_ = esController.makeProvider(*processParameterSet_, actReg_.get());
150 
151  branchIDListHelper_ = items.branchIDListHelper();
152  updateBranchIDListHelper(parentBranchIDListHelper->branchIDLists());
153 
154  thinnedAssociationsHelper_ = items.thinnedAssociationsHelper();
155  thinnedAssociationsHelper_->updateFromParentProcess(
156  parentThinnedAssociationsHelper, keepAssociation, droppedBranchIDToKeptBranchID_);
157 
158  // intialize the Schedule
159  schedule_ = items.initSchedule(*processParameterSet_, hasSubProcesses, preallocConfig, &processContext_);
160 
161  // set the items
162  act_table_ = std::move(items.act_table_);
163  preg_ = items.preg();
164 
165  subProcessParentageHelper_ = items.subProcessParentageHelper();
166  subProcessParentageHelper_->update(parentSubProcessParentageHelper, *parentProductRegistry);
167 
168  //CMS-THREADING this only works since Run/Lumis are synchronous so when principalCache asks for
169  // the reducedProcessHistoryID from a full ProcessHistoryID that registry will not be in use by
170  // another thread. We really need to change how this is done in the PrincipalCache.
172 
173  processConfiguration_ = items.processConfiguration();
175  processContext_.setParentProcessContext(parentProcessContext);
176 
178  for (unsigned int index = 0; index < preallocConfig.numberOfStreams(); ++index) {
179  auto ep = std::make_shared<EventPrincipal>(preg_,
184  index,
185  false /*not primary process*/);
187  }
188  for (unsigned int index = 0; index < preallocConfig.numberOfLuminosityBlocks(); ++index) {
189  auto lbpp = std::make_unique<LuminosityBlockPrincipal>(
192  }
193 
194  {
195  auto pb = std::make_unique<ProcessBlockPrincipal>(preg_, *processConfiguration_, false);
197 
198  auto pbForInput = std::make_unique<ProcessBlockPrincipal>(preg_, *processConfiguration_, false);
200  }
201 
202  inUseLumiPrincipals_.resize(preallocConfig.numberOfLuminosityBlocks());
203 
204  subProcesses_.reserve(subProcessVParameterSet.size());
205  for (auto& subProcessPSet : subProcessVParameterSet) {
206  subProcesses_.emplace_back(subProcessPSet,
207  topLevelParameterSet,
208  preg_,
212  esController,
213  *items.actReg_,
214  newToken,
215  iLegacy,
216  preallocConfig,
217  &processContext_);
218  }
219  }
220 
222 
223  std::vector<ModuleProcessName> SubProcess::keepOnlyConsumedUnscheduledModules(bool deleteModules) {
224  schedule_->convertCurrentProcessAlias(processConfiguration_->processName());
226 
227  // Note: all these may throw
229 
230  // Consumes information from the child SubProcesses
231  std::vector<ModuleProcessName> consumedByChildren;
232  for_all(subProcesses_, [&consumedByChildren, deleteModules](auto& subProcess) {
233  auto c = subProcess.keepOnlyConsumedUnscheduledModules(deleteModules);
234  if (consumedByChildren.empty()) {
235  std::swap(consumedByChildren, c);
236  } else if (not c.empty()) {
237  std::vector<ModuleProcessName> tmp;
238  tmp.reserve(consumedByChildren.size() + c.size());
239  std::merge(consumedByChildren.begin(), consumedByChildren.end(), c.begin(), c.end(), std::back_inserter(tmp));
240  std::swap(consumedByChildren, tmp);
241  }
242  });
243 
244  // Non-consumed unscheduled modules in this SubProcess, take into account of the consumes from child SubProcesses
245  if (deleteModules) {
246  if (auto const unusedModules = nonConsumedUnscheduledModules(pathsAndConsumesOfModules_, consumedByChildren);
247  not unusedModules.empty()) {
249 
250  edm::LogInfo("DeleteModules").log([&unusedModules, this](auto& l) {
251  l << "Following modules are not in any Path or EndPath, nor is their output consumed by any other module, "
252  "and "
253  "therefore they are deleted from SubProcess "
254  << processConfiguration_->processName() << " before beginJob transition.";
255  for (auto const& description : unusedModules) {
256  l << "\n " << description->moduleLabel();
257  }
258  });
259  for (auto const& description : unusedModules) {
260  schedule_->deleteModule(description->moduleLabel(), actReg_.get());
261  }
262  }
263  }
264 
265  // Products possibly consumed from the parent (Sub)Process
266  for (auto const& description : pathsAndConsumesOfModules_.allModules()) {
267  for (auto const& dep :
269  auto it = std::lower_bound(consumedByChildren.begin(),
270  consumedByChildren.end(),
271  ModuleProcessName{dep.moduleLabel(), dep.processName()});
272  consumedByChildren.emplace(it, dep.moduleLabel(), dep.processName());
273  }
274  }
275  return consumedByChildren;
276  }
277 
278  void SubProcess::doBeginJob() { this->beginJob(); }
279 
281 
283  // If event selection is being used, the SubProcess class reads TriggerResults
284  // object(s) in the parent process from the event. This next call is needed for
285  // getByToken to work properly. Normally, this is done by the worker, but since
286  // a SubProcess is not a module, it has no worker.
287  updateLookup(InEvent, *parentPreg_->productLookup(InEvent), false);
288 
289  if (!droppedBranchIDToKeptBranchID().empty()) {
291  }
293  actReg_->preBeginJobSignal_(pathsAndConsumesOfModules_, processContext_);
294  schedule_->beginJob(*preg_, esp_->recordsToProxyIndices());
295  for_all(subProcesses_, [](auto& subProcess) { subProcess.doBeginJob(); });
296  }
297 
301  "Multiple exceptions were thrown while executing endJob. An exception message follows for each.");
302  schedule_->endJob(c);
303  for (auto& subProcess : subProcesses_) {
304  c.call([&subProcess]() { subProcess.doEndJob(); });
305  }
306  if (c.hasThrown()) {
307  c.rethrow();
308  }
309  }
310 
312  ThinnedAssociationsHelper const& parentThinnedAssociationsHelper,
313  std::map<BranchID, bool>& keepAssociation) {
315  return;
317 
318  // TODO: See if we can collapse keptProducts_ and productSelector_ into a
319  // single object. See the notes in the header for ProductSelector
320  // for more information.
321 
322  std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
323  std::vector<BranchDescription const*> associationDescriptions;
324  std::set<BranchID> keptProductsInEvent;
325 
326  for (auto const& it : preg.productList()) {
327  BranchDescription const& desc = it.second;
328  if (desc.transient()) {
329  // if the class of the branch is marked transient, output nothing
330  } else if (!desc.present() && !desc.produced()) {
331  // else if the branch containing the product has been previously dropped,
332  // output nothing
333  } else if (desc.unwrappedType() == typeid(ThinnedAssociation)) {
334  associationDescriptions.push_back(&desc);
335  } else if (productSelector_.selected(desc)) {
336  keepThisBranch(desc, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
337  }
338  }
339 
340  parentThinnedAssociationsHelper.selectAssociationProducts(
341  associationDescriptions, keptProductsInEvent, keepAssociation);
342 
343  for (auto association : associationDescriptions) {
344  if (keepAssociation[association->branchID()]) {
345  keepThisBranch(*association, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
346  }
347  }
348 
349  // Now fill in a mapping needed in the case that a branch was dropped while its EDAlias was kept.
350  ProductSelector::fillDroppedToKept(preg, trueBranchIDToKeptBranchDesc, droppedBranchIDToKeptBranchID_);
351  }
352 
354  std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
355  std::set<BranchID>& keptProductsInEvent) {
356  ProductSelector::checkForDuplicateKeptBranch(desc, trueBranchIDToKeptBranchDesc);
357 
358  if (desc.branchType() == InEvent) {
359  if (desc.produced()) {
360  keptProductsInEvent.insert(desc.originalBranchID());
361  } else {
362  keptProductsInEvent.insert(desc.branchID());
363  }
364  }
365  EDGetToken token = consumes(TypeToGet{desc.unwrappedTypeID(), PRODUCT_TYPE},
366  InputTag{desc.moduleLabel(), desc.productInstanceName(), desc.processName()});
367 
368  // Now put it in the list of selected branches.
369  keptProducts_[desc.branchType()].push_back(std::make_pair(&desc, token));
370  }
371 
373  std::map<BranchID::value_type, BranchID::value_type> const& droppedBranchIDToKeptBranchID) {
374  // Check for branches dropped while an EDAlias was kept.
375  // Replace BranchID of each dropped branch with that of the kept alias.
376  for (BranchIDList& branchIDList : branchIDListHelper_->mutableBranchIDLists()) {
377  for (BranchID::value_type& branchID : branchIDList) {
378  std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter =
379  droppedBranchIDToKeptBranchID.find(branchID);
380  if (iter != droppedBranchIDToKeptBranchID.end()) {
381  branchID = iter->second;
382  }
383  }
384  }
385  for_all(subProcesses_, [&droppedBranchIDToKeptBranchID](auto& subProcess) {
386  subProcess.fixBranchIDListsForEDAliases(droppedBranchIDToKeptBranchID);
387  });
388  }
389 
391  EventPrincipal const& ep,
392  std::vector<std::shared_ptr<const EventSetupImpl>> const* iEventSetupImpls) {
394  /* BEGIN relevant bits from OutputModule::doEvent */
395  if (!wantAllEvents_) {
396  EventForOutput e(ep, ModuleDescription(), nullptr);
397  e.setConsumer(this);
398  if (!selectors_.wantEvent(e)) {
399  return;
400  }
401  }
402  processAsync(std::move(iHolder), ep, iEventSetupImpls);
403  /* END relevant bits from OutputModule::doEvent */
404  }
405 
407  EventPrincipal const& principal,
408  std::vector<std::shared_ptr<const EventSetupImpl>> const* iEventSetupImpls) {
409  EventAuxiliary aux(principal.aux());
410  aux.setProcessHistoryID(principal.processHistoryID());
411 
412  EventSelectionIDVector esids{principal.eventSelectionIDs()};
413  if (principal.productRegistry().anyProductProduced() || !wantAllEvents_) {
414  esids.push_back(selector_config_id_);
415  }
416 
418  auto& processHistoryRegistry = processHistoryRegistries_[principal.streamID().value()];
419  processHistoryRegistry.registerProcessHistory(principal.processHistory());
420  BranchListIndexes bli(principal.branchListIndexes());
421  branchIDListHelper_->fixBranchListIndexes(bli);
422  bool deepCopyRetriever = false;
423  ep.fillEventPrincipal(
424  aux,
425  &principal.processHistory(),
426  std::move(esids),
427  std::move(bli),
428  *(principal.productProvenanceRetrieverPtr()), //NOTE: this transfers the per product provenance
429  principal.reader(),
430  deepCopyRetriever);
431  ep.setLuminosityBlockPrincipal(inUseLumiPrincipals_[principal.luminosityBlockPrincipal().index()].get());
432  propagateProducts(InEvent, principal, ep);
433 
434  WaitingTaskHolder finalizeEventTask(*iHolder.group(),
435  make_waiting_task([&ep, iHolder](std::exception_ptr const* iPtr) mutable {
436  ep.clearEventPrincipal();
437  if (iPtr) {
438  iHolder.doneWaiting(*iPtr);
439  } else {
440  iHolder.doneWaiting(std::exception_ptr());
441  }
442  }));
443  WaitingTaskHolder afterProcessTask;
444  if (subProcesses_.empty()) {
445  afterProcessTask = std::move(finalizeEventTask);
446  } else {
447  afterProcessTask = WaitingTaskHolder(
448  *iHolder.group(),
449  make_waiting_task([this, &ep, finalizeEventTask, iEventSetupImpls](std::exception_ptr const* iPtr) mutable {
450  if (not iPtr) {
451  for (auto& subProcess : boost::adaptors::reverse(subProcesses_)) {
452  subProcess.doEventAsync(finalizeEventTask, ep, iEventSetupImpls);
453  }
454  } else {
455  finalizeEventTask.doneWaiting(*iPtr);
456  }
457  }));
458  }
459  EventTransitionInfo info(ep, *((*iEventSetupImpls)[esp_->subProcessIndex()]));
460  schedule_->processOneEventAsync(std::move(afterProcessTask), ep.streamID().value(), info, serviceToken_);
461  }
462 
463  template <>
464  void SubProcess::doBeginProcessBlockAsync<OccurrenceTraits<ProcessBlockPrincipal, BranchActionProcessBlockInput>>(
465  WaitingTaskHolder iHolder, ProcessBlockTransitionInfo const& iTransitionInfo) {
466  ServiceRegistry::Operate operate(serviceToken_);
467 
468  ProcessBlockPrincipal& processBlockPrincipal = principalCache_.inputProcessBlockPrincipal();
469  ProcessBlockPrincipal const& parentPrincipal = iTransitionInfo.principal();
470  processBlockPrincipal.fillProcessBlockPrincipal(parentPrincipal.processName(), parentPrincipal.reader());
471  propagateProducts(InProcess, parentPrincipal, processBlockPrincipal);
472 
473  ProcessBlockTransitionInfo transitionInfo(processBlockPrincipal);
475  beginGlobalTransitionAsync<Traits>(std::move(iHolder), *schedule_, transitionInfo, serviceToken_, subProcesses_);
476  }
477 
478  template <>
479  void SubProcess::doBeginProcessBlockAsync<OccurrenceTraits<ProcessBlockPrincipal, BranchActionGlobalBegin>>(
480  WaitingTaskHolder iHolder, ProcessBlockTransitionInfo const& iTransitionInfo) {
481  ServiceRegistry::Operate operate(serviceToken_);
482 
483  ProcessBlockPrincipal& processBlockPrincipal = principalCache_.processBlockPrincipal();
484  ProcessBlockPrincipal const& parentPrincipal = iTransitionInfo.principal();
485  processBlockPrincipal.fillProcessBlockPrincipal(processConfiguration_->processName());
486  propagateProducts(InProcess, parentPrincipal, processBlockPrincipal);
487 
488  ProcessBlockTransitionInfo transitionInfo(processBlockPrincipal);
490  beginGlobalTransitionAsync<Traits>(std::move(iHolder), *schedule_, transitionInfo, serviceToken_, subProcesses_);
491  }
492 
494  ProcessBlockTransitionInfo const& iTransitionInfo,
495  bool cleaningUpAfterException) {
497  ProcessBlockPrincipal const& parentPrincipal = iTransitionInfo.principal();
498  propagateProducts(InProcess, parentPrincipal, processBlockPrincipal);
499 
500  ProcessBlockTransitionInfo transitionInfo(processBlockPrincipal);
502  endGlobalTransitionAsync<Traits>(
503  std::move(iHolder), *schedule_, transitionInfo, serviceToken_, subProcesses_, cleaningUpAfterException);
504  }
505 
506  void SubProcess::doBeginRunAsync(WaitingTaskHolder iHolder, RunTransitionInfo const& iTransitionInfo) {
508 
509  RunPrincipal const& parentPrincipal = iTransitionInfo.principal();
510  auto aux = std::make_shared<RunAuxiliary>(parentPrincipal.aux());
511  aux->setProcessHistoryID(parentPrincipal.processHistoryID());
512  auto rpp = std::make_shared<RunPrincipal>(aux,
513  preg_,
515  &(historyAppenders_[historyRunOffset_ + parentPrincipal.index()]),
516  parentPrincipal.index(),
517  false);
518  auto& processHistoryRegistry = processHistoryRegistries_[historyRunOffset_ + parentPrincipal.index()];
519  processHistoryRegistry.registerProcessHistory(parentPrincipal.processHistory());
520  rpp->fillRunPrincipal(processHistoryRegistry, parentPrincipal.reader());
521  principalCache_.insert(rpp);
522 
523  ProcessHistoryID const& parentInputReducedPHID = parentPrincipal.reducedProcessHistoryID();
524  ProcessHistoryID const& inputReducedPHID = rpp->reducedProcessHistoryID();
525 
526  parentToChildPhID_.insert(std::make_pair(parentInputReducedPHID, inputReducedPHID));
527 
529  propagateProducts(InRun, parentPrincipal, rp);
530 
531  RunTransitionInfo transitionInfo(rp, esp_->eventSetupImpl());
533  beginGlobalTransitionAsync<Traits>(std::move(iHolder), *schedule_, transitionInfo, serviceToken_, subProcesses_);
534  }
535 
537  RunTransitionInfo const& iTransitionInfo,
538  bool cleaningUpAfterException) {
539  RunPrincipal const& parentPrincipal = iTransitionInfo.principal();
541  propagateProducts(InRun, parentPrincipal, rp);
542 
543  RunTransitionInfo transitionInfo(rp, esp_->eventSetupImpl());
545  endGlobalTransitionAsync<Traits>(
546  std::move(iHolder), *schedule_, transitionInfo, serviceToken_, subProcesses_, cleaningUpAfterException);
547  }
548 
551 
552  auto subTasks = edm::make_waiting_task([this, task, processBlockType](std::exception_ptr const* iExcept) mutable {
553  if (iExcept) {
554  task.doneWaiting(*iExcept);
555  } else {
557  for (auto& s : subProcesses_) {
558  s.writeProcessBlockAsync(task, processBlockType);
559  }
560  }
561  });
562  schedule_->writeProcessBlockAsync(WaitingTaskHolder(*task.group(), subTasks),
563  principalCache_.processBlockPrincipal(processBlockType),
565  actReg_.get());
566  }
567 
569  ProcessHistoryID const& parentPhID,
570  int runNumber,
571  MergeableRunProductMetadata const* mergeableRunProductMetadata) {
573  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
574  assert(it != parentToChildPhID_.end());
575  auto const& childPhID = it->second;
576 
577  auto subTasks = edm::make_waiting_task(
578  [this, childPhID, runNumber, task, mergeableRunProductMetadata](std::exception_ptr const* iExcept) mutable {
579  if (iExcept) {
580  task.doneWaiting(*iExcept);
581  } else {
582  ServiceRegistry::Operate operateWriteRun(serviceToken_);
583  for (auto& s : subProcesses_) {
584  s.writeRunAsync(task, childPhID, runNumber, mergeableRunProductMetadata);
585  }
586  }
587  });
588  schedule_->writeRunAsync(WaitingTaskHolder(*task.group(), subTasks),
591  actReg_.get(),
592  mergeableRunProductMetadata);
593  }
594 
596  std::map<ProcessHistoryID, ProcessHistoryID>::const_iterator it = parentToChildPhID_.find(parentPhID);
597  assert(it != parentToChildPhID_.end());
598  auto const& childPhID = it->second;
599  principalCache_.deleteRun(childPhID, runNumber);
601  [&childPhID, runNumber](auto& subProcess) { subProcess.deleteRunFromCache(childPhID, runNumber); });
602  }
603 
605  ProcessBlockPrincipal& processBlockPrincipal = principalCache_.processBlockPrincipal(processBlockType);
606  processBlockPrincipal.clearPrincipal();
607  for (auto& s : subProcesses_) {
608  s.clearProcessBlockPrincipal(processBlockType);
609  }
610  }
611 
614 
615  LuminosityBlockPrincipal const& parentPrincipal = iTransitionInfo.principal();
616  auto aux = parentPrincipal.aux();
617  aux.setProcessHistoryID(parentPrincipal.processHistoryID());
619  lbpp->setAux(aux);
620  auto& processHistoryRegistry = processHistoryRegistries_[historyLumiOffset_ + lbpp->index()];
621  inUseLumiPrincipals_[parentPrincipal.index()] = lbpp;
622  processHistoryRegistry.registerProcessHistory(parentPrincipal.processHistory());
623  lbpp->fillLuminosityBlockPrincipal(&parentPrincipal.processHistory(), parentPrincipal.reader());
624  lbpp->setRunPrincipal(principalCache_.runPrincipalPtr());
625  LuminosityBlockPrincipal& lbp = *lbpp;
626  propagateProducts(InLumi, parentPrincipal, lbp);
627 
628  std::vector<std::shared_ptr<const EventSetupImpl>> const* eventSetupImpls = iTransitionInfo.eventSetupImpls();
629  LumiTransitionInfo transitionInfo(lbp, *((*eventSetupImpls)[esp_->subProcessIndex()]), eventSetupImpls);
631  beginGlobalTransitionAsync<Traits>(std::move(iHolder), *schedule_, transitionInfo, serviceToken_, subProcesses_);
632  }
633 
635  LumiTransitionInfo const& iTransitionInfo,
636  bool cleaningUpAfterException) {
637  LuminosityBlockPrincipal const& parentPrincipal = iTransitionInfo.principal();
638  LuminosityBlockPrincipal& lbp = *inUseLumiPrincipals_[parentPrincipal.index()];
639  propagateProducts(InLumi, parentPrincipal, lbp);
640 
641  std::vector<std::shared_ptr<const EventSetupImpl>> const* eventSetupImpls = iTransitionInfo.eventSetupImpls();
642  LumiTransitionInfo transitionInfo(lbp, *((*eventSetupImpls)[esp_->subProcessIndex()]), eventSetupImpls);
644  endGlobalTransitionAsync<Traits>(
645  std::move(iHolder), *schedule_, transitionInfo, serviceToken_, subProcesses_, cleaningUpAfterException);
646  }
647 
650 
651  auto l = inUseLumiPrincipals_[principal.index()];
652  auto subTasks = edm::make_waiting_task([this, l, task](std::exception_ptr const* iExcept) mutable {
653  if (iExcept) {
654  task.doneWaiting(*iExcept);
655  } else {
656  ServiceRegistry::Operate operateWriteLumi(serviceToken_);
657  for (auto& s : subProcesses_) {
658  s.writeLumiAsync(task, *l);
659  }
660  }
661  });
662  schedule_->writeLumiAsync(WaitingTaskHolder(*task.group(), subTasks), *l, &processContext_, actReg_.get());
663  }
664 
666  //release from list but stay around till end of routine
667  auto lb = std::move(inUseLumiPrincipals_[principal.index()]);
668  for (auto& s : subProcesses_) {
669  s.deleteLumiFromCache(*lb);
670  }
671  lb->clearPrincipal();
672  }
673 
674  void SubProcess::doBeginStream(unsigned int iID) {
676  schedule_->beginStream(iID);
677  for_all(subProcesses_, [iID](auto& subProcess) { subProcess.doBeginStream(iID); });
678  }
679 
680  void SubProcess::doEndStream(unsigned int iID) {
682  schedule_->endStream(iID);
683  for_all(subProcesses_, [iID](auto& subProcess) { subProcess.doEndStream(iID); });
684  }
685 
688 
690 
691  RunTransitionInfo transitionInfo(rp, esp_->eventSetupImpl());
692  beginStreamTransitionAsync<Traits>(
693  std::move(iHolder), *schedule_, id, transitionInfo, serviceToken_, subProcesses_);
694  }
695 
697  unsigned int id,
698  RunTransitionInfo const&,
699  bool cleaningUpAfterException) {
702 
703  RunTransitionInfo transitionInfo(rp, esp_->eventSetupImpl());
704  endStreamTransitionAsync<Traits>(
705  std::move(iHolder), *schedule_, id, transitionInfo, serviceToken_, subProcesses_, cleaningUpAfterException);
706  }
707 
709  unsigned int id,
710  LumiTransitionInfo const& iTransitionInfo) {
712 
713  LuminosityBlockPrincipal& lbp = *inUseLumiPrincipals_[iTransitionInfo.principal().index()];
714  std::vector<std::shared_ptr<const EventSetupImpl>> const* eventSetupImpls = iTransitionInfo.eventSetupImpls();
715  LumiTransitionInfo transitionInfo(lbp, *((*eventSetupImpls)[esp_->subProcessIndex()]), eventSetupImpls);
716  beginStreamTransitionAsync<Traits>(
717  std::move(iHolder), *schedule_, id, transitionInfo, serviceToken_, subProcesses_);
718  }
719 
721  unsigned int id,
722  LumiTransitionInfo const& iTransitionInfo,
723  bool cleaningUpAfterException) {
724  LuminosityBlockPrincipal& lbp = *inUseLumiPrincipals_[iTransitionInfo.principal().index()];
726  std::vector<std::shared_ptr<const EventSetupImpl>> const* eventSetupImpls = iTransitionInfo.eventSetupImpls();
727  LumiTransitionInfo transitionInfo(lbp, *((*eventSetupImpls)[esp_->subProcessIndex()]), eventSetupImpls);
728  endStreamTransitionAsync<Traits>(
729  std::move(iHolder), *schedule_, id, transitionInfo, serviceToken_, subProcesses_, cleaningUpAfterException);
730  }
731 
732  void SubProcess::propagateProducts(BranchType type, Principal const& parentPrincipal, Principal& principal) const {
733  SelectedProducts const& keptVector = keptProducts()[type];
734  for (auto const& item : keptVector) {
735  BranchDescription const& desc = *item.first;
736  ProductResolverBase const* parentProductResolver = parentPrincipal.getProductResolver(desc.branchID());
737  if (parentProductResolver != nullptr) {
738  ProductResolverBase* productResolver = principal.getModifiableProductResolver(desc.branchID());
739  if (productResolver != nullptr) {
740  //Propagate the per event(run)(lumi)(processBlock) data for this product to the subprocess.
741  productResolver->connectTo(*parentProductResolver, &parentPrincipal);
742  }
743  }
744  }
745  }
746 
748  branchIDListHelper_->updateFromParent(branchIDLists);
750  [this](auto& subProcess) { subProcess.updateBranchIDListHelper(branchIDListHelper_->branchIDLists()); });
751  }
752 
753  // Call respondToOpenInputFile() on all Modules
756  schedule_->respondToOpenInputFile(fb);
757  for_all(subProcesses_, [&fb](auto& subProcess) { subProcess.respondToOpenInputFile(fb); });
758  }
759 
760  // free function
762  std::vector<std::string> subProcesses =
763  parameterSet.getUntrackedParameter<std::vector<std::string>>("@all_subprocesses");
764  if (!subProcesses.empty()) {
765  return parameterSet.popVParameterSet("subProcesses");
766  }
767  return {};
768  }
769 } // namespace edm
edm::SubProcess::beginJob
void beginJob()
Definition: SubProcess.cc:282
edm::ParameterSet::registerIt
ParameterSet const & registerIt()
Definition: ParameterSet.cc:113
edm::EventTransitionInfo
Definition: TransitionInfoTypes.h:26
edm::SubProcess::respondToOpenInputFile
void respondToOpenInputFile(FileBlock const &fb)
Definition: SubProcess.cc:754
ThinnedAssociationsHelper.h
IllegalParameters.h
edm::ProcessBlockTransitionInfo::principal
ProcessBlockPrincipal & principal()
Definition: TransitionInfoTypes.h:86
edm::SubProcess::processConfiguration_
std::shared_ptr< ProcessConfiguration const > processConfiguration_
Definition: SubProcess.h:286
ProcessHistoryID.h
edm::EventPrincipal::aux
EventAuxiliary const & aux() const
Definition: EventPrincipal.h:104
ProductResolverBase.h
edm::OccurrenceTraits< LuminosityBlockPrincipal, BranchActionGlobalEnd >
Definition: OccurrenceTraits.h:356
edm::eventsetup::EventSetupsController::makeProvider
std::shared_ptr< EventSetupProvider > makeProvider(ParameterSet &, ActivityRegistry *, ParameterSet const *eventSetupPset=nullptr)
Definition: EventSetupsController.cc:42
edm::SubProcess::historyRunOffset_
unsigned int historyRunOffset_
Definition: SubProcess.h:292
edm::SubProcess::historyLumiOffset_
unsigned int historyLumiOffset_
Definition: SubProcess.h:291
edm::SubProcess::selector_config_id_
ParameterSetID selector_config_id_
Definition: SubProcess.h:314
edm::SubProcessParentageHelper
Definition: SubProcessParentageHelper.h:21
edm::EventPrincipal::luminosityBlockPrincipal
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
Definition: EventPrincipal.h:81
edm::popSubProcessVParameterSet
std::vector< ParameterSet > popSubProcessVParameterSet(ParameterSet &parameterSet)
Definition: SubProcess.cc:761
edm::getAllTriggerNames
std::vector< std::string > const & getAllTriggerNames()
Definition: getAllTriggerNames.cc:22
edm::OccurrenceTraits< ProcessBlockPrincipal, BranchActionGlobalBegin >
Definition: OccurrenceTraits.h:397
edm::ProcessBlockTransitionInfo
Definition: TransitionInfoTypes.h:80
edm::SubProcess::processHistoryRegistries_
std::vector< ProcessHistoryRegistry > processHistoryRegistries_
Definition: SubProcess.h:293
edm::PRODUCT_TYPE
Definition: ProductKindOfType.h:5
edm::SubProcess::clearProcessBlockPrincipal
void clearProcessBlockPrincipal(ProcessBlockType)
Definition: SubProcess.cc:604
edm::PathsAndConsumesOfModules::modulesInPreviousProcessesWhoseProductsAreConsumedBy
std::vector< ModuleProcessName > const & modulesInPreviousProcessesWhoseProductsAreConsumedBy(unsigned int moduleID) const
Definition: PathsAndConsumesOfModules.cc:90
edm::SubProcess::branchIDListHelper
std::shared_ptr< BranchIDListHelper const > branchIDListHelper() const
Definition: SubProcess.h:267
edm::ParameterSet::getUntrackedParameterSet
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
Definition: ParameterSet.cc:2136
edm::LumiTransitionInfo
Definition: TransitionInfoTypes.h:42
edm::SubProcess::keptProducts
SelectedProductsForBranchType const & keptProducts() const
Definition: SubProcess.h:77
edm::validateTopLevelParameterSets
void validateTopLevelParameterSets(ParameterSet *processParameterSet)
Definition: validateTopLevelParameterSets.cc:93
BranchIDListHelper.h
TriggerNamesService.h
WaitingTaskHolder.h
edm::OccurrenceTraits< RunPrincipal, BranchActionGlobalBegin >
Definition: OccurrenceTraits.h:71
edm::SubProcess::pathsAndConsumesOfModules_
PathsAndConsumesOfModules pathsAndConsumesOfModules_
Definition: SubProcess.h:288
edm::SubProcess::doStreamEndRunAsync
void doStreamEndRunAsync(WaitingTaskHolder iHolder, unsigned int iID, RunTransitionInfo const &, bool cleaningUpAfterException)
Definition: SubProcess.cc:696
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ProcessContext
Definition: ProcessContext.h:27
edmLumisInFiles.description
description
Definition: edmLumisInFiles.py:11
edm::PrincipalCache::setProcessHistoryRegistry
void setProcessHistoryRegistry(ProcessHistoryRegistry const &phr)
Definition: PrincipalCache.h:87
edm::ProductSelector::initialize
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
Definition: ProductSelector.cc:20
edm::SubProcess::updateBranchIDListHelper
void updateBranchIDListHelper(BranchIDLists const &)
Definition: SubProcess.cc:747
edm::LuminosityBlockPrincipal
Definition: LuminosityBlockPrincipal.h:31
edm::BranchListIndexes
std::vector< BranchListIndex > BranchListIndexes
Definition: BranchListIndex.h:18
edm::ThinnedAssociation
Definition: ThinnedAssociation.h:15
edm::SubProcess::thinnedAssociationsHelper_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: SubProcess.h:283
edm::ScheduleItems
Definition: ScheduleItems.h:28
edm::SubProcess::subProcesses_
std::vector< SubProcess > subProcesses_
Definition: SubProcess.h:301
cms::cuda::assert
assert(be >=bs)
edm::SubProcess::doEndStream
void doEndStream(unsigned int)
Definition: SubProcess.cc:680
edm::OccurrenceTraits< LuminosityBlockPrincipal, BranchActionStreamBegin >
Definition: OccurrenceTraits.h:274
edm::Principal
Definition: Principal.h:56
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:47
edm::ModuleProcessName::moduleLabel
std::string_view moduleLabel() const
Definition: ModuleProcessName.h:17
edm::ProductSelector::selected
bool selected(BranchDescription const &desc) const
Definition: ProductSelector.cc:55
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
ProcessBlockPrincipal.h
SignallingProductRegistry.h
ProcessHistoryRegistry.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::StreamID::value
unsigned int value() const
Definition: StreamID.h:43
edm::ProcessBlockPrincipal::processName
std::string const & processName() const
Definition: ProcessBlockPrincipal.h:30
PreallocationConfiguration.h
ESRecordsToProxyIndices.h
ProductRegistry.h
EventSetupsController.h
EventForOutput.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Principal::processHistory
ProcessHistory const & processHistory() const
Definition: Principal.h:140
edm::SubProcess::doEndProcessBlockAsync
void doEndProcessBlockAsync(WaitingTaskHolder iHolder, ProcessBlockTransitionInfo const &iTransitionInfo, bool cleaningUpAfterException)
Definition: SubProcess.cc:493
edm::WaitingTaskHolder::doneWaiting
void doneWaiting(std::exception_ptr iExcept)
Definition: WaitingTaskHolder.h:93
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
edm::RunTransitionInfo
Definition: TransitionInfoTypes.h:64
edm::RunPrincipal::aux
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:59
getAllTriggerNames.h
edm::PrincipalCache::runPrincipalPtr
std::shared_ptr< RunPrincipal > const & runPrincipalPtr(ProcessHistoryID const &phid, RunNumber_t run) const
Definition: PrincipalCache.cc:28
edm::InRun
Definition: BranchType.h:11
edm::SubProcess::doBeginJob
void doBeginJob()
Definition: SubProcess.cc:278
edm::ProcessBlockPrincipal
Definition: ProcessBlockPrincipal.h:22
edm::OccurrenceTraits< ProcessBlockPrincipal, BranchActionGlobalEnd >
Definition: OccurrenceTraits.h:471
edm::SubProcess::processAsync
void processAsync(WaitingTaskHolder iHolder, EventPrincipal const &e, std::vector< std::shared_ptr< const EventSetupImpl >> const *)
Definition: SubProcess.cc:406
edm::PathsAndConsumesOfModules::initialize
void initialize(Schedule const *, std::shared_ptr< ProductRegistry const >)
Definition: PathsAndConsumesOfModules.cc:16
edm::BranchType
BranchType
Definition: BranchType.h:11
edm::ModuleDescription
Definition: ModuleDescription.h:21
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
groupFilesInBlocks.reverse
reverse
Definition: groupFilesInBlocks.py:131
convertSQLiteXML.runNumber
runNumber
Definition: convertSQLiteXML.py:91
edm::EventPrincipal::productProvenanceRetrieverPtr
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
Definition: EventPrincipal.h:114
edm::SelectedProducts
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
Definition: SelectedProducts.h:11
edm::OccurrenceTraits< RunPrincipal, BranchActionStreamBegin >
Definition: OccurrenceTraits.h:112
edm::for_all
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
edm::LuminosityBlockPrincipal::aux
LuminosityBlockAuxiliary const & aux() const
Definition: LuminosityBlockPrincipal.h:64
edm::ProductRegistry
Definition: ProductRegistry.h:37
ActivityRegistry.h
edm::parameterSet
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
edm::EventPrincipal::branchListIndexes
BranchListIndexes const & branchListIndexes() const
Definition: EventPrincipal.cc:367
edm::FileBlock
Definition: FileBlock.h:20
edm::SubProcess::wantAllEvents_
bool wantAllEvents_
Definition: SubProcess.h:313
edm::PreallocationConfiguration::numberOfLuminosityBlocks
unsigned int numberOfLuminosityBlocks() const
Definition: PreallocationConfiguration.h:36
edm::ServiceToken
Definition: ServiceToken.h:42
edm::InProcess
Definition: BranchType.h:11
edm::EDConsumerBase
Definition: EDConsumerBase.h:71
edm::PrincipalCache::runPrincipal
RunPrincipal & runPrincipal(ProcessHistoryID const &phid, RunNumber_t run) const
Definition: PrincipalCache.cc:21
edm::ParameterSet::popParameterSet
std::unique_ptr< ParameterSet > popParameterSet(std::string const &name)
Definition: ParameterSet.cc:121
edm::ProcessContext::setProcessConfiguration
void setProcessConfiguration(ProcessConfiguration const *processConfiguration)
Definition: ProcessContext.cc:19
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::SubProcess::droppedBranchIDToKeptBranchID
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID()
Definition: SubProcess.h:263
edm::SubProcess::deleteRunFromCache
void deleteRunFromCache(ProcessHistoryID const &parentPhID, int runNumber)
Definition: SubProcess.cc:595
edm::SubProcess::schedule_
edm::propagate_const< std::unique_ptr< Schedule > > schedule_
Definition: SubProcess.h:299
edm::EventPrincipal
Definition: EventPrincipal.h:46
edm::SubProcess::inUseLumiPrincipals_
std::vector< std::shared_ptr< LuminosityBlockPrincipal > > inUseLumiPrincipals_
Definition: SubProcess.h:297
OutputModuleDescription.h
edm::OccurrenceTraits< RunPrincipal, BranchActionGlobalEnd >
Definition: OccurrenceTraits.h:192
edm::SubProcess::SubProcess
SubProcess(ParameterSet &parameterSet, ParameterSet const &topLevelParameterSet, std::shared_ptr< ProductRegistry const > parentProductRegistry, std::shared_ptr< BranchIDListHelper const > parentBranchIDListHelper, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, SubProcessParentageHelper const &parentSubProcessParentageHelper, eventsetup::EventSetupsController &esController, ActivityRegistry &parentActReg, ServiceToken const &token, serviceregistry::ServiceLegacy iLegacy, PreallocationConfiguration const &preallocConfig, ProcessContext const *parentProcessContext)
Definition: SubProcess.cc:48
edm::ProductSelector::initialized
bool initialized() const
Definition: ProductSelector.h:38
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
edm::ExceptionCollector
Definition: ExceptionCollector.h:33
edm::Principal::processHistoryID
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:142
edm::BranchIDList
std::vector< BranchID::value_type > BranchIDList
Definition: BranchIDList.h:18
EventPrincipal.h
edm::SubProcess::thinnedAssociationsHelper
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper() const
Definition: SubProcess.h:271
edm::SubProcess::selectProducts
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &parentThinnedAssociationsHelper, std::map< BranchID, bool > &keepAssociation)
Definition: SubProcess.cc:311
SubProcessParentageHelper.h
edm::ProductSelector::checkForDuplicateKeptBranch
static void checkForDuplicateKeptBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc)
Definition: ProductSelector.cc:71
edm::Principal::reader
DelayedReader * reader() const
Definition: Principal.h:187
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:252
edm::ActivityRegistry
Definition: ActivityRegistry.h:134
edm::ThinnedAssociationsHelper::selectAssociationProducts
void selectAssociationProducts(std::vector< BranchDescription const * > const &associationDescriptions, std::set< BranchID > const &keptProductsInEvent, std::map< BranchID, bool > &keepAssociation) const
Definition: ThinnedAssociationsHelper.cc:189
edm::MergeableRunProductMetadata
Definition: MergeableRunProductMetadata.h:52
edm::SubProcess::doEventAsync
void doEventAsync(WaitingTaskHolder iHolder, EventPrincipal const &principal, std::vector< std::shared_ptr< const EventSetupImpl >> const *)
Definition: SubProcess.cc:390
edm::checkForModuleDependencyCorrectness
void checkForModuleDependencyCorrectness(edm::PathsAndConsumesOfModulesBase const &iPnC, bool iPrintDependencies)
Definition: PathsAndConsumesOfModules.cc:269
edm::Principal::getProductResolver
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
Definition: Principal.cc:554
edm::Hash
Definition: Hash.h:43
edm::SubProcess::serviceToken_
ServiceToken serviceToken_
Definition: SubProcess.h:279
edm::ActivityRegistry::connectToSubProcess
void connectToSubProcess(ActivityRegistry &iOther)
Definition: ActivityRegistry.cc:305
edm::SubProcess::esp_
edm::propagate_const< std::shared_ptr< eventsetup::EventSetupProvider > > esp_
Definition: SubProcess.h:298
edm::InEvent
Definition: BranchType.h:11
edm::OccurrenceTraits< RunPrincipal, BranchActionStreamEnd >
Definition: OccurrenceTraits.h:152
ExceptionCollector.h
edm::ProductSelector::fillDroppedToKept
static void fillDroppedToKept(ProductRegistry const &preg, std::map< BranchID, BranchDescription const * > const &trueBranchIDToKeptBranchDesc, std::map< BranchID::value_type, BranchID::value_type > &droppedBranchIDToKeptBranchID_)
Definition: ProductSelector.cc:99
edm::SubProcess::doBeginLuminosityBlockAsync
void doBeginLuminosityBlockAsync(WaitingTaskHolder iHolder, LumiTransitionInfo const &iTransitionInfo)
Definition: SubProcess.cc:612
edm::BranchIDLists
std::vector< BranchIDList > BranchIDLists
Definition: BranchIDList.h:19
edm::BranchID::value_type
unsigned int value_type
Definition: BranchID.h:16
edm::Principal::productRegistry
ProductRegistry const & productRegistry() const
Definition: Principal.h:146
edm::SubProcess::~SubProcess
~SubProcess() override
Definition: SubProcess.cc:221
edm::EventAuxiliary
Definition: EventAuxiliary.h:14
edm::SubProcess::propagateProducts
void propagateProducts(BranchType type, Principal const &parentPrincipal, Principal &principal) const
Definition: SubProcess.cc:732
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
streamTransitionAsync.h
edm::RunPrincipal::index
RunIndex index() const
Definition: RunPrincipal.h:57
edm::SubProcess::keptProducts_
SelectedProductsForBranchType keptProducts_
Definition: SubProcess.h:308
edm::SubProcess::doEndJob
void doEndJob()
Definition: SubProcess.cc:280
HistoryAppender.h
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
funct::true
true
Definition: Factorize.h:173
LuminosityBlockAuxiliary.h
edm::ThinnedAssociationsHelper
Definition: ThinnedAssociationsHelper.h:37
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
edm::SubProcess::deleteLumiFromCache
void deleteLumiFromCache(LuminosityBlockPrincipal &)
Definition: SubProcess.cc:665
edm::SubProcess::productSelectorRules_
ProductSelectorRules productSelectorRules_
Definition: SubProcess.h:309
edm::ParameterSet
Definition: ParameterSet.h:47
edm::OccurrenceTraits< ProcessBlockPrincipal, BranchActionProcessBlockInput >
Definition: OccurrenceTraits.h:434
edm::ProcessContext::setParentProcessContext
void setParentProcessContext(ProcessContext const *parentProcessContext)
Definition: ProcessContext.cc:23
edm::make_waiting_task
FunctorWaitingTask< F > * make_waiting_task(F f)
Definition: WaitingTask.h:101
edm::detail::TriggerResultsBasedEventSelector::wantEvent
bool wantEvent(EventForOutput const &e)
Definition: TriggerResultsBasedEventSelector.cc:148
edm::OccurrenceTraits< LuminosityBlockPrincipal, BranchActionGlobalBegin >
Definition: OccurrenceTraits.h:233
edm::WaitingTaskHolder
Definition: WaitingTaskHolder.h:32
edm::InLumi
Definition: BranchType.h:11
edm::Principal::getModifiableProductResolver
ProductResolverBase * getModifiableProductResolver(BranchID const &oid)
Definition: Principal.h:153
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
edm::SubProcess::processParameterSet_
edm::propagate_const< std::unique_ptr< ParameterSet > > processParameterSet_
Definition: SubProcess.h:302
edm::SubProcess::act_table_
std::unique_ptr< ExceptionToActionTable const > act_table_
Definition: SubProcess.h:285
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
RunPrincipal.h
edm::SubProcess::keepThisBranch
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
Definition: SubProcess.cc:353
edm::PrincipalCache::deleteRun
void deleteRun(ProcessHistoryID const &phid, RunNumber_t run)
Definition: PrincipalCache.cc:110
edm::SubProcess::droppedBranchIDToKeptBranchID_
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
Definition: SubProcess.h:319
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
edm::EDConsumerBase::updateLookup
void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
Definition: EDConsumerBase.cc:112
edm::Service
Definition: Service.h:30
edm::SubProcess::writeRunAsync
void writeRunAsync(WaitingTaskHolder, ProcessHistoryID const &parentPhID, int runNumber, MergeableRunProductMetadata const *)
Definition: SubProcess.cc:568
edm::EventPrincipal::eventSelectionIDs
EventSelectionIDVector const & eventSelectionIDs() const
Definition: EventPrincipal.cc:365
edm::LumiTransitionInfo::principal
LuminosityBlockPrincipal & principal()
Definition: TransitionInfoTypes.h:53
edm::SubProcess::selectors_
detail::TriggerResultsBasedEventSelector selectors_
Definition: SubProcess.h:315
edm::SubProcess::doStreamBeginLuminosityBlockAsync
void doStreamBeginLuminosityBlockAsync(WaitingTaskHolder iHolder, unsigned int iID, LumiTransitionInfo const &)
Definition: SubProcess.cc:708
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::RunPrincipal::reducedProcessHistoryID
ProcessHistoryID const & reducedProcessHistoryID() const
Definition: RunPrincipal.h:63
edm::ParameterSet::popVParameterSet
std::vector< ParameterSet > popVParameterSet(std::string const &name)
Definition: ParameterSet.cc:150
edm::PrincipalCache::insertForInput
void insertForInput(std::unique_ptr< ProcessBlockPrincipal >)
Definition: PrincipalCache.cc:98
edm::ProductRegistry::allBranchDescriptions
std::vector< BranchDescription const * > allBranchDescriptions() const
Definition: ProductRegistry.cc:199
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
edm::EventPrincipal::streamID
StreamID streamID() const
Definition: EventPrincipal.h:106
edm::SubProcess::actReg_
std::shared_ptr< ActivityRegistry > actReg_
Definition: SubProcess.h:278
edm::EDGetToken
Definition: EDGetToken.h:35
edm::eventsetup::EventSetupsController
Definition: EventSetupsController.h:80
edm::Principal::clearPrincipal
void clearPrincipal()
Definition: Principal.cc:382
edm::SubProcess::writeProcessBlockAsync
void writeProcessBlockAsync(edm::WaitingTaskHolder task, ProcessBlockType)
Definition: SubProcess.cc:549
LuminosityBlockPrincipal.h
WaitingTask.h
SubProcess.h
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
edm::PrincipalCache::ProcessBlockType
ProcessBlockType
Definition: PrincipalCache.h:57
edm::LumiTransitionInfo::eventSetupImpls
std::vector< std::shared_ptr< const EventSetupImpl > > const * eventSetupImpls() const
Definition: TransitionInfoTypes.h:56
FileBlock.h
edm::detail::configureEventSelector
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector, ConsumesCollector &&iC)
Definition: TriggerResultsBasedEventSelector.cc:80
edm::ProcessBlockPrincipal::fillProcessBlockPrincipal
void fillProcessBlockPrincipal(std::string const &processName, DelayedReader *reader=nullptr)
Definition: ProcessBlockPrincipal.cc:16
edm::SubProcess::productSelector_
ProductSelector productSelector_
Definition: SubProcess.h:310
ScheduleItems.h
edm::EventForOutput
Definition: EventForOutput.h:50
OccurrenceTraits.h
edm::PreallocationConfiguration
Definition: PreallocationConfiguration.h:27
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::SubProcess::doStreamBeginRunAsync
void doStreamBeginRunAsync(WaitingTaskHolder iHolder, unsigned int iID, RunTransitionInfo const &)
Definition: SubProcess.cc:686
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::detail::registerProperSelectionInfo
ParameterSetID registerProperSelectionInfo(edm::ParameterSet const &iInitial, std::string const &iLabel, std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
Definition: TriggerResultsBasedEventSelector.cc:163
edm::ProductRegistry::productList
ProductList const & productList() const
Definition: ProductRegistry.h:76
edm::SubProcess::endJob
void endJob()
Definition: SubProcess.cc:298
hgcal::association
std::tuple< layerClusterToCaloParticle, caloParticleToLayerCluster > association
Definition: LayerClusterAssociatorByEnergyScoreImpl.h:44
edm::SubProcess::parentToChildPhID_
std::map< ProcessHistoryID, ProcessHistoryID > parentToChildPhID_
Definition: SubProcess.h:300
edm::nonConsumedUnscheduledModules
std::vector< ModuleDescription const * > nonConsumedUnscheduledModules(edm::PathsAndConsumesOfModulesBase const &iPnC, std::vector< ModuleProcessName > &consumedByChildren)
Definition: PathsAndConsumesOfModules.cc:165
edm::SubProcess::doBeginStream
void doBeginStream(unsigned int)
Definition: SubProcess.cc:674
edm::SubProcess::parentPreg_
std::shared_ptr< ProductRegistry const > parentPreg_
Definition: SubProcess.h:280
edm::SubProcess::doEndRunAsync
void doEndRunAsync(WaitingTaskHolder iHolder, RunTransitionInfo const &iTransitionInfo, bool cleaningUpAfterException)
Definition: SubProcess.cc:536
edm::PathsAndConsumesOfModules::removeModules
void removeModules(std::vector< ModuleDescription const * > const &modules)
Definition: PathsAndConsumesOfModules.cc:53
edm::SubProcess::doBeginRunAsync
void doBeginRunAsync(WaitingTaskHolder iHolder, RunTransitionInfo const &iTransitionInfo)
Definition: SubProcess.cc:506
edm::SubProcess::fixBranchIDListsForEDAliases
void fixBranchIDListsForEDAliases(std::map< BranchID::value_type, BranchID::value_type > const &droppedBranchIDToKeptBranchID)
Definition: SubProcess.cc:372
edm::ProductResolverBase
Definition: ProductResolverBase.h:34
edm::PrincipalCache::getAvailableLumiPrincipalPtr
std::shared_ptr< LuminosityBlockPrincipal > getAvailableLumiPrincipalPtr()
Definition: PrincipalCache.cc:50
edm::SubProcess::branchIDListHelper_
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: SubProcess.h:282
RunAuxiliary.h
edm::ModuleProcessName
Definition: ModuleProcessName.h:12
Data_TkAlMinBias_Run2018C_PromptReco_v3_cff.maxEvents
maxEvents
Definition: Data_TkAlMinBias_Run2018C_PromptReco_v3_cff.py:3
edm::SubProcess::historyAppenders_
std::vector< HistoryAppender > historyAppenders_
Definition: SubProcess.h:294
ThinnedAssociation.h
edm::OccurrenceTraits< LuminosityBlockPrincipal, BranchActionStreamEnd >
Definition: OccurrenceTraits.h:314
edm::PreallocationConfiguration::numberOfStreams
unsigned int numberOfStreams() const
Definition: PreallocationConfiguration.h:35
edm::ProductResolverBase::connectTo
virtual void connectTo(ProductResolverBase const &, Principal const *)=0
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::PrincipalCache::processBlockPrincipal
ProcessBlockPrincipal & processBlockPrincipal() const
Definition: PrincipalCache.h:54
edm::BranchDescription
Definition: BranchDescription.h:32
visualization-live-secondInstance_cfg.numberOfStreams
numberOfStreams
Definition: visualization-live-secondInstance_cfg.py:89
globalTransitionAsync.h
validateTopLevelParameterSets.h
TransitionInfoTypes.h
ParameterSet.h
edm::SubProcess::writeLumiAsync
void writeLumiAsync(WaitingTaskHolder, LuminosityBlockPrincipal &)
Definition: SubProcess.cc:648
edm::LuminosityBlockPrincipal::index
LuminosityBlockIndex index() const
Definition: LuminosityBlockPrincipal.h:51
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:155
edm::SubProcess::processContext_
ProcessContext processContext_
Definition: SubProcess.h:287
edm::RunPrincipal
Definition: RunPrincipal.h:34
edm::ProductRegistry::anyProductProduced
bool anyProductProduced() const
Definition: ProductRegistry.h:122
edm::PrincipalCache::eventPrincipal
EventPrincipal & eventPrincipal(unsigned int iStreamIndex) const
Definition: PrincipalCache.h:70
edm::TypeToGet
Definition: TypeToGet.h:32
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::PrincipalCache::insert
void insert(std::unique_ptr< ProcessBlockPrincipal >)
Definition: PrincipalCache.cc:96
edm::SubProcess::subProcessParentageHelper_
edm::propagate_const< std::shared_ptr< SubProcessParentageHelper > > subProcessParentageHelper_
Definition: SubProcess.h:284
edm::EventSelectionIDVector
std::vector< EventSelectionID > EventSelectionIDVector
Definition: EventSelectionID.h:16
MatrixUtil.merge
def merge(dictlist, TELL=False)
Definition: MatrixUtil.py:201
edm::SubProcess::keepOnlyConsumedUnscheduledModules
std::vector< ModuleProcessName > keepOnlyConsumedUnscheduledModules(bool deleteModules)
Definition: SubProcess.cc:223
edm::PathsAndConsumesOfModulesBase::allModules
std::vector< ModuleDescription const * > const & allModules() const
Definition: PathsAndConsumesOfModulesBase.h:42
edm::ServiceRegistry::Operate
Definition: ServiceRegistry.h:40
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition: SiStripBadComponentsDQMServiceTemplate_cfg.py:86
edm::InputTag
Definition: InputTag.h:15
edm::SubProcess::doStreamEndLuminosityBlockAsync
void doStreamEndLuminosityBlockAsync(WaitingTaskHolder iHolder, unsigned int iID, LumiTransitionInfo const &, bool cleaningUpAfterException)
Definition: SubProcess.cc:720
edm::RunTransitionInfo::principal
RunPrincipal & principal()
Definition: TransitionInfoTypes.h:71
benchmark_cfg.fb
fb
Definition: benchmark_cfg.py:14
edm::WaitingTaskHolder::group
tbb::task_group * group() const noexcept
Definition: WaitingTaskHolder.h:77
EventSelectionID.h
edm::serviceregistry::ServiceLegacy
ServiceLegacy
Definition: ServiceLegacy.h:29
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
edm::SubProcess::doEndLuminosityBlockAsync
void doEndLuminosityBlockAsync(WaitingTaskHolder iHolder, LumiTransitionInfo const &iTransitionInfo, bool cleaningUpAfterException)
Definition: SubProcess.cc:634
edm::PrincipalCache::setNumberOfConcurrentPrincipals
void setNumberOfConcurrentPrincipals(PreallocationConfiguration const &)
Definition: PrincipalCache.cc:17
edm::SubProcess::preg_
std::shared_ptr< ProductRegistry const > preg_
Definition: SubProcess.h:281
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316
edm::SubProcess::principalCache_
PrincipalCache principalCache_
Definition: SubProcess.h:295