CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 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

Definition at line 126 of file Schedule.h.

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

Definition at line 125 of file Schedule.h.

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

Definition at line 124 of file Schedule.h.

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

Definition at line 128 of file Schedule.h.

Constructor & Destructor Documentation

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 671 of file Schedule.cc.

References edm::service::TriggerNamesService::getTrigPaths().

684  : //Only create a resultsInserter if there is a trigger path
685  resultsInserter_{tns.getTrigPaths().empty()
686  ? std::shared_ptr<TriggerResultInserter>{}
pathNames_ & tns()), endPathNames_(&tns.getEndPaths()), wantSummary_(tns.wantSummary()
Definition: Schedule.cc:691
edm::propagate_const< std::shared_ptr< TriggerResultInserter > > resultsInserter_
Definition: Schedule.h:298

Member Function Documentation

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

returns the collection of pointers to workers

Definition at line 1445 of file Schedule.cc.

References globalSchedule_.

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

1445 { return globalSchedule_->allWorkers(); }
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:304
void edm::Schedule::availablePaths ( std::vector< std::string > &  oLabelsToFill) const

adds to oLabelsToFill the labels for all paths in the process

Definition at line 1453 of file Schedule.cc.

References streamSchedules_.

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

1453  {
1454  streamSchedules_[0]->availablePaths(oLabelsToFill);
1455  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
void edm::Schedule::beginJob ( ProductRegistry const &  iRegistry,
eventsetup::ESRecordsToProxyIndices const &  iESIndices,
ProcessBlockHelperBase const &  processBlockHelperBase 
)

Definition at line 1353 of file Schedule.cc.

References globalSchedule_.

1355  {
1356  globalSchedule_->beginJob(iRegistry, iESIndices, processBlockHelperBase);
1357  }
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:304
void edm::Schedule::beginStream ( unsigned int  iStreamID)

Definition at line 1359 of file Schedule.cc.

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

1359  {
1360  assert(iStreamID < streamSchedules_.size());
1361  streamSchedules_[iStreamID]->beginStream();
1362  }
assert(be >=bs)
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
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 1377 of file Schedule.cc.

References allWorkers(), globalSchedule_, edm::InEvent, edm::InLumi, edm::InProcess, edm::InRun, moduleRegistry_, preallocConfig_, edm::ProductRegistry::productLookup(), edm::Worker::resolvePutIndicies(), streamSchedules_, and edm::Worker::updateLookup().

1380  {
1381  Worker* found = nullptr;
1382  for (auto const& worker : allWorkers()) {
1383  if (worker->description()->moduleLabel() == iLabel) {
1384  found = worker;
1385  break;
1386  }
1387  }
1388  if (nullptr == found) {
1389  return false;
1390  }
1391 
1392  auto newMod = moduleRegistry_->replaceModule(iLabel, iPSet, preallocConfig_);
1393 
1394  globalSchedule_->replaceModule(newMod, iLabel);
1395 
1396  for (auto& s : streamSchedules_) {
1397  s->replaceModule(newMod, iLabel);
1398  }
1399 
1400  {
1401  //Need to updateLookup in order to make getByToken work
1402  auto const processBlockLookup = iRegistry.productLookup(InProcess);
1403  auto const runLookup = iRegistry.productLookup(InRun);
1404  auto const lumiLookup = iRegistry.productLookup(InLumi);
1405  auto const eventLookup = iRegistry.productLookup(InEvent);
1406  found->updateLookup(InProcess, *runLookup);
1407  found->updateLookup(InRun, *runLookup);
1408  found->updateLookup(InLumi, *lumiLookup);
1409  found->updateLookup(InEvent, *eventLookup);
1410  found->updateLookup(iIndices);
1411 
1412  auto const& processName = newMod->moduleDescription().processName();
1413  auto const& processBlockModuleToIndicies = processBlockLookup->indiciesForModulesInProcess(processName);
1414  auto const& runModuleToIndicies = runLookup->indiciesForModulesInProcess(processName);
1415  auto const& lumiModuleToIndicies = lumiLookup->indiciesForModulesInProcess(processName);
1416  auto const& eventModuleToIndicies = eventLookup->indiciesForModulesInProcess(processName);
1417  found->resolvePutIndicies(InProcess, processBlockModuleToIndicies);
1418  found->resolvePutIndicies(InRun, runModuleToIndicies);
1419  found->resolvePutIndicies(InLumi, lumiModuleToIndicies);
1420  found->resolvePutIndicies(InEvent, eventModuleToIndicies);
1421  }
1422 
1423  return true;
1424  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1445
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:304
edm::propagate_const< std::shared_ptr< ModuleRegistry > > moduleRegistry_
Definition: Schedule.h:301
PreallocationConfiguration preallocConfig_
Definition: Schedule.h:307
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
void edm::Schedule::clearCounters ( )

Clear all the counters in the trigger report.

Definition at line 1569 of file Schedule.cc.

References streamSchedules_.

1569  {
1570  for (auto& s : streamSchedules_) {
1571  s->clearCounters();
1572  }
1573  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
void edm::Schedule::closeOutputFiles ( )

Definition at line 1229 of file Schedule.cc.

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

1229  {
1230  using std::placeholders::_1;
1232  for (auto& worker : allWorkers()) {
1233  worker->respondToCloseOutputFile();
1234  }
1235  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1445
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:306
void edm::Schedule::convertCurrentProcessAlias ( std::string const &  processName)

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

Definition at line 1447 of file Schedule.cc.

References allWorkers().

1447  {
1448  for (auto const& worker : allWorkers()) {
1449  worker->convertCurrentProcessAlias(processName);
1450  }
1451  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1445
void edm::Schedule::deleteModule ( std::string const &  iLabel,
ActivityRegistry areg 
)

Deletes module with label iLabel.

Definition at line 1426 of file Schedule.cc.

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

1426  {
1427  globalSchedule_->deleteModule(iLabel);
1428  for (auto& stream : streamSchedules_) {
1429  stream->deleteModule(iLabel);
1430  }
1431  moduleRegistry_->deleteModule(iLabel, areg->preModuleDestructionSignal_, areg->postModuleDestructionSignal_);
1432  }
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:304
edm::propagate_const< std::shared_ptr< ModuleRegistry > > moduleRegistry_
Definition: Schedule.h:301
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
void edm::Schedule::endJob ( ExceptionCollector collector)

Definition at line 946 of file Schedule.cc.

References visDQMUpload::context, edm::EventTimingSummary::cpuTime, edm::TriggerTimingReport::endPathSummaries, edm::TriggerReport::endPathSummaries, edm::TriggerTimingReport::eventSummary, edm::TriggerReport::eventSummary, 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.

946  {
947  globalSchedule_->endJob(collector);
948  if (collector.hasThrown()) {
949  return;
950  }
951 
952  if (wantSummary_ == false)
953  return;
954  {
955  TriggerReport tr;
956  getTriggerReport(tr);
957 
958  // The trigger report (pass/fail etc.):
959 
960  LogFwkVerbatim("FwkSummary") << "";
961  if (streamSchedules_[0]->context().processContext()->isSubProcess()) {
962  LogFwkVerbatim("FwkSummary") << "TrigReport Process: "
963  << streamSchedules_[0]->context().processContext()->processName();
964  }
965  LogFwkVerbatim("FwkSummary") << "TrigReport "
966  << "---------- Event Summary ------------";
967  if (!tr.trigPathSummaries.empty()) {
968  LogFwkVerbatim("FwkSummary") << "TrigReport"
969  << " Events total = " << tr.eventSummary.totalEvents
970  << " passed = " << tr.eventSummary.totalEventsPassed
971  << " failed = " << tr.eventSummary.totalEventsFailed << "";
972  } else {
973  LogFwkVerbatim("FwkSummary") << "TrigReport"
974  << " Events total = " << tr.eventSummary.totalEvents
975  << " passed = " << tr.eventSummary.totalEvents << " failed = 0";
976  }
977 
978  LogFwkVerbatim("FwkSummary") << "";
979  LogFwkVerbatim("FwkSummary") << "TrigReport "
980  << "---------- Path Summary ------------";
981  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#"
982  << " " << std::right << std::setw(10) << "Executed"
983  << " " << std::right << std::setw(10) << "Passed"
984  << " " << std::right << std::setw(10) << "Failed"
985  << " " << std::right << std::setw(10) << "Error"
986  << " "
987  << "Name"
988  << "";
989  for (auto const& p : tr.trigPathSummaries) {
990  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 1 << std::right << std::setw(5)
991  << p.bitPosition << " " << std::right << std::setw(10) << p.timesRun << " "
992  << std::right << std::setw(10) << p.timesPassed << " " << std::right
993  << std::setw(10) << p.timesFailed << " " << std::right << std::setw(10)
994  << p.timesExcept << " " << p.name << "";
995  }
996 
997  /*
998  std::vector<int>::const_iterator epi = empty_trig_paths_.begin();
999  std::vector<int>::const_iterator epe = empty_trig_paths_.end();
1000  std::vector<std::string>::const_iterator epn = empty_trig_path_names_.begin();
1001  for (; epi != epe; ++epi, ++epn) {
1002 
1003  LogFwkVerbatim("FwkSummary") << "TrigReport "
1004  << std::right << std::setw(5) << 1
1005  << std::right << std::setw(5) << *epi << " "
1006  << std::right << std::setw(10) << totalEvents() << " "
1007  << std::right << std::setw(10) << totalEvents() << " "
1008  << std::right << std::setw(10) << 0 << " "
1009  << std::right << std::setw(10) << 0 << " "
1010  << *epn << "";
1011  }
1012  */
1013 
1014  LogFwkVerbatim("FwkSummary") << "";
1015  LogFwkVerbatim("FwkSummary") << "TrigReport "
1016  << "-------End-Path Summary ------------";
1017  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#"
1018  << " " << std::right << std::setw(10) << "Executed"
1019  << " " << std::right << std::setw(10) << "Passed"
1020  << " " << std::right << std::setw(10) << "Failed"
1021  << " " << std::right << std::setw(10) << "Error"
1022  << " "
1023  << "Name"
1024  << "";
1025  for (auto const& p : tr.endPathSummaries) {
1026  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 0 << std::right << std::setw(5)
1027  << p.bitPosition << " " << std::right << std::setw(10) << p.timesRun << " "
1028  << std::right << std::setw(10) << p.timesPassed << " " << std::right
1029  << std::setw(10) << p.timesFailed << " " << std::right << std::setw(10)
1030  << p.timesExcept << " " << p.name << "";
1031  }
1032 
1033  for (auto const& p : tr.trigPathSummaries) {
1034  LogFwkVerbatim("FwkSummary") << "";
1035  LogFwkVerbatim("FwkSummary") << "TrigReport "
1036  << "---------- Modules in Path: " << p.name << " ------------";
1037  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#"
1038  << " " << std::right << std::setw(10) << "Visited"
1039  << " " << std::right << std::setw(10) << "Passed"
1040  << " " << std::right << std::setw(10) << "Failed"
1041  << " " << std::right << std::setw(10) << "Error"
1042  << " "
1043  << "Name"
1044  << "";
1045 
1046  unsigned int bitpos = 0;
1047  for (auto const& mod : p.moduleInPathSummaries) {
1048  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 1 << std::right << std::setw(5)
1049  << bitpos << " " << std::right << std::setw(10) << mod.timesVisited << " "
1050  << std::right << std::setw(10) << mod.timesPassed << " " << std::right
1051  << std::setw(10) << mod.timesFailed << " " << std::right << std::setw(10)
1052  << mod.timesExcept << " " << mod.moduleLabel << "";
1053  ++bitpos;
1054  }
1055  }
1056 
1057  for (auto const& p : tr.endPathSummaries) {
1058  LogFwkVerbatim("FwkSummary") << "";
1059  LogFwkVerbatim("FwkSummary") << "TrigReport "
1060  << "------ Modules in End-Path: " << p.name << " ------------";
1061  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#"
1062  << " " << std::right << std::setw(10) << "Visited"
1063  << " " << std::right << std::setw(10) << "Passed"
1064  << " " << std::right << std::setw(10) << "Failed"
1065  << " " << std::right << std::setw(10) << "Error"
1066  << " "
1067  << "Name"
1068  << "";
1069 
1070  unsigned int bitpos = 0;
1071  for (auto const& mod : p.moduleInPathSummaries) {
1072  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 0 << std::right << std::setw(5)
1073  << bitpos << " " << std::right << std::setw(10) << mod.timesVisited << " "
1074  << std::right << std::setw(10) << mod.timesPassed << " " << std::right
1075  << std::setw(10) << mod.timesFailed << " " << std::right << std::setw(10)
1076  << mod.timesExcept << " " << mod.moduleLabel << "";
1077  ++bitpos;
1078  }
1079  }
1080 
1081  LogFwkVerbatim("FwkSummary") << "";
1082  LogFwkVerbatim("FwkSummary") << "TrigReport "
1083  << "---------- Module Summary ------------";
1084  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Visited"
1085  << " " << std::right << std::setw(10) << "Executed"
1086  << " " << std::right << std::setw(10) << "Passed"
1087  << " " << std::right << std::setw(10) << "Failed"
1088  << " " << std::right << std::setw(10) << "Error"
1089  << " "
1090  << "Name"
1091  << "";
1092  for (auto const& worker : tr.workerSummaries) {
1093  LogFwkVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << worker.timesVisited << " "
1094  << std::right << std::setw(10) << worker.timesRun << " " << std::right
1095  << std::setw(10) << worker.timesPassed << " " << std::right << std::setw(10)
1096  << worker.timesFailed << " " << std::right << std::setw(10) << worker.timesExcept
1097  << " " << worker.moduleLabel << "";
1098  }
1099  LogFwkVerbatim("FwkSummary") << "";
1100  }
1101  // The timing report (CPU and Real Time):
1102  TriggerTimingReport tr;
1104 
1105  const int totalEvents = std::max(1, tr.eventSummary.totalEvents);
1106 
1107  LogFwkVerbatim("FwkSummary") << "TimeReport "
1108  << "---------- Event Summary ---[sec]----";
1109  LogFwkVerbatim("FwkSummary") << "TimeReport" << std::setprecision(6) << std::fixed
1110  << " event loop CPU/event = " << tr.eventSummary.cpuTime / totalEvents;
1111  LogFwkVerbatim("FwkSummary") << "TimeReport" << std::setprecision(6) << std::fixed
1112  << " event loop Real/event = " << tr.eventSummary.realTime / totalEvents;
1113  LogFwkVerbatim("FwkSummary") << "TimeReport" << std::setprecision(6) << std::fixed
1114  << " sum Streams Real/event = " << tr.eventSummary.sumStreamRealTime / totalEvents;
1115  LogFwkVerbatim("FwkSummary") << "TimeReport" << std::setprecision(6) << std::fixed
1116  << " efficiency CPU/Real/thread = "
1117  << tr.eventSummary.cpuTime / tr.eventSummary.realTime /
1119 
1120  constexpr int kColumn1Size = 10;
1121  constexpr int kColumn2Size = 12;
1122  constexpr int kColumn3Size = 12;
1123  LogFwkVerbatim("FwkSummary") << "";
1124  LogFwkVerbatim("FwkSummary") << "TimeReport "
1125  << "---------- Path Summary ---[Real sec]----";
1126  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1127  << " " << std::right << std::setw(kColumn2Size) << "per exec"
1128  << " Name";
1129  for (auto const& p : tr.trigPathSummaries) {
1130  const int timesRun = std::max(1, p.timesRun);
1131  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right
1132  << std::setw(kColumn1Size) << p.realTime / totalEvents << " " << std::right
1133  << std::setw(kColumn2Size) << p.realTime / timesRun << " " << p.name << "";
1134  }
1135  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1136  << " " << std::right << std::setw(kColumn2Size) << "per exec"
1137  << " Name"
1138  << "";
1139 
1140  LogFwkVerbatim("FwkSummary") << "";
1141  LogFwkVerbatim("FwkSummary") << "TimeReport "
1142  << "-------End-Path Summary ---[Real sec]----";
1143  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1144  << " " << std::right << std::setw(kColumn2Size) << "per exec"
1145  << " Name"
1146  << "";
1147  for (auto const& p : tr.endPathSummaries) {
1148  const int timesRun = std::max(1, p.timesRun);
1149 
1150  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right
1151  << std::setw(kColumn1Size) << p.realTime / totalEvents << " " << std::right
1152  << std::setw(kColumn2Size) << p.realTime / timesRun << " " << p.name << "";
1153  }
1154  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1155  << " " << std::right << std::setw(kColumn2Size) << "per exec"
1156  << " Name"
1157  << "";
1158 
1159  for (auto const& p : tr.trigPathSummaries) {
1160  LogFwkVerbatim("FwkSummary") << "";
1161  LogFwkVerbatim("FwkSummary") << "TimeReport "
1162  << "---------- Modules in Path: " << p.name << " ---[Real sec]----";
1163  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1164  << " " << std::right << std::setw(kColumn2Size) << "per visit"
1165  << " Name"
1166  << "";
1167  for (auto const& mod : p.moduleInPathSummaries) {
1168  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right
1169  << std::setw(kColumn1Size) << mod.realTime / totalEvents << " " << std::right
1170  << std::setw(kColumn2Size) << mod.realTime / std::max(1, mod.timesVisited) << " "
1171  << mod.moduleLabel << "";
1172  }
1173  }
1174  if (not tr.trigPathSummaries.empty()) {
1175  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1176  << " " << std::right << std::setw(kColumn2Size) << "per visit"
1177  << " Name"
1178  << "";
1179  }
1180  for (auto const& p : tr.endPathSummaries) {
1181  LogFwkVerbatim("FwkSummary") << "";
1182  LogFwkVerbatim("FwkSummary") << "TimeReport "
1183  << "------ Modules in End-Path: " << p.name << " ---[Real sec]----";
1184  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1185  << " " << std::right << std::setw(kColumn2Size) << "per visit"
1186  << " Name"
1187  << "";
1188  for (auto const& mod : p.moduleInPathSummaries) {
1189  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right
1190  << std::setw(kColumn1Size) << mod.realTime / totalEvents << " " << std::right
1191  << std::setw(kColumn2Size) << mod.realTime / std::max(1, mod.timesVisited) << " "
1192  << mod.moduleLabel << "";
1193  }
1194  }
1195  if (not tr.endPathSummaries.empty()) {
1196  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1197  << " " << std::right << std::setw(kColumn2Size) << "per visit"
1198  << " Name"
1199  << "";
1200  }
1201  LogFwkVerbatim("FwkSummary") << "";
1202  LogFwkVerbatim("FwkSummary") << "TimeReport "
1203  << "---------- Module Summary ---[Real sec]----";
1204  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1205  << " " << std::right << std::setw(kColumn2Size) << "per exec"
1206  << " " << std::right << std::setw(kColumn3Size) << "per visit"
1207  << " Name"
1208  << "";
1209  for (auto const& worker : tr.workerSummaries) {
1210  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right
1211  << std::setw(kColumn1Size) << worker.realTime / totalEvents << " " << std::right
1212  << std::setw(kColumn2Size) << worker.realTime / std::max(1, worker.timesRun) << " "
1213  << std::right << std::setw(kColumn3Size)
1214  << worker.realTime / std::max(1, worker.timesVisited) << " " << worker.moduleLabel
1215  << "";
1216  }
1217  LogFwkVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(kColumn1Size) << "per event"
1218  << " " << std::right << std::setw(kColumn2Size) << "per exec"
1219  << " " << std::right << std::setw(kColumn3Size) << "per visit"
1220  << " Name"
1221  << "";
1222 
1223  LogFwkVerbatim("FwkSummary") << "";
1224  LogFwkVerbatim("FwkSummary") << "T---Report end!"
1225  << "";
1226  LogFwkVerbatim("FwkSummary") << "";
1227  }
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:304
int totalEvents() const
Definition: Schedule.cc:1545
void getTriggerReport(TriggerReport &rep) const
Definition: Schedule.cc:1528
PreallocationConfiguration preallocConfig_
Definition: Schedule.h:307
Log< level::FwkInfo, true > LogFwkVerbatim
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
bool wantSummary_
Definition: Schedule.h:313
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
void getTriggerTimingReport(TriggerTimingReport &rep) const
Definition: Schedule.cc:1538
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 1459 of file Schedule.cc.

References endPathNames_.

Referenced by edm::PathsAndConsumesOfModules::initialize().

1459 { oLabelsToFill = *endPathNames_; }
std::vector< std::string > const * endPathNames_
Definition: Schedule.h:312
void edm::Schedule::endStream ( unsigned int  iStreamID)

Definition at line 1364 of file Schedule.cc.

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

1364  {
1365  assert(iStreamID < streamSchedules_.size());
1366  streamSchedules_[iStreamID]->endStream();
1367  }
assert(be >=bs)
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
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 1477 of file Schedule.cc.

References cms::Exception::addContext(), allWorkers(), mps_fire::i, edm::ModuleDescription::id(), edm::ModuleDescription::moduleLabel(), TrackingSourceConfig_Tier0_Cosmic_cff::modules, edm::NumBranchTypes, AlCaHLTBitMon_ParallelJobs::p, findQualityFiles::size, and edm::sort_all().

Referenced by edm::PathsAndConsumesOfModules::initialize().

1482  {
1483  allModuleDescriptions.clear();
1484  moduleIDToIndex.clear();
1485  for (auto iBranchType = 0U; iBranchType < NumBranchTypes; ++iBranchType) {
1486  modulesWhoseProductsAreConsumedBy[iBranchType].clear();
1487  }
1488  modulesInPreviousProcessesWhoseProductsAreConsumedBy.clear();
1489 
1490  allModuleDescriptions.reserve(allWorkers().size());
1491  moduleIDToIndex.reserve(allWorkers().size());
1492  for (auto iBranchType = 0U; iBranchType < NumBranchTypes; ++iBranchType) {
1493  modulesWhoseProductsAreConsumedBy[iBranchType].resize(allWorkers().size());
1494  }
1495  modulesInPreviousProcessesWhoseProductsAreConsumedBy.resize(allWorkers().size());
1496 
1497  std::map<std::string, ModuleDescription const*> labelToDesc;
1498  unsigned int i = 0;
1499  for (auto const& worker : allWorkers()) {
1500  ModuleDescription const* p = worker->description();
1501  allModuleDescriptions.push_back(p);
1502  moduleIDToIndex.push_back(std::pair<unsigned int, unsigned int>(p->id(), i));
1503  labelToDesc[p->moduleLabel()] = p;
1504  ++i;
1505  }
1506  sort_all(moduleIDToIndex);
1507 
1508  i = 0;
1509  for (auto const& worker : allWorkers()) {
1510  std::array<std::vector<ModuleDescription const*>*, NumBranchTypes> modules;
1511  for (auto iBranchType = 0U; iBranchType < NumBranchTypes; ++iBranchType) {
1512  modules[iBranchType] = &modulesWhoseProductsAreConsumedBy[iBranchType].at(i);
1513  }
1514 
1515  std::vector<ModuleProcessName>& modulesInPreviousProcesses =
1516  modulesInPreviousProcessesWhoseProductsAreConsumedBy.at(i);
1517  try {
1518  worker->modulesWhoseProductsAreConsumed(modules, modulesInPreviousProcesses, preg, labelToDesc);
1519  } catch (cms::Exception& ex) {
1520  ex.addContext("Calling Worker::modulesWhoseProductsAreConsumed() for module " +
1521  worker->description()->moduleLabel());
1522  throw;
1523  }
1524  ++i;
1525  }
1526  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1445
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:92
void addContext(std::string const &context)
Definition: Exception.cc:165
preg
Definition: Schedule.cc:687
tuple size
Write out results.
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 1434 of file Schedule.cc.

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

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

1434  {
1435  std::vector<ModuleDescription const*> result;
1436  result.reserve(allWorkers().size());
1437 
1438  for (auto const& worker : allWorkers()) {
1439  ModuleDescription const* p = worker->description();
1440  result.push_back(p);
1441  }
1442  return result;
1443  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1445
tuple result
Definition: mps_fire.py:311
tuple size
Write out results.
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 1528 of file Schedule.cc.

References edm::TriggerReport::eventSummary, edm::sort_all(), streamSchedules_, edm::EventSummary::totalEvents, edm::EventSummary::totalEventsFailed, edm::EventSummary::totalEventsPassed, and edm::TriggerReport::workerSummaries.

Referenced by endJob().

1528  {
1529  rep.eventSummary.totalEvents = 0;
1530  rep.eventSummary.totalEventsPassed = 0;
1531  rep.eventSummary.totalEventsFailed = 0;
1532  for (auto& s : streamSchedules_) {
1533  s->getTriggerReport(rep);
1534  }
1535  sort_all(rep.workerSummaries);
1536  }
string rep
Definition: cuy.py:1189
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:92
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 1538 of file Schedule.cc.

References edm::EventTimingSummary::cpuTime, edm::TriggerTimingReport::eventSummary, edm::EventTimingSummary::realTime, summaryTimeKeeper_, and edm::EventTimingSummary::totalEvents.

Referenced by endJob().

1538  {
1539  rep.eventSummary.totalEvents = 0;
1540  rep.eventSummary.cpuTime = 0.;
1541  rep.eventSummary.realTime = 0.;
1542  summaryTimeKeeper_->fillTriggerTimingReport(rep);
1543  }
string rep
Definition: cuy.py:1189
edm::propagate_const< std::unique_ptr< SystemTimeKeeper > > summaryTimeKeeper_
Definition: Schedule.h:309
void edm::Schedule::limitOutput ( ParameterSet const &  proc_pset,
BranchIDLists const &  branchIDLists,
SubProcessParentageHelper const *  subProcessParentageHelper 
)
private

Definition at line 890 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(), edm::OutputModuleDescription::maxEvents_, convertSQLitetoXML_cfg::output, edm::search_all(), and AlCaHLTBitMon_QueryRunRegistry::string.

892  {
893  std::string const output("output");
894 
895  ParameterSet const& maxEventsPSet = proc_pset.getUntrackedParameterSet("maxEvents");
896  int maxEventSpecs = 0;
897  int maxEventsOut = -1;
898  ParameterSet const* vMaxEventsOut = nullptr;
899  std::vector<std::string> intNamesE = maxEventsPSet.getParameterNamesForType<int>(false);
900  if (search_all(intNamesE, output)) {
901  maxEventsOut = maxEventsPSet.getUntrackedParameter<int>(output);
902  ++maxEventSpecs;
903  }
904  std::vector<std::string> psetNamesE;
905  maxEventsPSet.getParameterSetNames(psetNamesE, false);
906  if (search_all(psetNamesE, output)) {
907  vMaxEventsOut = &maxEventsPSet.getUntrackedParameterSet(output);
908  ++maxEventSpecs;
909  }
910 
911  if (maxEventSpecs > 1) {
913  << "\nAt most, one form of 'output' may appear in the 'maxEvents' parameter set";
914  }
915 
916  for (auto& c : all_output_communicators_) {
917  OutputModuleDescription desc(branchIDLists, maxEventsOut, subProcessParentageHelper);
918  if (vMaxEventsOut != nullptr && !vMaxEventsOut->empty()) {
919  std::string const& moduleLabel = c->description().moduleLabel();
920  try {
921  desc.maxEvents_ = vMaxEventsOut->getUntrackedParameter<int>(moduleLabel);
922  } catch (Exception const&) {
924  << "\nNo entry in 'maxEvents' for output module label '" << moduleLabel << "'.\n";
925  }
926  }
927  c->configure(desc);
928  }
929  }
const edm::EventSetup & c
bool search_all(ForwardSequence const &s, Datum const &d)
Definition: Algorithms.h:36
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:306
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 1471 of file Schedule.cc.

References streamSchedules_.

Referenced by edm::PathsAndConsumesOfModules::initialize().

1473  {
1474  streamSchedules_[0]->moduleDescriptionsInEndPath(iEndPathLabel, descriptions, hint);
1475  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
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 1465 of file Schedule.cc.

References streamSchedules_.

Referenced by edm::PathsAndConsumesOfModules::initialize().

1467  {
1468  streamSchedules_[0]->moduleDescriptionsInPath(iPathLabel, descriptions, hint);
1469  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
std::shared_ptr<ModuleRegistry const> edm::Schedule::moduleRegistry ( ) const
inlineprivate

Definition at line 295 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:301
std::shared_ptr<ModuleRegistry>& edm::Schedule::moduleRegistry ( )
inlineprivate

Definition at line 296 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:301
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 1461 of file Schedule.cc.

References streamSchedules_.

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

1461  {
1462  streamSchedules_[0]->modulesInPath(iPathLabel, oLabelsToFill);
1463  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
void edm::Schedule::openOutputFiles ( FileBlock fb)

Definition at line 1237 of file Schedule.cc.

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

1237  {
1238  using std::placeholders::_1;
1239  for_all(all_output_communicators_, std::bind(&OutputModuleCommunicator::openFile, _1, std::cref(fb)));
1240  }
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:306
void edm::Schedule::processOneEventAsync ( WaitingTaskHolder  iTask,
unsigned int  iStreamID,
EventTransitionInfo info,
ServiceToken const &  token 
)

Definition at line 1369 of file Schedule.cc.

References cms::cuda::assert(), eostools::move(), pathStatusInserters_, and streamSchedules_.

1372  {
1373  assert(iStreamID < streamSchedules_.size());
1374  streamSchedules_[iStreamID]->processOneEventAsync(std::move(iTask), info, token, pathStatusInserters_);
1375  }
static const TGPicture * info(bool iBackgroundIsBlack)
assert(be >=bs)
std::vector< edm::propagate_const< std::shared_ptr< PathStatusInserter > > > pathStatusInserters_
Definition: Schedule.h:299
def move
Definition: eostools.py:511
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
template<typename T >
void edm::Schedule::processOneGlobalAsync ( WaitingTaskHolder  iTask,
typename T::TransitionInfoType &  transitionInfo,
ServiceToken const &  token,
bool  cleaningUpAfterException = false 
)

Definition at line 328 of file Schedule.h.

References globalSchedule_, and unpackBuffers-CaloStage2::token.

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

331  {
332  globalSchedule_->processOneGlobalAsync<T>(iTaskHolder, transitionInfo, token, cleaningUpAfterException);
333  }
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:304
long double T
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 317 of file Schedule.h.

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

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

321  {
322  assert(iStreamID < streamSchedules_.size());
323  streamSchedules_[iStreamID]->processOneStreamAsync<T>(
324  std::move(iTaskHolder), transitionInfo, token, cleaningUpAfterException);
325  }
assert(be >=bs)
def move
Definition: eostools.py:511
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
long double T
void edm::Schedule::respondToCloseInputFile ( FileBlock const &  fb)

Definition at line 1348 of file Schedule.cc.

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

1348  {
1349  using std::placeholders::_1;
1350  for_all(allWorkers(), std::bind(&Worker::respondToCloseInputFile, _1, std::cref(fb)));
1351  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1445
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
void respondToCloseInputFile(FileBlock const &fb)
Definition: Worker.h:174
void edm::Schedule::respondToOpenInputFile ( FileBlock const &  fb)

Definition at line 1343 of file Schedule.cc.

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

1343  {
1344  using std::placeholders::_1;
1345  for_all(allWorkers(), std::bind(&Worker::respondToOpenInputFile, _1, std::cref(fb)));
1346  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1445
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
void respondToOpenInputFile(FileBlock const &fb)
Definition: Worker.h:173
std::shared_ptr<TriggerResultInserter const> edm::Schedule::resultsInserter ( ) const
inlineprivate

Definition at line 291 of file Schedule.h.

References edm::get_underlying_safe(), and resultsInserter_.

291  {
293  }
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:298
std::shared_ptr<TriggerResultInserter>& edm::Schedule::resultsInserter ( )
inlineprivate

Definition at line 294 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:298
bool edm::Schedule::shouldWeCloseOutput ( ) const

Definition at line 1334 of file Schedule.cc.

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

1334  {
1335  using std::placeholders::_1;
1336  // Return true iff at least one output module returns true.
1337  return (std::find_if(all_output_communicators_.begin(),
1341  }
virtual bool shouldWeCloseFile() const =0
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:306
bool edm::Schedule::terminate ( void  ) const

Return whether each output module has reached its maximum count.

Definition at line 931 of file Schedule.cc.

References all_output_communicators_, and c.

931  {
932  if (all_output_communicators_.empty()) {
933  return false;
934  }
935  for (auto& c : all_output_communicators_) {
936  if (!c->limitReached()) {
937  // Found an output module that has not reached output event count.
938  return false;
939  }
940  }
941  LogInfo("SuccessfulTermination") << "The job is terminating successfully because each output module\n"
942  << "has reached its configured limit.\n";
943  return true;
944  }
const edm::EventSetup & c
Log< level::Info, false > LogInfo
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:306
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 1545 of file Schedule.cc.

References streamSchedules_.

Referenced by endJob().

1545  {
1546  int returnValue = 0;
1547  for (auto& s : streamSchedules_) {
1548  returnValue += s->totalEvents();
1549  }
1550  return returnValue;
1551  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
int edm::Schedule::totalEventsFailed ( ) const

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

Definition at line 1561 of file Schedule.cc.

References streamSchedules_.

1561  {
1562  int returnValue = 0;
1563  for (auto& s : streamSchedules_) {
1564  returnValue += s->totalEventsFailed();
1565  }
1566  return returnValue;
1567  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
int edm::Schedule::totalEventsPassed ( ) const

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

Definition at line 1553 of file Schedule.cc.

References streamSchedules_.

1553  {
1554  int returnValue = 0;
1555  for (auto& s : streamSchedules_) {
1556  returnValue += s->totalEventsPassed();
1557  }
1558  return returnValue;
1559  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:302
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 1457 of file Schedule.cc.

References pathNames_.

Referenced by edm::PathsAndConsumesOfModules::initialize().

1457 { oLabelsToFill = *pathNames_; }
std::vector< std::string > const * pathNames_
Definition: Schedule.h:311
void edm::Schedule::writeLumiAsync ( WaitingTaskHolder  iTask,
LuminosityBlockPrincipal const &  lbp,
ProcessContext const *  processContext,
ActivityRegistry activityRegistry 
)

Definition at line 1305 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(), edm::waiting_task::chain::then(), and unpackBuffers-CaloStage2::token.

1308  {
1310  GlobalContext globalContext(GlobalContext::Transition::kWriteLuminosityBlock,
1311  lbp.id(),
1312  lbp.runPrincipal().index(),
1313  lbp.index(),
1314  lbp.beginTime(),
1315  processContext);
1316 
1317  using namespace edm::waiting_task;
1318  chain::first([&](auto nextTask) {
1320  CMS_SA_ALLOW try { activityRegistry->preGlobalWriteLumiSignal_(globalContext); } catch (...) {
1321  }
1322  for (auto& c : all_output_communicators_) {
1323  c->writeLumiAsync(nextTask, lbp, processContext, activityRegistry);
1324  }
1325  }) | chain::then(doCleanup([activityRegistry, globalContext, token]() {
1326  //services can depend on other services
1328 
1329  activityRegistry->postGlobalWriteLumiSignal_(globalContext);
1330  })) |
1331  chain::runLast(task);
1332  }
const edm::EventSetup & c
#define CMS_SA_ALLOW
ServiceToken presentToken() const
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:306
void edm::Schedule::writeProcessBlockAsync ( WaitingTaskHolder  iTask,
ProcessBlockPrincipal const &  pbp,
ProcessContext const *  processContext,
ActivityRegistry activityRegistry 
)

Definition at line 1275 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(), edm::waiting_task::chain::then(), and unpackBuffers-CaloStage2::token.

1278  {
1280  GlobalContext globalContext(GlobalContext::Transition::kWriteProcessBlock,
1281  LuminosityBlockID(),
1285  processContext);
1286 
1287  using namespace edm::waiting_task;
1288  chain::first([&](auto nextTask) {
1289  // Propagating the exception would be nontrivial, and signal actions are not supposed to throw exceptions
1291  CMS_SA_ALLOW try { activityRegistry->preWriteProcessBlockSignal_(globalContext); } catch (...) {
1292  }
1293  for (auto& c : all_output_communicators_) {
1294  c->writeProcessBlockAsync(nextTask, pbp, processContext, activityRegistry);
1295  }
1296  }) | chain::then(doCleanup([activityRegistry, globalContext, token]() {
1297  //services can depend on other services
1299 
1300  activityRegistry->postWriteProcessBlockSignal_(globalContext);
1301  })) |
1302  chain::runLast(std::move(task));
1303  }
const edm::EventSetup & c
#define CMS_SA_ALLOW
static Timestamp invalidTimestamp()
Definition: Timestamp.h:82
ServiceToken presentToken() const
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
def move
Definition: eostools.py:511
static ServiceRegistry & instance()
static LuminosityBlockIndex invalidLuminosityBlockIndex()
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:306
void edm::Schedule::writeRunAsync ( WaitingTaskHolder  iTask,
RunPrincipal const &  rp,
ProcessContext const *  processContext,
ActivityRegistry activityRegistry,
MergeableRunProductMetadata const *  mergeableRunProductMetadata 
)

Definition at line 1242 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(), edm::waiting_task::chain::then(), and unpackBuffers-CaloStage2::token.

1246  {
1248  GlobalContext globalContext(GlobalContext::Transition::kWriteRun,
1249  LuminosityBlockID(rp.run(), 0),
1250  rp.index(),
1252  rp.endTime(),
1253  processContext);
1254 
1255  using namespace edm::waiting_task;
1256  chain::first([&](auto nextTask) {
1257  //services can depend on other services
1259 
1260  // Propagating the exception would be nontrivial, and signal actions are not supposed to throw exceptions
1261  CMS_SA_ALLOW try { activityRegistry->preGlobalWriteRunSignal_(globalContext); } catch (...) {
1262  }
1263  for (auto& c : all_output_communicators_) {
1264  c->writeRunAsync(nextTask, rp, processContext, activityRegistry, mergeableRunProductMetadata);
1265  }
1266  }) | chain::then(doCleanup([activityRegistry, globalContext, token]() {
1267  //services can depend on other services
1269 
1270  activityRegistry->postGlobalWriteRunSignal_(globalContext);
1271  })) |
1272  chain::runLast(task);
1273  }
const edm::EventSetup & c
#define CMS_SA_ALLOW
ServiceToken presentToken() const
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:306

Member Data Documentation

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

Definition at line 312 of file Schedule.h.

Referenced by endPaths().

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

Definition at line 300 of file Schedule.h.

edm::propagate_const<std::unique_ptr<GlobalSchedule> > edm::Schedule::globalSchedule_
private
edm::propagate_const<std::shared_ptr<ModuleRegistry> > edm::Schedule::moduleRegistry_
private

Definition at line 301 of file Schedule.h.

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

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

Definition at line 311 of file Schedule.h.

Referenced by triggerPaths().

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

Definition at line 299 of file Schedule.h.

Referenced by processOneEventAsync().

PreallocationConfiguration edm::Schedule::preallocConfig_
private

Definition at line 307 of file Schedule.h.

Referenced by changeModule(), and endJob().

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

Definition at line 298 of file Schedule.h.

Referenced by resultsInserter().

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

Definition at line 309 of file Schedule.h.

Referenced by getTriggerTimingReport().

bool edm::Schedule::wantSummary_
private

Definition at line 313 of file Schedule.h.

Referenced by endJob().