CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
edm::Schedule Class Reference

#include <Schedule.h>

Public Types

typedef std::vector< edm::propagate_const< std::shared_ptr< OutputModuleCommunicator > > > AllOutputModuleCommunicators
 
typedef std::vector< Worker * > AllWorkers
 
typedef std::vector< std::string > vstring
 
typedef std::vector< Worker * > Workers
 

Public Member Functions

AllWorkers const & allWorkers () const
 returns the collection of pointers to workers More...
 
void availablePaths (std::vector< std::string > &oLabelsToFill) const
 adds to oLabelsToFill the labels for all paths in the process More...
 
void beginJob (ProductRegistry const &, eventsetup::ESRecordsToProxyIndices const &, ProcessBlockHelperBase const &)
 
void beginStream (unsigned int)
 
bool changeModule (std::string const &iLabel, ParameterSet const &iPSet, const ProductRegistry &iRegistry, eventsetup::ESRecordsToProxyIndices const &)
 
void clearCounters ()
 Clear all the counters in the trigger report. More...
 
void closeOutputFiles ()
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
void deleteModule (std::string const &iLabel, ActivityRegistry *areg)
 Deletes module with label iLabel. More...
 
void endJob (ExceptionCollector &collector)
 
void endPaths (std::vector< std::string > &oLabelsToFill) const
 adds to oLabelsToFill the labels for all end paths in the process More...
 
void endStream (unsigned int)
 
void fillModuleAndConsumesInfo (std::vector< ModuleDescription const *> &allModuleDescriptions, std::vector< std::pair< unsigned int, unsigned int >> &moduleIDToIndex, std::array< std::vector< std::vector< ModuleDescription const *>>, NumBranchTypes > &modulesWhoseProductsAreConsumedBy, std::vector< std::vector< ModuleProcessName >> &modulesInPreviousProcessesWhoseProductsAreConsumedBy, ProductRegistry const &preg) const
 
std::vector< ModuleDescription const * > getAllModuleDescriptions () const
 
void getTriggerReport (TriggerReport &rep) const
 
void getTriggerTimingReport (TriggerTimingReport &rep) const
 
void initializeEarlyDelete (std::vector< std::string > const &branchesToDeleteEarly, edm::ProductRegistry const &preg)
 
void moduleDescriptionsInEndPath (std::string const &iEndPathLabel, std::vector< ModuleDescription const *> &descriptions, unsigned int hint) const
 
void moduleDescriptionsInPath (std::string const &iPathLabel, std::vector< ModuleDescription const *> &descriptions, unsigned int hint) const
 
void modulesInPath (std::string const &iPathLabel, std::vector< std::string > &oLabelsToFill) const
 adds to oLabelsToFill in execution order the labels of all modules in path iPathLabel More...
 
void openOutputFiles (FileBlock &fb)
 
void processOneEventAsync (WaitingTaskHolder iTask, unsigned int iStreamID, EventTransitionInfo &, ServiceToken const &token)
 
template<typename T >
void processOneGlobalAsync (WaitingTaskHolder iTask, typename T::TransitionInfoType &transitionInfo, ServiceToken const &token, bool cleaningUpAfterException=false)
 
template<typename T >
void processOneStreamAsync (WaitingTaskHolder iTask, unsigned int iStreamID, typename T::TransitionInfoType &transitionInfo, ServiceToken const &token, bool cleaningUpAfterException=false)
 
void respondToCloseInputFile (FileBlock const &fb)
 
void respondToOpenInputFile (FileBlock const &fb)
 
 Schedule (ParameterSet &proc_pset, service::TriggerNamesService const &tns, ProductRegistry &pregistry, BranchIDListHelper &branchIDListHelper, ProcessBlockHelperBase &, ThinnedAssociationsHelper &thinnedAssociationsHelper, SubProcessParentageHelper const *subProcessParentageHelper, ExceptionToActionTable const &actions, std::shared_ptr< ActivityRegistry > areg, std::shared_ptr< ProcessConfiguration > processConfiguration, bool hasSubprocesses, PreallocationConfiguration const &config, ProcessContext const *processContext)
 
bool shouldWeCloseOutput () const
 
bool terminate () const
 Return whether each output module has reached its maximum count. More...
 
int totalEvents () const
 
int totalEventsFailed () const
 
int totalEventsPassed () const
 
void triggerPaths (std::vector< std::string > &oLabelsToFill) const
 
void writeLumiAsync (WaitingTaskHolder iTask, LuminosityBlockPrincipal const &lbp, ProcessContext const *, ActivityRegistry *)
 
void writeProcessBlockAsync (WaitingTaskHolder iTask, ProcessBlockPrincipal const &, ProcessContext const *, ActivityRegistry *)
 
void writeRunAsync (WaitingTaskHolder iTask, RunPrincipal const &rp, ProcessContext const *, ActivityRegistry *, MergeableRunProductMetadata const *)
 

Private Member Functions

void limitOutput (ParameterSet const &proc_pset, BranchIDLists const &branchIDLists, SubProcessParentageHelper const *subProcessParentageHelper)
 
std::shared_ptr< ModuleRegistry const > moduleRegistry () const
 
std::shared_ptr< ModuleRegistry > & moduleRegistry ()
 
std::shared_ptr< TriggerResultInserter const > resultsInserter () const
 
std::shared_ptr< TriggerResultInserter > & resultsInserter ()
 

Private Attributes

AllOutputModuleCommunicators all_output_communicators_
 
std::vector< std::string > const * endPathNames_
 
std::vector< edm::propagate_const< std::shared_ptr< EndPathStatusInserter > > > endPathStatusInserters_
 
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
 
edm::propagate_const< std::shared_ptr< ModuleRegistry > > moduleRegistry_
 
std::vector< std::string > const * pathNames_
 
std::vector< edm::propagate_const< std::shared_ptr< PathStatusInserter > > > pathStatusInserters_
 
PreallocationConfiguration preallocConfig_
 
edm::propagate_const< std::shared_ptr< TriggerResultInserter > > resultsInserter_
 
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
 
edm::propagate_const< std::unique_ptr< SystemTimeKeeper > > summaryTimeKeeper_
 
bool wantSummary_
 

Detailed Description

Definition at line 122 of file Schedule.h.

Member Typedef Documentation

◆ AllOutputModuleCommunicators

Definition at line 126 of file Schedule.h.

◆ AllWorkers

typedef std::vector<Worker*> edm::Schedule::AllWorkers

Definition at line 125 of file Schedule.h.

◆ vstring

typedef std::vector<std::string> edm::Schedule::vstring

Definition at line 124 of file Schedule.h.

◆ Workers

typedef std::vector<Worker*> edm::Schedule::Workers

Definition at line 128 of file Schedule.h.

Constructor & Destructor Documentation

◆ Schedule()

edm::Schedule::Schedule ( ParameterSet proc_pset,
service::TriggerNamesService const &  tns,
ProductRegistry pregistry,
BranchIDListHelper branchIDListHelper,
ProcessBlockHelperBase processBlockHelper,
ThinnedAssociationsHelper thinnedAssociationsHelper,
SubProcessParentageHelper const *  subProcessParentageHelper,
ExceptionToActionTable const &  actions,
std::shared_ptr< ActivityRegistry areg,
std::shared_ptr< ProcessConfiguration processConfiguration,
bool  hasSubprocesses,
PreallocationConfiguration const &  config,
ProcessContext const *  processContext 
)

Definition at line 477 of file Schedule.cc.

References actions, and edm::service::TriggerNamesService::getTrigPaths().

490  : //Only create a resultsInserter if there is a trigger path
491  resultsInserter_{tns.getTrigPaths().empty()
492  ? std::shared_ptr<TriggerResultInserter>{}
493  : makeInserter(proc_pset, prealloc, preg, actions, areg, processConfiguration)},
494  moduleRegistry_(new ModuleRegistry()),
496  preallocConfig_(prealloc),
497  pathNames_(&tns.getTrigPaths()),
498  endPathNames_(&tns.getEndPaths()),
499  wantSummary_(tns.wantSummary()) {
500  makePathStatusInserters(pathStatusInserters_,
501  *pathNames_,
502  prealloc,
503  preg,
504  areg,
505  processConfiguration,
506  std::string("PathStatusInserter"));
507 
508  makePathStatusInserters(endPathStatusInserters_,
509  *endPathNames_,
510  prealloc,
511  preg,
512  areg,
513  processConfiguration,
514  std::string("EndPathStatusInserter"));
515 
516  assert(0 < prealloc.numberOfStreams());
517  streamSchedules_.reserve(prealloc.numberOfStreams());
518  for (unsigned int i = 0; i < prealloc.numberOfStreams(); ++i) {
519  streamSchedules_.emplace_back(make_shared_noexcept_false<StreamSchedule>(resultsInserter(),
522  moduleRegistry(),
523  proc_pset,
524  tns,
525  prealloc,
526  preg,
527  branchIDListHelper,
528  actions,
529  areg,
530  processConfiguration,
531  StreamID{i},
532  processContext));
533  }
534 
535  //TriggerResults are injected automatically by StreamSchedules and are
536  // unknown to the ModuleRegistry
537  const std::string kTriggerResults("TriggerResults");
538  std::vector<std::string> modulesToUse;
539  modulesToUse.reserve(streamSchedules_[0]->allWorkers().size());
540  for (auto const& worker : streamSchedules_[0]->allWorkers()) {
541  if (worker->description()->moduleLabel() != kTriggerResults) {
542  modulesToUse.push_back(worker->description()->moduleLabel());
543  }
544  }
545  //The unscheduled modules are at the end of the list, but we want them at the front
546  unsigned int const nUnscheduledModules = streamSchedules_[0]->numberOfUnscheduledModules();
547  if (nUnscheduledModules > 0) {
548  std::vector<std::string> temp;
549  temp.reserve(modulesToUse.size());
550  auto itBeginUnscheduled = modulesToUse.begin() + modulesToUse.size() - nUnscheduledModules;
551  std::copy(itBeginUnscheduled, modulesToUse.end(), std::back_inserter(temp));
552  std::copy(modulesToUse.begin(), itBeginUnscheduled, std::back_inserter(temp));
553  temp.swap(modulesToUse);
554  }
555 
556  // propagate_const<T> has no reset() function
557  globalSchedule_ = std::make_unique<GlobalSchedule>(resultsInserter(),
560  moduleRegistry(),
561  modulesToUse,
562  proc_pset,
563  preg,
564  prealloc,
565  actions,
566  areg,
567  processConfiguration,
568  processContext);
569 
570  //TriggerResults is not in the top level ParameterSet so the call to
571  // reduceParameterSet would fail to find it. Just remove it up front.
572  std::set<std::string> usedModuleLabels;
573  for (auto const& worker : allWorkers()) {
574  if (worker->description()->moduleLabel() != kTriggerResults) {
575  usedModuleLabels.insert(worker->description()->moduleLabel());
576  }
577  }
578  std::vector<std::string> modulesInConfig(proc_pset.getParameter<std::vector<std::string>>("@all_modules"));
579  std::map<std::string, std::vector<std::pair<std::string, int>>> outputModulePathPositions;
580  reduceParameterSet(proc_pset, tns.getEndPaths(), modulesInConfig, usedModuleLabels, outputModulePathPositions);
581  {
582  std::vector<std::string> aliases = proc_pset.getParameter<std::vector<std::string>>("@all_aliases");
583  detail::processEDAliases(aliases, {}, proc_pset, processConfiguration->processName(), preg);
584  }
585 
586  // At this point all BranchDescriptions are created. Mark now the
587  // ones of unscheduled workers to be on-demand.
588  if (nUnscheduledModules > 0) {
589  std::set<std::string> unscheduledModules(modulesToUse.begin(), modulesToUse.begin() + nUnscheduledModules);
590  preg.setUnscheduledProducts(unscheduledModules);
591  }
592 
593  processSwitchProducers(proc_pset, processConfiguration->processName(), preg);
594  proc_pset.registerIt();
595  processConfiguration->setParameterSetID(proc_pset.id());
596  processConfiguration->setProcessConfigurationID();
597 
598  // This is used for a little sanity-check to make sure no code
599  // modifications alter the number of workers at a later date.
600  size_t all_workers_count = allWorkers().size();
601 
602  moduleRegistry_->forAllModuleHolders([this](maker::ModuleHolder* iHolder) {
603  auto comm = iHolder->createOutputModuleCommunicator();
604  if (comm) {
605  all_output_communicators_.emplace_back(std::shared_ptr<OutputModuleCommunicator>{comm.release()});
606  }
607  });
608  // Now that the output workers are filled in, set any output limits or information.
609  limitOutput(proc_pset, branchIDListHelper.branchIDLists(), subProcessParentageHelper);
610 
611  // Sanity check: make sure nobody has added a worker after we've
612  // already relied on the WorkerManager being full.
613  assert(all_workers_count == allWorkers().size());
614 
615  branchIDListHelper.updateFromRegistry(preg);
616 
617  for (auto const& worker : streamSchedules_[0]->allWorkers()) {
618  worker->registerThinnedAssociations(preg, thinnedAssociationsHelper);
619  }
620 
621  processBlockHelper.updateForNewProcess(preg, processConfiguration->processName());
622 
623  // The output modules consume products in kept branches.
624  // So we must set this up before freezing.
625  for (auto& c : all_output_communicators_) {
626  c->selectProducts(preg, thinnedAssociationsHelper, processBlockHelper);
627  }
628 
629  for (auto& product : preg.productListUpdator()) {
630  setIsMergeable(product.second);
631  }
632 
633  {
634  // We now get a collection of types that may be consumed.
635  std::set<TypeID> productTypesConsumed;
636  std::set<TypeID> elementTypesConsumed;
637  // Loop over all modules
638  for (auto const& worker : allWorkers()) {
639  for (auto const& consumesInfo : worker->consumesInfo()) {
640  if (consumesInfo.kindOfType() == PRODUCT_TYPE) {
641  productTypesConsumed.emplace(consumesInfo.type());
642  } else {
643  elementTypesConsumed.emplace(consumesInfo.type());
644  }
645  }
646  }
647  // The SubProcess class is not a module, yet it may consume.
648  if (hasSubprocesses) {
649  productTypesConsumed.emplace(typeid(TriggerResults));
650  }
651  // The RandomNumberGeneratorService is not a module, yet it consumes.
652  { RngEDConsumer rngConsumer = RngEDConsumer(productTypesConsumed); }
653  preg.setFrozen(productTypesConsumed, elementTypesConsumed, processConfiguration->processName());
654  }
655 
656  for (auto& c : all_output_communicators_) {
657  c->setEventSelectionInfo(outputModulePathPositions, preg.anyProductProduced());
658  }
659 
660  if (wantSummary_) {
661  std::vector<const ModuleDescription*> modDesc;
662  const auto& workers = allWorkers();
663  modDesc.reserve(workers.size());
664 
665  std::transform(workers.begin(),
666  workers.end(),
667  std::back_inserter(modDesc),
668  [](const Worker* iWorker) -> const ModuleDescription* { return iWorker->description(); });
669 
670  // propagate_const<T> has no reset() function
671  summaryTimeKeeper_ = std::make_unique<SystemTimeKeeper>(prealloc.numberOfStreams(), modDesc, tns, processContext);
672  auto timeKeeperPtr = summaryTimeKeeper_.get();
673 
674  areg->watchPreModuleDestruction(timeKeeperPtr, &SystemTimeKeeper::removeModuleIfExists);
675 
676  areg->watchPreModuleEvent(timeKeeperPtr, &SystemTimeKeeper::startModuleEvent);
677  areg->watchPostModuleEvent(timeKeeperPtr, &SystemTimeKeeper::stopModuleEvent);
678  areg->watchPreModuleEventAcquire(timeKeeperPtr, &SystemTimeKeeper::restartModuleEvent);
679  areg->watchPostModuleEventAcquire(timeKeeperPtr, &SystemTimeKeeper::stopModuleEvent);
680  areg->watchPreModuleEventDelayedGet(timeKeeperPtr, &SystemTimeKeeper::pauseModuleEvent);
681  areg->watchPostModuleEventDelayedGet(timeKeeperPtr, &SystemTimeKeeper::restartModuleEvent);
682 
683  areg->watchPreSourceEvent(timeKeeperPtr, &SystemTimeKeeper::startEvent);
684  areg->watchPostEvent(timeKeeperPtr, &SystemTimeKeeper::stopEvent);
685 
686  areg->watchPrePathEvent(timeKeeperPtr, &SystemTimeKeeper::startPath);
687  areg->watchPostPathEvent(timeKeeperPtr, &SystemTimeKeeper::stopPath);
688 
689  areg->watchPostBeginJob(timeKeeperPtr, &SystemTimeKeeper::startProcessingLoop);
690  areg->watchPreEndJob(timeKeeperPtr, &SystemTimeKeeper::stopProcessingLoop);
691  //areg->preModuleEventSignal_.connect([timeKeeperPtr](StreamContext const& iContext, ModuleCallingContext const& iMod) {
692  //timeKeeperPtr->startModuleEvent(iContext,iMod);
693  //});
694  }
695 
696  } // Schedule::Schedule
size
Write out results.
void stopEvent(StreamContext const &)
roAction_t actions[nactions]
Definition: GenABIO.cc:181
void restartModuleEvent(StreamContext const &, ModuleCallingContext const &)
void startModuleEvent(StreamContext const &, ModuleCallingContext const &)
void removeModuleIfExists(ModuleDescription const &module)
std::vector< std::string > const * pathNames_
Definition: Schedule.h:313
edm::propagate_const< std::unique_ptr< SystemTimeKeeper > > summaryTimeKeeper_
Definition: Schedule.h:311
assert(be >=bs)
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:306
void processEDAliases(std::vector< std::string > const &aliasNamesToProcess, std::unordered_set< std::string > const &aliasModulesToProcess, ParameterSet const &proc_pset, std::string const &processName, ProductRegistry &preg)
std::vector< edm::propagate_const< std::shared_ptr< PathStatusInserter > > > pathStatusInserters_
Definition: Schedule.h:301
edm::propagate_const< std::shared_ptr< TriggerResultInserter > > resultsInserter_
Definition: Schedule.h:300
void limitOutput(ParameterSet const &proc_pset, BranchIDLists const &branchIDLists, SubProcessParentageHelper const *subProcessParentageHelper)
Definition: Schedule.cc:698
edm::propagate_const< std::shared_ptr< ModuleRegistry > > moduleRegistry_
Definition: Schedule.h:303
void stopPath(StreamContext const &, PathContext const &, HLTPathStatus const &)
std::shared_ptr< ModuleRegistry const > moduleRegistry() const
Definition: Schedule.h:297
void stopModuleEvent(StreamContext const &, ModuleCallingContext const &)
PreallocationConfiguration preallocConfig_
Definition: Schedule.h:309
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1258
void startPath(StreamContext const &, PathContext const &)
std::vector< edm::propagate_const< std::shared_ptr< EndPathStatusInserter > > > endPathStatusInserters_
Definition: Schedule.h:302
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:308
void pauseModuleEvent(StreamContext const &, ModuleCallingContext const &)
bool wantSummary_
Definition: Schedule.h:315
std::vector< std::string > const * endPathNames_
Definition: Schedule.h:314
std::shared_ptr< TriggerResultInserter const > resultsInserter() const
Definition: Schedule.h:293
void setIsMergeable(BranchDescription &)
unsigned transform(const HcalDetId &id, unsigned transformCode)

Member Function Documentation

◆ allWorkers()

Schedule::AllWorkers const & edm::Schedule::allWorkers ( ) const

returns the collection of pointers to workers

Definition at line 1258 of file Schedule.cc.

References globalSchedule_.

Referenced by changeModule(), closeOutputFiles(), convertCurrentProcessAlias(), edm::PathsAndConsumesOfModules::doConsumesInfo(), fillModuleAndConsumesInfo(), getAllModuleDescriptions(), respondToCloseInputFile(), and respondToOpenInputFile().

1258 { return globalSchedule_->allWorkers(); }
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:306

◆ availablePaths()

void edm::Schedule::availablePaths ( std::vector< std::string > &  oLabelsToFill) const

adds to oLabelsToFill the labels for all paths in the process

Definition at line 1266 of file Schedule.cc.

References streamSchedules_.

Referenced by edm::ScheduleInfo::availablePaths().

1266  {
1267  streamSchedules_[0]->availablePaths(oLabelsToFill);
1268  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ beginJob()

void edm::Schedule::beginJob ( ProductRegistry const &  iRegistry,
eventsetup::ESRecordsToProxyIndices const &  iESIndices,
ProcessBlockHelperBase const &  processBlockHelperBase 
)

Definition at line 1159 of file Schedule.cc.

References globalSchedule_.

1161  {
1162  globalSchedule_->beginJob(iRegistry, iESIndices, processBlockHelperBase);
1163  }
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:306

◆ beginStream()

void edm::Schedule::beginStream ( unsigned int  iStreamID)

Definition at line 1165 of file Schedule.cc.

References cms::cuda::assert(), and streamSchedules_.

1165  {
1166  assert(iStreamID < streamSchedules_.size());
1167  streamSchedules_[iStreamID]->beginStream();
1168  }
assert(be >=bs)
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ changeModule()

bool edm::Schedule::changeModule ( std::string const &  iLabel,
ParameterSet const &  iPSet,
const ProductRegistry iRegistry,
eventsetup::ESRecordsToProxyIndices const &  iIndices 
)

clone the type of module with label iLabel but configure with iPSet. Returns true if successful.

Definition at line 1183 of file Schedule.cc.

References allWorkers(), newFWLiteAna::found, globalSchedule_, edm::InEvent, edm::InLumi, edm::InProcess, edm::InRun, moduleRegistry_, preallocConfig_, SimL1EmulatorRepack_CalouGT_cff::processName, edm::ProductRegistry::productLookup(), alignCSCRings::s, and streamSchedules_.

1186  {
1187  Worker* found = nullptr;
1188  for (auto const& worker : allWorkers()) {
1189  if (worker->description()->moduleLabel() == iLabel) {
1190  found = worker;
1191  break;
1192  }
1193  }
1194  if (nullptr == found) {
1195  return false;
1196  }
1197 
1198  auto newMod = moduleRegistry_->replaceModule(iLabel, iPSet, preallocConfig_);
1199 
1200  globalSchedule_->replaceModule(newMod, iLabel);
1201 
1202  for (auto& s : streamSchedules_) {
1203  s->replaceModule(newMod, iLabel);
1204  }
1205 
1206  {
1207  //Need to updateLookup in order to make getByToken work
1208  auto const processBlockLookup = iRegistry.productLookup(InProcess);
1209  auto const runLookup = iRegistry.productLookup(InRun);
1210  auto const lumiLookup = iRegistry.productLookup(InLumi);
1211  auto const eventLookup = iRegistry.productLookup(InEvent);
1212  found->updateLookup(InProcess, *runLookup);
1213  found->updateLookup(InRun, *runLookup);
1214  found->updateLookup(InLumi, *lumiLookup);
1215  found->updateLookup(InEvent, *eventLookup);
1216  found->updateLookup(iIndices);
1217 
1218  auto const& processName = newMod->moduleDescription().processName();
1219  auto const& processBlockModuleToIndicies = processBlockLookup->indiciesForModulesInProcess(processName);
1220  auto const& runModuleToIndicies = runLookup->indiciesForModulesInProcess(processName);
1221  auto const& lumiModuleToIndicies = lumiLookup->indiciesForModulesInProcess(processName);
1222  auto const& eventModuleToIndicies = eventLookup->indiciesForModulesInProcess(processName);
1223  found->resolvePutIndicies(InProcess, processBlockModuleToIndicies);
1224  found->resolvePutIndicies(InRun, runModuleToIndicies);
1225  found->resolvePutIndicies(InLumi, lumiModuleToIndicies);
1226  found->resolvePutIndicies(InEvent, eventModuleToIndicies);
1227  }
1228 
1229  return true;
1230  }
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:306
edm::propagate_const< std::shared_ptr< ModuleRegistry > > moduleRegistry_
Definition: Schedule.h:303
PreallocationConfiguration preallocConfig_
Definition: Schedule.h:309
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1258

◆ clearCounters()

void edm::Schedule::clearCounters ( )

Clear all the counters in the trigger report.

Definition at line 1382 of file Schedule.cc.

References alignCSCRings::s, and streamSchedules_.

1382  {
1383  for (auto& s : streamSchedules_) {
1384  s->clearCounters();
1385  }
1386  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ closeOutputFiles()

void edm::Schedule::closeOutputFiles ( )

Definition at line 1035 of file Schedule.cc.

References all_output_communicators_, allWorkers(), edm::OutputModuleCommunicator::closeFile(), and edm::for_all().

1035  {
1036  using std::placeholders::_1;
1038  for (auto& worker : allWorkers()) {
1039  worker->respondToCloseOutputFile();
1040  }
1041  }
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1258
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:308

◆ convertCurrentProcessAlias()

void edm::Schedule::convertCurrentProcessAlias ( std::string const &  processName)

Convert "@currentProcess" in InputTag process names to the actual current process name.

Definition at line 1260 of file Schedule.cc.

References allWorkers(), and SimL1EmulatorRepack_CalouGT_cff::processName.

1260  {
1261  for (auto const& worker : allWorkers()) {
1262  worker->convertCurrentProcessAlias(processName);
1263  }
1264  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1258

◆ deleteModule()

void edm::Schedule::deleteModule ( std::string const &  iLabel,
ActivityRegistry areg 
)

Deletes module with label iLabel.

Definition at line 1232 of file Schedule.cc.

References globalSchedule_, moduleRegistry_, edm::ActivityRegistry::postModuleDestructionSignal_, edm::ActivityRegistry::preModuleDestructionSignal_, cms::cuda::stream, and streamSchedules_.

1232  {
1233  globalSchedule_->deleteModule(iLabel);
1234  for (auto& stream : streamSchedules_) {
1235  stream->deleteModule(iLabel);
1236  }
1237  moduleRegistry_->deleteModule(iLabel, areg->preModuleDestructionSignal_, areg->postModuleDestructionSignal_);
1238  }
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:306
edm::propagate_const< std::shared_ptr< ModuleRegistry > > moduleRegistry_
Definition: Schedule.h:303
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ endJob()

void edm::Schedule::endJob ( ExceptionCollector collector)

Definition at line 754 of file Schedule.cc.

References visDQMUpload::context, edm::EventTimingSummary::cpuTime, edm::TriggerTimingReport::endPathSummaries, edm::TriggerReport::endPathSummaries, edm::TriggerTimingReport::eventSummary, edm::TriggerReport::eventSummary, alignBH_cfg::fixed, getTriggerReport(), getTriggerTimingReport(), globalSchedule_, edm::ExceptionCollector::hasThrown(), SiStripPI::max, mod(), edm::PreallocationConfiguration::numberOfThreads(), AlCaHLTBitMon_ParallelJobs::p, preallocConfig_, edm::EventTimingSummary::realTime, streamSchedules_, edm::EventTimingSummary::sumStreamRealTime, edm::EventTimingSummary::totalEvents, edm::EventSummary::totalEvents, totalEvents(), edm::EventSummary::totalEventsFailed, edm::EventSummary::totalEventsPassed, edm::TriggerTimingReport::trigPathSummaries, edm::TriggerReport::trigPathSummaries, wantSummary_, edm::TriggerTimingReport::workerSummaries, and edm::TriggerReport::workerSummaries.

754  {
755  globalSchedule_->endJob(collector);
756  if (collector.hasThrown()) {
757  return;
758  }
759 
760  if (wantSummary_ == false)
761  return;
762  {
763  TriggerReport tr;
764  getTriggerReport(tr);
765 
766  // The trigger report (pass/fail etc.):
767 
768  LogFwkVerbatim("FwkSummary") << "";
769  if (streamSchedules_[0]->context().processContext()->isSubProcess()) {
770  LogFwkVerbatim("FwkSummary") << "TrigReport Process: "
771  << streamSchedules_[0]->context().processContext()->processName();
772  }
773  LogFwkVerbatim("FwkSummary") << "TrigReport "
774  << "---------- Event Summary ------------";
775  if (!tr.trigPathSummaries.empty()) {
776  LogFwkVerbatim("FwkSummary") << "TrigReport"
777  << " Events total = " << tr.eventSummary.totalEvents
778  << " passed = " << tr.eventSummary.totalEventsPassed
779  << " failed = " << tr.eventSummary.totalEventsFailed << "";
780  } else {
781  LogFwkVerbatim("FwkSummary") << "TrigReport"
782  << " Events total = " << tr.eventSummary.totalEvents
783  << " passed = " << tr.eventSummary.totalEvents << " failed = 0";
784  }
785 
786  LogFwkVerbatim("FwkSummary") << "";
787  LogFwkVerbatim("FwkSummary") << "TrigReport "
788  << "---------- Path Summary ------------";
789  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#"
790  << " " << std::right << std::setw(10) << "Executed"
791  << " " << std::right << std::setw(10) << "Passed"
792  << " " << std::right << std::setw(10) << "Failed"
793  << " " << std::right << std::setw(10) << "Error"
794  << " "
795  << "Name"
796  << "";
797  for (auto const& p : tr.trigPathSummaries) {
798  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 1 << std::right << std::setw(5)
799  << p.bitPosition << " " << std::right << std::setw(10) << p.timesRun << " "
800  << std::right << std::setw(10) << p.timesPassed << " " << std::right
801  << std::setw(10) << p.timesFailed << " " << std::right << std::setw(10)
802  << p.timesExcept << " " << p.name << "";
803  }
804 
805  /*
806  std::vector<int>::const_iterator epi = empty_trig_paths_.begin();
807  std::vector<int>::const_iterator epe = empty_trig_paths_.end();
808  std::vector<std::string>::const_iterator epn = empty_trig_path_names_.begin();
809  for (; epi != epe; ++epi, ++epn) {
810 
811  LogFwkVerbatim("FwkSummary") << "TrigReport "
812  << std::right << std::setw(5) << 1
813  << std::right << std::setw(5) << *epi << " "
814  << std::right << std::setw(10) << totalEvents() << " "
815  << std::right << std::setw(10) << totalEvents() << " "
816  << std::right << std::setw(10) << 0 << " "
817  << std::right << std::setw(10) << 0 << " "
818  << *epn << "";
819  }
820  */
821 
822  LogFwkVerbatim("FwkSummary") << "";
823  LogFwkVerbatim("FwkSummary") << "TrigReport "
824  << "-------End-Path Summary ------------";
825  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#"
826  << " " << std::right << std::setw(10) << "Executed"
827  << " " << std::right << std::setw(10) << "Passed"
828  << " " << std::right << std::setw(10) << "Failed"
829  << " " << std::right << std::setw(10) << "Error"
830  << " "
831  << "Name"
832  << "";
833  for (auto const& p : tr.endPathSummaries) {
834  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 0 << std::right << std::setw(5)
835  << p.bitPosition << " " << std::right << std::setw(10) << p.timesRun << " "
836  << std::right << std::setw(10) << p.timesPassed << " " << std::right
837  << std::setw(10) << p.timesFailed << " " << std::right << std::setw(10)
838  << p.timesExcept << " " << p.name << "";
839  }
840 
841  for (auto const& p : tr.trigPathSummaries) {
842  LogFwkVerbatim("FwkSummary") << "";
843  LogFwkVerbatim("FwkSummary") << "TrigReport "
844  << "---------- Modules in Path: " << p.name << " ------------";
845  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#"
846  << " " << std::right << std::setw(10) << "Visited"
847  << " " << std::right << std::setw(10) << "Passed"
848  << " " << std::right << std::setw(10) << "Failed"
849  << " " << std::right << std::setw(10) << "Error"
850  << " "
851  << "Name"
852  << "";
853 
854  for (auto const& mod : p.moduleInPathSummaries) {
855  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 1 << std::right << std::setw(5)
856  << mod.bitPosition << " " << std::right << std::setw(10) << mod.timesVisited
857  << " " << std::right << std::setw(10) << mod.timesPassed << " " << std::right
858  << std::setw(10) << mod.timesFailed << " " << std::right << std::setw(10)
859  << mod.timesExcept << " " << mod.moduleLabel << "";
860  }
861  }
862 
863  for (auto const& p : tr.endPathSummaries) {
864  LogFwkVerbatim("FwkSummary") << "";
865  LogFwkVerbatim("FwkSummary") << "TrigReport "
866  << "------ Modules in End-Path: " << p.name << " ------------";
867  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#"
868  << " " << std::right << std::setw(10) << "Visited"
869  << " " << std::right << std::setw(10) << "Passed"
870  << " " << std::right << std::setw(10) << "Failed"
871  << " " << std::right << std::setw(10) << "Error"
872  << " "
873  << "Name"
874  << "";
875 
876  unsigned int bitpos = 0;
877  for (auto const& mod : p.moduleInPathSummaries) {
878  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 0 << std::right << std::setw(5)
879  << bitpos << " " << std::right << std::setw(10) << mod.timesVisited << " "
880  << std::right << std::setw(10) << mod.timesPassed << " " << std::right
881  << std::setw(10) << mod.timesFailed << " " << std::right << std::setw(10)
882  << mod.timesExcept << " " << mod.moduleLabel << "";
883  ++bitpos;
884  }
885  }
886 
887  LogFwkVerbatim("FwkSummary") << "";
888  LogFwkVerbatim("FwkSummary") << "TrigReport "
889  << "---------- Module Summary ------------";
890  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Visited"
891  << " " << std::right << std::setw(10) << "Executed"
892  << " " << std::right << std::setw(10) << "Passed"
893  << " " << std::right << std::setw(10) << "Failed"
894  << " " << std::right << std::setw(10) << "Error"
895  << " "
896  << "Name"
897  << "";
898  for (auto const& worker : tr.workerSummaries) {
899  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << worker.timesVisited << " "
900  << std::right << std::setw(10) << worker.timesRun << " " << std::right
901  << std::setw(10) << worker.timesPassed << " " << std::right << std::setw(10)
902  << worker.timesFailed << " " << std::right << std::setw(10) << worker.timesExcept
903  << " " << worker.moduleLabel << "";
904  }
905  LogFwkVerbatim("FwkSummary") << "";
906  }
907  // The timing report (CPU and Real Time):
908  TriggerTimingReport tr;
910 
911  const int totalEvents = std::max(1, tr.eventSummary.totalEvents);
912 
913  LogFwkVerbatim("FwkSummary") << "TimeReport "
914  << "---------- Event Summary ---[sec]----";
915  LogFwkVerbatim("FwkSummary") << "TimeReport" << std::setprecision(6) << std::fixed
916  << " event loop CPU/event = " << tr.eventSummary.cpuTime / totalEvents;
917  LogFwkVerbatim("FwkSummary") << "TimeReport" << std::setprecision(6) << std::fixed
918  << " event loop Real/event = " << tr.eventSummary.realTime / totalEvents;
919  LogFwkVerbatim("FwkSummary") << "TimeReport" << std::setprecision(6) << std::fixed
920  << " sum Streams Real/event = " << tr.eventSummary.sumStreamRealTime / totalEvents;
921  LogFwkVerbatim("FwkSummary") << "TimeReport" << std::setprecision(6) << std::fixed
922  << " efficiency CPU/Real/thread = "
923  << tr.eventSummary.cpuTime / tr.eventSummary.realTime /
925 
926  constexpr int kColumn1Size = 10;
927  constexpr int kColumn2Size = 12;
928  constexpr int kColumn3Size = 12;
929  LogFwkVerbatim("FwkSummary") << "";
930  LogFwkVerbatim("FwkSummary") << "TimeReport "
931  << "---------- Path Summary ---[Real sec]----";
932  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
933  << " " << std::right << std::setw(kColumn2Size) << "per exec"
934  << " Name";
935  for (auto const& p : tr.trigPathSummaries) {
936  const int timesRun = std::max(1, p.timesRun);
937  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right
938  << std::setw(kColumn1Size) << p.realTime / totalEvents << " " << std::right
939  << std::setw(kColumn2Size) << p.realTime / timesRun << " " << p.name << "";
940  }
941  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
942  << " " << std::right << std::setw(kColumn2Size) << "per exec"
943  << " Name"
944  << "";
945 
946  LogFwkVerbatim("FwkSummary") << "";
947  LogFwkVerbatim("FwkSummary") << "TimeReport "
948  << "-------End-Path Summary ---[Real sec]----";
949  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
950  << " " << std::right << std::setw(kColumn2Size) << "per exec"
951  << " Name"
952  << "";
953  for (auto const& p : tr.endPathSummaries) {
954  const int timesRun = std::max(1, p.timesRun);
955 
956  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right
957  << std::setw(kColumn1Size) << p.realTime / totalEvents << " " << std::right
958  << std::setw(kColumn2Size) << p.realTime / timesRun << " " << p.name << "";
959  }
960  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
961  << " " << std::right << std::setw(kColumn2Size) << "per exec"
962  << " Name"
963  << "";
964 
965  for (auto const& p : tr.trigPathSummaries) {
966  LogFwkVerbatim("FwkSummary") << "";
967  LogFwkVerbatim("FwkSummary") << "TimeReport "
968  << "---------- Modules in Path: " << p.name << " ---[Real sec]----";
969  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
970  << " " << std::right << std::setw(kColumn2Size) << "per visit"
971  << " Name"
972  << "";
973  for (auto const& mod : p.moduleInPathSummaries) {
974  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right
975  << std::setw(kColumn1Size) << mod.realTime / totalEvents << " " << std::right
976  << std::setw(kColumn2Size) << mod.realTime / std::max(1, mod.timesVisited) << " "
977  << mod.moduleLabel << "";
978  }
979  }
980  if (not tr.trigPathSummaries.empty()) {
981  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
982  << " " << std::right << std::setw(kColumn2Size) << "per visit"
983  << " Name"
984  << "";
985  }
986  for (auto const& p : tr.endPathSummaries) {
987  LogFwkVerbatim("FwkSummary") << "";
988  LogFwkVerbatim("FwkSummary") << "TimeReport "
989  << "------ Modules in End-Path: " << p.name << " ---[Real sec]----";
990  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
991  << " " << std::right << std::setw(kColumn2Size) << "per visit"
992  << " Name"
993  << "";
994  for (auto const& mod : p.moduleInPathSummaries) {
995  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right
996  << std::setw(kColumn1Size) << mod.realTime / totalEvents << " " << std::right
997  << std::setw(kColumn2Size) << mod.realTime / std::max(1, mod.timesVisited) << " "
998  << mod.moduleLabel << "";
999  }
1000  }
1001  if (not tr.endPathSummaries.empty()) {
1002  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1003  << " " << std::right << std::setw(kColumn2Size) << "per visit"
1004  << " Name"
1005  << "";
1006  }
1007  LogFwkVerbatim("FwkSummary") << "";
1008  LogFwkVerbatim("FwkSummary") << "TimeReport "
1009  << "---------- Module Summary ---[Real sec]----";
1010  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1011  << " " << std::right << std::setw(kColumn2Size) << "per exec"
1012  << " " << std::right << std::setw(kColumn3Size) << "per visit"
1013  << " Name"
1014  << "";
1015  for (auto const& worker : tr.workerSummaries) {
1016  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right
1017  << std::setw(kColumn1Size) << worker.realTime / totalEvents << " " << std::right
1018  << std::setw(kColumn2Size) << worker.realTime / std::max(1, worker.timesRun) << " "
1019  << std::right << std::setw(kColumn3Size)
1020  << worker.realTime / std::max(1, worker.timesVisited) << " " << worker.moduleLabel
1021  << "";
1022  }
1023  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1024  << " " << std::right << std::setw(kColumn2Size) << "per exec"
1025  << " " << std::right << std::setw(kColumn3Size) << "per visit"
1026  << " Name"
1027  << "";
1028 
1029  LogFwkVerbatim("FwkSummary") << "";
1030  LogFwkVerbatim("FwkSummary") << "T---Report end!"
1031  << "";
1032  LogFwkVerbatim("FwkSummary") << "";
1033  }
void getTriggerTimingReport(TriggerTimingReport &rep) const
Definition: Schedule.cc:1351
int totalEvents() const
Definition: Schedule.cc:1358
void getTriggerReport(TriggerReport &rep) const
Definition: Schedule.cc:1341
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:306
PreallocationConfiguration preallocConfig_
Definition: Schedule.h:309
Log< level::FwkInfo, true > LogFwkVerbatim
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304
bool wantSummary_
Definition: Schedule.h:315
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4

◆ endPaths()

void edm::Schedule::endPaths ( std::vector< std::string > &  oLabelsToFill) const

adds to oLabelsToFill the labels for all end paths in the process

Definition at line 1272 of file Schedule.cc.

References endPathNames_.

1272 { oLabelsToFill = *endPathNames_; }
std::vector< std::string > const * endPathNames_
Definition: Schedule.h:314

◆ endStream()

void edm::Schedule::endStream ( unsigned int  iStreamID)

Definition at line 1170 of file Schedule.cc.

References cms::cuda::assert(), and streamSchedules_.

1170  {
1171  assert(iStreamID < streamSchedules_.size());
1172  streamSchedules_[iStreamID]->endStream();
1173  }
assert(be >=bs)
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ fillModuleAndConsumesInfo()

void edm::Schedule::fillModuleAndConsumesInfo ( std::vector< ModuleDescription const *> &  allModuleDescriptions,
std::vector< std::pair< unsigned int, unsigned int >> &  moduleIDToIndex,
std::array< std::vector< std::vector< ModuleDescription const *>>, NumBranchTypes > &  modulesWhoseProductsAreConsumedBy,
std::vector< std::vector< ModuleProcessName >> &  modulesInPreviousProcessesWhoseProductsAreConsumedBy,
ProductRegistry const &  preg 
) const

Definition at line 1290 of file Schedule.cc.

References cms::Exception::addContext(), allWorkers(), mps_fire::i, LogMessageMonitor_cff::modules, edm::NumBranchTypes, AlCaHLTBitMon_ParallelJobs::p, findQualityFiles::size, edm::sort_all(), and mitigatedMETSequence_cff::U.

1295  {
1296  allModuleDescriptions.clear();
1297  moduleIDToIndex.clear();
1298  for (auto iBranchType = 0U; iBranchType < NumBranchTypes; ++iBranchType) {
1299  modulesWhoseProductsAreConsumedBy[iBranchType].clear();
1300  }
1301  modulesInPreviousProcessesWhoseProductsAreConsumedBy.clear();
1302 
1303  allModuleDescriptions.reserve(allWorkers().size());
1304  moduleIDToIndex.reserve(allWorkers().size());
1305  for (auto iBranchType = 0U; iBranchType < NumBranchTypes; ++iBranchType) {
1306  modulesWhoseProductsAreConsumedBy[iBranchType].resize(allWorkers().size());
1307  }
1308  modulesInPreviousProcessesWhoseProductsAreConsumedBy.resize(allWorkers().size());
1309 
1310  std::map<std::string, ModuleDescription const*> labelToDesc;
1311  unsigned int i = 0;
1312  for (auto const& worker : allWorkers()) {
1313  ModuleDescription const* p = worker->description();
1314  allModuleDescriptions.push_back(p);
1315  moduleIDToIndex.push_back(std::pair<unsigned int, unsigned int>(p->id(), i));
1316  labelToDesc[p->moduleLabel()] = p;
1317  ++i;
1318  }
1319  sort_all(moduleIDToIndex);
1320 
1321  i = 0;
1322  for (auto const& worker : allWorkers()) {
1323  std::array<std::vector<ModuleDescription const*>*, NumBranchTypes> modules;
1324  for (auto iBranchType = 0U; iBranchType < NumBranchTypes; ++iBranchType) {
1325  modules[iBranchType] = &modulesWhoseProductsAreConsumedBy[iBranchType].at(i);
1326  }
1327 
1328  std::vector<ModuleProcessName>& modulesInPreviousProcesses =
1329  modulesInPreviousProcessesWhoseProductsAreConsumedBy.at(i);
1330  try {
1331  worker->modulesWhoseProductsAreConsumed(modules, modulesInPreviousProcesses, preg, labelToDesc);
1332  } catch (cms::Exception& ex) {
1333  ex.addContext("Calling Worker::modulesWhoseProductsAreConsumed() for module " +
1334  worker->description()->moduleLabel());
1335  throw;
1336  }
1337  ++i;
1338  }
1339  }
size
Write out results.
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:92
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1258
void addContext(std::string const &context)
Definition: Exception.cc:165

◆ getAllModuleDescriptions()

std::vector< ModuleDescription const * > edm::Schedule::getAllModuleDescriptions ( ) const

Return a vector allowing const access to all the ModuleDescriptions for this Schedule. *** N.B. *** Ownership of the ModuleDescriptions is not *** passed to the caller. Do not call delete on these *** pointers!

Definition at line 1247 of file Schedule.cc.

References allWorkers(), AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, and findQualityFiles::size.

Referenced by edm::ScheduleInfo::availableModuleLabels(), and edm::ScheduleInfo::parametersForModule().

1247  {
1248  std::vector<ModuleDescription const*> result;
1249  result.reserve(allWorkers().size());
1250 
1251  for (auto const& worker : allWorkers()) {
1252  ModuleDescription const* p = worker->description();
1253  result.push_back(p);
1254  }
1255  return result;
1256  }
size
Write out results.
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1258

◆ getTriggerReport()

void edm::Schedule::getTriggerReport ( TriggerReport rep) const

Return the trigger report information on paths, modules-in-path, modules-in-endpath, and modules.

Definition at line 1341 of file Schedule.cc.

References cuy::rep, alignCSCRings::s, edm::sort_all(), and streamSchedules_.

Referenced by endJob().

1341  {
1342  rep.eventSummary.totalEvents = 0;
1343  rep.eventSummary.totalEventsPassed = 0;
1344  rep.eventSummary.totalEventsFailed = 0;
1345  for (auto& s : streamSchedules_) {
1346  s->getTriggerReport(rep);
1347  }
1348  sort_all(rep.workerSummaries);
1349  }
rep
Definition: cuy.py:1189
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:92

◆ getTriggerTimingReport()

void edm::Schedule::getTriggerTimingReport ( TriggerTimingReport rep) const

Return the trigger timing report information on paths, modules-in-path, modules-in-endpath, and modules.

Definition at line 1351 of file Schedule.cc.

References cuy::rep, and summaryTimeKeeper_.

Referenced by endJob().

1351  {
1352  rep.eventSummary.totalEvents = 0;
1353  rep.eventSummary.cpuTime = 0.;
1354  rep.eventSummary.realTime = 0.;
1355  summaryTimeKeeper_->fillTriggerTimingReport(rep);
1356  }
edm::propagate_const< std::unique_ptr< SystemTimeKeeper > > summaryTimeKeeper_
Definition: Schedule.h:311
rep
Definition: cuy.py:1189

◆ initializeEarlyDelete()

void edm::Schedule::initializeEarlyDelete ( std::vector< std::string > const &  branchesToDeleteEarly,
edm::ProductRegistry const &  preg 
)

Definition at line 1240 of file Schedule.cc.

References moduleRegistry(), cms::cuda::stream, and streamSchedules_.

1241  {
1242  for (auto& stream : streamSchedules_) {
1243  stream->initializeEarlyDelete(*moduleRegistry(), branchesToDeleteEarly, preg);
1244  }
1245  }
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
std::shared_ptr< ModuleRegistry const > moduleRegistry() const
Definition: Schedule.h:297
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ limitOutput()

void edm::Schedule::limitOutput ( ParameterSet const &  proc_pset,
BranchIDLists const &  branchIDLists,
SubProcessParentageHelper const *  subProcessParentageHelper 
)
private

Definition at line 698 of file Schedule.cc.

References all_output_communicators_, c, edm::errors::Configuration, submitPVResolutionJobs::desc, edm::ParameterSet::empty(), Exception, edm::ParameterSet::getParameterNamesForType(), edm::ParameterSet::getParameterSetNames(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), HerwigMaxPtPartonFilter_cfi::moduleLabel, convertSQLitetoXML_cfg::output, edm::search_all(), and AlCaHLTBitMon_QueryRunRegistry::string.

700  {
701  std::string const output("output");
702 
703  ParameterSet const& maxEventsPSet = proc_pset.getUntrackedParameterSet("maxEvents");
704  int maxEventSpecs = 0;
705  int maxEventsOut = -1;
706  ParameterSet const* vMaxEventsOut = nullptr;
707  std::vector<std::string> intNamesE = maxEventsPSet.getParameterNamesForType<int>(false);
708  if (search_all(intNamesE, output)) {
709  maxEventsOut = maxEventsPSet.getUntrackedParameter<int>(output);
710  ++maxEventSpecs;
711  }
712  std::vector<std::string> psetNamesE;
713  maxEventsPSet.getParameterSetNames(psetNamesE, false);
714  if (search_all(psetNamesE, output)) {
715  vMaxEventsOut = &maxEventsPSet.getUntrackedParameterSet(output);
716  ++maxEventSpecs;
717  }
718 
719  if (maxEventSpecs > 1) {
721  << "\nAt most, one form of 'output' may appear in the 'maxEvents' parameter set";
722  }
723 
724  for (auto& c : all_output_communicators_) {
725  OutputModuleDescription desc(branchIDLists, maxEventsOut, subProcessParentageHelper);
726  if (vMaxEventsOut != nullptr && !vMaxEventsOut->empty()) {
727  std::string const& moduleLabel = c->description().moduleLabel();
728  try {
729  desc.maxEvents_ = vMaxEventsOut->getUntrackedParameter<int>(moduleLabel);
730  } catch (Exception const&) {
732  << "\nNo entry in 'maxEvents' for output module label '" << moduleLabel << "'.\n";
733  }
734  }
735  c->configure(desc);
736  }
737  }
bool search_all(ForwardSequence const &s, Datum const &d)
Definition: Algorithms.h:36
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:308

◆ moduleDescriptionsInEndPath()

void edm::Schedule::moduleDescriptionsInEndPath ( std::string const &  iEndPathLabel,
std::vector< ModuleDescription const *> &  descriptions,
unsigned int  hint 
) const

adds the ModuleDescriptions into the vector for the modules scheduled in path iEndPathLabel hint is a performance optimization if you might know the position of the module in the path

Definition at line 1284 of file Schedule.cc.

References streamSchedules_.

1286  {
1287  streamSchedules_[0]->moduleDescriptionsInEndPath(iEndPathLabel, descriptions, hint);
1288  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ moduleDescriptionsInPath()

void edm::Schedule::moduleDescriptionsInPath ( std::string const &  iPathLabel,
std::vector< ModuleDescription const *> &  descriptions,
unsigned int  hint 
) const

adds the ModuleDescriptions into the vector for the modules scheduled in path iPathLabel hint is a performance optimization if you might know the position of the module in the path

Definition at line 1278 of file Schedule.cc.

References streamSchedules_.

1280  {
1281  streamSchedules_[0]->moduleDescriptionsInPath(iPathLabel, descriptions, hint);
1282  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ moduleRegistry() [1/2]

std::shared_ptr<ModuleRegistry const> edm::Schedule::moduleRegistry ( ) const
inlineprivate

Definition at line 297 of file Schedule.h.

References edm::get_underlying_safe(), and moduleRegistry_.

Referenced by initializeEarlyDelete().

constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< ModuleRegistry > > moduleRegistry_
Definition: Schedule.h:303

◆ moduleRegistry() [2/2]

std::shared_ptr<ModuleRegistry>& edm::Schedule::moduleRegistry ( )
inlineprivate

Definition at line 298 of file Schedule.h.

References edm::get_underlying_safe(), and moduleRegistry_.

constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< ModuleRegistry > > moduleRegistry_
Definition: Schedule.h:303

◆ modulesInPath()

void edm::Schedule::modulesInPath ( std::string const &  iPathLabel,
std::vector< std::string > &  oLabelsToFill 
) const

adds to oLabelsToFill in execution order the labels of all modules in path iPathLabel

Definition at line 1274 of file Schedule.cc.

References streamSchedules_.

Referenced by edm::ScheduleInfo::modulesInPath().

1274  {
1275  streamSchedules_[0]->modulesInPath(iPathLabel, oLabelsToFill);
1276  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ openOutputFiles()

void edm::Schedule::openOutputFiles ( FileBlock fb)

Definition at line 1043 of file Schedule.cc.

References all_output_communicators_, edm::for_all(), and edm::OutputModuleCommunicator::openFile().

1043  {
1044  using std::placeholders::_1;
1045  for_all(all_output_communicators_, std::bind(&OutputModuleCommunicator::openFile, _1, std::cref(fb)));
1046  }
virtual void openFile(FileBlock const &fb)=0
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:308

◆ processOneEventAsync()

void edm::Schedule::processOneEventAsync ( WaitingTaskHolder  iTask,
unsigned int  iStreamID,
EventTransitionInfo info,
ServiceToken const &  token 
)

Definition at line 1175 of file Schedule.cc.

References cms::cuda::assert(), info(), eostools::move(), pathStatusInserters_, streamSchedules_, and unpackBuffers-CaloStage2::token.

1178  {
1179  assert(iStreamID < streamSchedules_.size());
1180  streamSchedules_[iStreamID]->processOneEventAsync(std::move(iTask), info, token, pathStatusInserters_);
1181  }
static const TGPicture * info(bool iBackgroundIsBlack)
assert(be >=bs)
std::vector< edm::propagate_const< std::shared_ptr< PathStatusInserter > > > pathStatusInserters_
Definition: Schedule.h:301
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304
def move(src, dest)
Definition: eostools.py:511

◆ processOneGlobalAsync()

template<typename T >
void edm::Schedule::processOneGlobalAsync ( WaitingTaskHolder  iTask,
typename T::TransitionInfoType &  transitionInfo,
ServiceToken const &  token,
bool  cleaningUpAfterException = false 
)

Definition at line 330 of file Schedule.h.

References globalSchedule_, and unpackBuffers-CaloStage2::token.

Referenced by edm::beginGlobalTransitionAsync(), and edm::endGlobalTransitionAsync().

333  {
334  globalSchedule_->processOneGlobalAsync<T>(iTaskHolder, transitionInfo, token, cleaningUpAfterException);
335  }
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:306
long double T

◆ processOneStreamAsync()

template<typename T >
void edm::Schedule::processOneStreamAsync ( WaitingTaskHolder  iTask,
unsigned int  iStreamID,
typename T::TransitionInfoType &  transitionInfo,
ServiceToken const &  token,
bool  cleaningUpAfterException = false 
)

Definition at line 319 of file Schedule.h.

References cms::cuda::assert(), eostools::move(), streamSchedules_, and unpackBuffers-CaloStage2::token.

Referenced by edm::beginStreamTransitionAsync(), and edm::endStreamTransitionAsync().

323  {
324  assert(iStreamID < streamSchedules_.size());
325  streamSchedules_[iStreamID]->processOneStreamAsync<T>(
326  std::move(iTaskHolder), transitionInfo, token, cleaningUpAfterException);
327  }
assert(be >=bs)
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304
long double T
def move(src, dest)
Definition: eostools.py:511

◆ respondToCloseInputFile()

void edm::Schedule::respondToCloseInputFile ( FileBlock const &  fb)

Definition at line 1154 of file Schedule.cc.

References allWorkers(), edm::for_all(), and edm::Worker::respondToCloseInputFile().

1154  {
1155  using std::placeholders::_1;
1156  for_all(allWorkers(), std::bind(&Worker::respondToCloseInputFile, _1, std::cref(fb)));
1157  }
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1258
void respondToCloseInputFile(FileBlock const &fb)
Definition: Worker.h:174

◆ respondToOpenInputFile()

void edm::Schedule::respondToOpenInputFile ( FileBlock const &  fb)

Definition at line 1149 of file Schedule.cc.

References allWorkers(), edm::for_all(), and edm::Worker::respondToOpenInputFile().

1149  {
1150  using std::placeholders::_1;
1151  for_all(allWorkers(), std::bind(&Worker::respondToOpenInputFile, _1, std::cref(fb)));
1152  }
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1258
void respondToOpenInputFile(FileBlock const &fb)
Definition: Worker.h:173

◆ resultsInserter() [1/2]

std::shared_ptr<TriggerResultInserter const> edm::Schedule::resultsInserter ( ) const
inlineprivate

Definition at line 293 of file Schedule.h.

References edm::get_underlying_safe(), and resultsInserter_.

293  {
295  }
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< TriggerResultInserter > > resultsInserter_
Definition: Schedule.h:300

◆ resultsInserter() [2/2]

std::shared_ptr<TriggerResultInserter>& edm::Schedule::resultsInserter ( )
inlineprivate

Definition at line 296 of file Schedule.h.

References edm::get_underlying_safe(), and resultsInserter_.

constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< TriggerResultInserter > > resultsInserter_
Definition: Schedule.h:300

◆ shouldWeCloseOutput()

bool edm::Schedule::shouldWeCloseOutput ( ) const

Definition at line 1140 of file Schedule.cc.

References all_output_communicators_, and edm::OutputModuleCommunicator::shouldWeCloseFile().

1140  {
1141  using std::placeholders::_1;
1142  // Return true iff at least one output module returns true.
1143  return (std::find_if(all_output_communicators_.begin(),
1147  }
virtual bool shouldWeCloseFile() const =0
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:308

◆ terminate()

bool edm::Schedule::terminate ( void  ) const

Return whether each output module has reached its maximum count.

Definition at line 739 of file Schedule.cc.

References all_output_communicators_, and c.

739  {
740  if (all_output_communicators_.empty()) {
741  return false;
742  }
743  for (auto& c : all_output_communicators_) {
744  if (!c->limitReached()) {
745  // Found an output module that has not reached output event count.
746  return false;
747  }
748  }
749  LogInfo("SuccessfulTermination") << "The job is terminating successfully because each output module\n"
750  << "has reached its configured limit.\n";
751  return true;
752  }
Log< level::Info, false > LogInfo
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:308

◆ totalEvents()

int edm::Schedule::totalEvents ( ) const

Return the number of events this Schedule has tried to process (inclues both successes and failures, including failures due to exceptions during processing).

Definition at line 1358 of file Schedule.cc.

References alignCSCRings::s, and streamSchedules_.

Referenced by endJob().

1358  {
1359  int returnValue = 0;
1360  for (auto& s : streamSchedules_) {
1361  returnValue += s->totalEvents();
1362  }
1363  return returnValue;
1364  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ totalEventsFailed()

int edm::Schedule::totalEventsFailed ( ) const

Return the number of events that have not passed any trigger. (N.B. totalEventsFailed() + totalEventsPassed() == totalEvents()

Definition at line 1374 of file Schedule.cc.

References alignCSCRings::s, and streamSchedules_.

1374  {
1375  int returnValue = 0;
1376  for (auto& s : streamSchedules_) {
1377  returnValue += s->totalEventsFailed();
1378  }
1379  return returnValue;
1380  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ totalEventsPassed()

int edm::Schedule::totalEventsPassed ( ) const

Return the number of events which have been passed by one or more trigger paths.

Definition at line 1366 of file Schedule.cc.

References alignCSCRings::s, and streamSchedules_.

1366  {
1367  int returnValue = 0;
1368  for (auto& s : streamSchedules_) {
1369  returnValue += s->totalEventsPassed();
1370  }
1371  return returnValue;
1372  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:304

◆ triggerPaths()

void edm::Schedule::triggerPaths ( std::vector< std::string > &  oLabelsToFill) const

Adds to oLabelsToFill the labels for all trigger paths in the process. This is different from availablePaths because it includes the empty paths to match the entries in TriggerResults exactly.

Definition at line 1270 of file Schedule.cc.

References pathNames_.

1270 { oLabelsToFill = *pathNames_; }
std::vector< std::string > const * pathNames_
Definition: Schedule.h:313

◆ writeLumiAsync()

void edm::Schedule::writeLumiAsync ( WaitingTaskHolder  iTask,
LuminosityBlockPrincipal const &  lbp,
ProcessContext const *  processContext,
ActivityRegistry activityRegistry 
)

Definition at line 1111 of file Schedule.cc.

References all_output_communicators_, edm::LuminosityBlockPrincipal::beginTime(), c, CMS_SA_ALLOW, first, edm::LuminosityBlockPrincipal::id(), edm::LuminosityBlockPrincipal::index(), edm::RunPrincipal::index(), edm::ServiceRegistry::instance(), edm::GlobalContext::kWriteLuminosityBlock, edm::ActivityRegistry::postGlobalWriteLumiSignal_, edm::ActivityRegistry::preGlobalWriteLumiSignal_, edm::ServiceRegistry::presentToken(), edm::waiting_task::chain::runLast(), edm::LuminosityBlockPrincipal::runPrincipal(), TrackValidation_cff::task, edm::waiting_task::chain::then(), and unpackBuffers-CaloStage2::token.

1114  {
1116  GlobalContext globalContext(GlobalContext::Transition::kWriteLuminosityBlock,
1117  lbp.id(),
1118  lbp.runPrincipal().index(),
1119  lbp.index(),
1120  lbp.beginTime(),
1121  processContext);
1122 
1123  using namespace edm::waiting_task;
1124  chain::first([&](auto nextTask) {
1126  CMS_SA_ALLOW try { activityRegistry->preGlobalWriteLumiSignal_(globalContext); } catch (...) {
1127  }
1128  for (auto& c : all_output_communicators_) {
1129  c->writeLumiAsync(nextTask, lbp, processContext, activityRegistry);
1130  }
1131  }) | chain::then(doCleanup([activityRegistry, globalContext, token]() {
1132  //services can depend on other services
1134 
1135  activityRegistry->postGlobalWriteLumiSignal_(globalContext);
1136  })) |
1138  }
#define CMS_SA_ALLOW
constexpr auto then(O &&iO)
Definition: chain_first.h:277
auto runLast(edm::WaitingTaskHolder iTask)
Definition: chain_first.h:297
static ServiceRegistry & instance()
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:308
ServiceToken presentToken() const

◆ writeProcessBlockAsync()

void edm::Schedule::writeProcessBlockAsync ( WaitingTaskHolder  iTask,
ProcessBlockPrincipal const &  pbp,
ProcessContext const *  processContext,
ActivityRegistry activityRegistry 
)

Definition at line 1081 of file Schedule.cc.

References all_output_communicators_, c, CMS_SA_ALLOW, first, edm::ServiceRegistry::instance(), edm::LuminosityBlockIndex::invalidLuminosityBlockIndex(), edm::RunIndex::invalidRunIndex(), edm::Timestamp::invalidTimestamp(), edm::GlobalContext::kWriteProcessBlock, eostools::move(), edm::ActivityRegistry::postWriteProcessBlockSignal_, edm::ServiceRegistry::presentToken(), edm::ActivityRegistry::preWriteProcessBlockSignal_, edm::waiting_task::chain::runLast(), TrackValidation_cff::task, edm::waiting_task::chain::then(), and unpackBuffers-CaloStage2::token.

1084  {
1086  GlobalContext globalContext(GlobalContext::Transition::kWriteProcessBlock,
1087  LuminosityBlockID(),
1091  processContext);
1092 
1093  using namespace edm::waiting_task;
1094  chain::first([&](auto nextTask) {
1095  // Propagating the exception would be nontrivial, and signal actions are not supposed to throw exceptions
1097  CMS_SA_ALLOW try { activityRegistry->preWriteProcessBlockSignal_(globalContext); } catch (...) {
1098  }
1099  for (auto& c : all_output_communicators_) {
1100  c->writeProcessBlockAsync(nextTask, pbp, processContext, activityRegistry);
1101  }
1102  }) | chain::then(doCleanup([activityRegistry, globalContext, token]() {
1103  //services can depend on other services
1105 
1106  activityRegistry->postWriteProcessBlockSignal_(globalContext);
1107  })) |
1109  }
#define CMS_SA_ALLOW
static Timestamp invalidTimestamp()
Definition: Timestamp.h:82
constexpr auto then(O &&iO)
Definition: chain_first.h:277
static RunIndex invalidRunIndex()
Definition: RunIndex.cc:9
auto runLast(edm::WaitingTaskHolder iTask)
Definition: chain_first.h:297
static ServiceRegistry & instance()
static LuminosityBlockIndex invalidLuminosityBlockIndex()
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:308
ServiceToken presentToken() const
def move(src, dest)
Definition: eostools.py:511

◆ writeRunAsync()

void edm::Schedule::writeRunAsync ( WaitingTaskHolder  iTask,
RunPrincipal const &  rp,
ProcessContext const *  processContext,
ActivityRegistry activityRegistry,
MergeableRunProductMetadata const *  mergeableRunProductMetadata 
)

Definition at line 1048 of file Schedule.cc.

References all_output_communicators_, c, CMS_SA_ALLOW, edm::RunPrincipal::endTime(), first, edm::RunPrincipal::index(), edm::ServiceRegistry::instance(), edm::LuminosityBlockIndex::invalidLuminosityBlockIndex(), edm::GlobalContext::kWriteRun, edm::ActivityRegistry::postGlobalWriteRunSignal_, edm::ActivityRegistry::preGlobalWriteRunSignal_, edm::ServiceRegistry::presentToken(), edm::RunPrincipal::run(), edm::waiting_task::chain::runLast(), TrackValidation_cff::task, edm::waiting_task::chain::then(), and unpackBuffers-CaloStage2::token.

1052  {
1054  GlobalContext globalContext(GlobalContext::Transition::kWriteRun,
1055  LuminosityBlockID(rp.run(), 0),
1056  rp.index(),
1058  rp.endTime(),
1059  processContext);
1060 
1061  using namespace edm::waiting_task;
1062  chain::first([&](auto nextTask) {
1063  //services can depend on other services
1065 
1066  // Propagating the exception would be nontrivial, and signal actions are not supposed to throw exceptions
1067  CMS_SA_ALLOW try { activityRegistry->preGlobalWriteRunSignal_(globalContext); } catch (...) {
1068  }
1069  for (auto& c : all_output_communicators_) {
1070  c->writeRunAsync(nextTask, rp, processContext, activityRegistry, mergeableRunProductMetadata);
1071  }
1072  }) | chain::then(doCleanup([activityRegistry, globalContext, token]() {
1073  //services can depend on other services
1075 
1076  activityRegistry->postGlobalWriteRunSignal_(globalContext);
1077  })) |
1079  }
#define CMS_SA_ALLOW
constexpr auto then(O &&iO)
Definition: chain_first.h:277
auto runLast(edm::WaitingTaskHolder iTask)
Definition: chain_first.h:297
static ServiceRegistry & instance()
static LuminosityBlockIndex invalidLuminosityBlockIndex()
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:308
ServiceToken presentToken() const

Member Data Documentation

◆ all_output_communicators_

AllOutputModuleCommunicators edm::Schedule::all_output_communicators_
private

◆ endPathNames_

std::vector<std::string> const* edm::Schedule::endPathNames_
private

Definition at line 314 of file Schedule.h.

Referenced by endPaths().

◆ endPathStatusInserters_

std::vector<edm::propagate_const<std::shared_ptr<EndPathStatusInserter> > > edm::Schedule::endPathStatusInserters_
private

Definition at line 302 of file Schedule.h.

◆ globalSchedule_

edm::propagate_const<std::unique_ptr<GlobalSchedule> > edm::Schedule::globalSchedule_
private

◆ moduleRegistry_

edm::propagate_const<std::shared_ptr<ModuleRegistry> > edm::Schedule::moduleRegistry_
private

Definition at line 303 of file Schedule.h.

Referenced by changeModule(), deleteModule(), and moduleRegistry().

◆ pathNames_

std::vector<std::string> const* edm::Schedule::pathNames_
private

Definition at line 313 of file Schedule.h.

Referenced by triggerPaths().

◆ pathStatusInserters_

std::vector<edm::propagate_const<std::shared_ptr<PathStatusInserter> > > edm::Schedule::pathStatusInserters_
private

Definition at line 301 of file Schedule.h.

Referenced by processOneEventAsync().

◆ preallocConfig_

PreallocationConfiguration edm::Schedule::preallocConfig_
private

Definition at line 309 of file Schedule.h.

Referenced by changeModule(), and endJob().

◆ resultsInserter_

edm::propagate_const<std::shared_ptr<TriggerResultInserter> > edm::Schedule::resultsInserter_
private

Definition at line 300 of file Schedule.h.

Referenced by resultsInserter().

◆ streamSchedules_

std::vector<edm::propagate_const<std::shared_ptr<StreamSchedule> > > edm::Schedule::streamSchedules_
private

◆ summaryTimeKeeper_

edm::propagate_const<std::unique_ptr<SystemTimeKeeper> > edm::Schedule::summaryTimeKeeper_
private

Definition at line 311 of file Schedule.h.

Referenced by getTriggerTimingReport().

◆ wantSummary_

bool edm::Schedule::wantSummary_
private

Definition at line 315 of file Schedule.h.

Referenced by endJob().