test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 &)
 
void beginStream (unsigned int)
 
bool changeModule (std::string const &iLabel, ParameterSet const &iPSet, const ProductRegistry &iRegistry)
 
void clearCounters ()
 Clear all the counters in the trigger report. More...
 
void closeOutputFiles ()
 
void enableEndPaths (bool active)
 
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...
 
bool endPathsEnabled () const
 
void endStream (unsigned int)
 
void fillModuleAndConsumesInfo (std::vector< ModuleDescription const * > &allModuleDescriptions, std::vector< std::pair< unsigned int, unsigned int > > &moduleIDToIndex, std::vector< std::vector< ModuleDescription const * > > &modulesWhoseProductsAreConsumedBy, 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 openNewOutputFilesIfNeeded ()
 
void openOutputFiles (FileBlock &fb)
 
void postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
 
void preForkReleaseResources ()
 
template<typename T >
void processOneEvent (unsigned int iStreamID, typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
 
template<typename T >
void processOneGlobal (typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
 
template<typename T >
void processOneStream (unsigned int iStreamID, typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
 
void respondToCloseInputFile (FileBlock const &fb)
 
void respondToOpenInputFile (FileBlock const &fb)
 
 Schedule (ParameterSet &proc_pset, service::TriggerNamesService &tns, ProductRegistry &pregistry, BranchIDListHelper &branchIDListHelper, ThinnedAssociationsHelper &thinnedAssociationsHelper, 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 writeLumi (LuminosityBlockPrincipal const &lbp, ProcessContext const *)
 
void writeRun (RunPrincipal const &rp, ProcessContext const *)
 

Private Member Functions

void checkForCorrectness () const
 Check that the schedule is actually runable. More...
 
void limitOutput (ParameterSet const &proc_pset, BranchIDLists const &branchIDLists)
 
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_
 
volatile bool endpathsAreActive_
 
edm::propagate_const
< std::unique_ptr
< GlobalSchedule > > 
globalSchedule_
 
edm::propagate_const
< std::shared_ptr
< ModuleRegistry > > 
moduleRegistry_
 
PreallocationConfiguration preallocConfig_
 
bool printDependencies_
 
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 112 of file Schedule.h.

Member Typedef Documentation

Definition at line 116 of file Schedule.h.

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

Definition at line 115 of file Schedule.h.

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

Definition at line 114 of file Schedule.h.

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

Definition at line 118 of file Schedule.h.

Constructor & Destructor Documentation

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

Definition at line 362 of file Schedule.cc.

372  :
373  //Only create a resultsInserter if there is a trigger path
374  resultsInserter_{tns.getTrigPaths().empty()? std::shared_ptr<TriggerResultInserter>{} :makeInserter(proc_pset,prealloc,preg,actions,areg,processConfiguration)},
processConfiguration
Definition: Schedule.cc:374
actions
Definition: Schedule.cc:374
edm::propagate_const< std::shared_ptr< TriggerResultInserter > > resultsInserter_
Definition: Schedule.h:276
areg
Definition: Schedule.cc:374
preg
Definition: Schedule.cc:374
prealloc
Definition: Schedule.cc:374

Member Function Documentation

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

returns the collection of pointers to workers

Definition at line 970 of file Schedule.cc.

References globalSchedule_.

Referenced by changeModule(), checkForCorrectness(), edm::PathsAndConsumesOfModules::doConsumesInfo(), fillModuleAndConsumesInfo(), getAllModuleDescriptions(), postForkReacquireResources(), preForkReleaseResources(), respondToCloseInputFile(), and respondToOpenInputFile().

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

adds to oLabelsToFill the labels for all paths in the process

Definition at line 975 of file Schedule.cc.

References streamSchedules_.

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

975  {
976  streamSchedules_[0]->availablePaths(oLabelsToFill);
977  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
void edm::Schedule::beginJob ( ProductRegistry const &  iRegistry)

Definition at line 897 of file Schedule.cc.

References checkForCorrectness(), and globalSchedule_.

897  {
899 
900  globalSchedule_->beginJob(iRegistry);
901  }
void checkForCorrectness() const
Check that the schedule is actually runable.
Definition: Schedule.cc:1296
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:280
void edm::Schedule::beginStream ( unsigned int  iStreamID)

Definition at line 903 of file Schedule.cc.

References assert(), and streamSchedules_.

903  {
904  assert(iStreamID<streamSchedules_.size());
905  streamSchedules_[iStreamID]->beginStream();
906  }
assert(m_qm.get())
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
bool edm::Schedule::changeModule ( std::string const &  iLabel,
ParameterSet const &  iPSet,
const ProductRegistry iRegistry 
)

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

Definition at line 922 of file Schedule.cc.

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

924  {
925  Worker* found = nullptr;
926  for (auto const& worker : allWorkers()) {
927  if (worker->description().moduleLabel() == iLabel) {
928  found = worker;
929  break;
930  }
931  }
932  if (nullptr == found) {
933  return false;
934  }
935 
936  auto newMod = moduleRegistry_->replaceModule(iLabel,iPSet,preallocConfig_);
937 
938  globalSchedule_->replaceModule(newMod,iLabel);
939 
940  for(auto& s: streamSchedules_) {
941  s->replaceModule(newMod,iLabel);
942  }
943 
944  {
945  //Need to updateLookup in order to make getByToken work
946  auto const runLookup = iRegistry.productLookup(InRun);
947  auto const lumiLookup = iRegistry.productLookup(InLumi);
948  auto const eventLookup = iRegistry.productLookup(InEvent);
949  found->updateLookup(InRun,*runLookup);
950  found->updateLookup(InLumi,*lumiLookup);
951  found->updateLookup(InEvent,*eventLookup);
952  }
953 
954  return true;
955  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:970
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:280
edm::propagate_const< std::shared_ptr< ModuleRegistry > > moduleRegistry_
Definition: Schedule.h:277
PreallocationConfiguration preallocConfig_
Definition: Schedule.h:283
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
void edm::Schedule::checkForCorrectness ( ) const
private

Check that the schedule is actually runable.

Definition at line 1296 of file Schedule.cc.

References allWorkers(), newFWLiteAna::found, g, bookConverter::max, mergeVDriftHistosByStation::name, fed_dqm_sourceclient-live_cfg::path, printDependencies_, streamSchedules_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by beginJob().

1297  {
1298  //Need to lookup names to ids quickly
1299  std::map<std::string,unsigned int> moduleNamesToIndex;
1300  for(auto const& worker: allWorkers()) {
1301  moduleNamesToIndex.insert(std::make_pair(worker->description().moduleLabel(),
1302  worker->description().id()));
1303  }
1304 
1305  //If a module to module dependency comes from a path, remember which path
1306  EdgeToPathMap edgeToPathMap;
1307 
1308  //determine the path dependencies
1309  std::vector<std::string> pathNames;
1310  {
1311  streamSchedules_[0]->availablePaths(pathNames);
1312 
1313  std::vector<std::string> moduleNames;
1314  std::vector<std::string> reducedModuleNames;
1315  unsigned int pathIndex=0;
1316  for(auto const& path: pathNames) {
1317  moduleNames.clear();
1318  reducedModuleNames.clear();
1319  std::set<std::string> alreadySeenNames;
1320 
1321  streamSchedules_[0]->modulesInPath(path,moduleNames);
1322  std::string lastModuleName;
1323  unsigned int lastModuleIndex;
1324  for(auto const& name: moduleNames) {
1325  auto found = alreadySeenNames.insert(name);
1326  if(found.second) {
1327  //first time for this path
1328  unsigned int const moduleIndex = moduleNamesToIndex[name];
1329  if(not lastModuleName.empty()) {
1330  edgeToPathMap[std::make_pair(moduleIndex,lastModuleIndex)].push_back(pathIndex);
1331  }
1332  lastModuleName = name;
1333  lastModuleIndex = moduleIndex;
1334  }
1335  }
1336  ++pathIndex;
1337  }
1338  }
1339  {
1340  std::vector<const char*> dependentModules;
1341  //determine the data dependencies
1342  for(auto const& worker: allWorkers()) {
1343  dependentModules.clear();
1344  //NOTE: what about aliases?
1345  worker->modulesDependentUpon(dependentModules, printDependencies_);
1346  auto found = moduleNamesToIndex.find(worker->description().moduleLabel());
1347  if (found == moduleNamesToIndex.end()) {
1348  //The module was from a previous process
1349  continue;
1350  }
1351  unsigned int const moduleIndex = found->second;
1352  for(auto const& name: dependentModules) {
1353  edgeToPathMap[std::make_pair(moduleIndex, moduleNamesToIndex[name])].push_back(std::numeric_limits<unsigned int>::max());
1354  }
1355  }
1356  }
1357  //Now use boost graph library to find cycles in the dependencies
1358  std::vector<SimpleEdge> outList;
1359  outList.reserve(edgeToPathMap.size());
1360  for(auto const& edgeInfo: edgeToPathMap) {
1361  outList.push_back(edgeInfo.first);
1362  }
1363 
1364  Graph g(outList.begin(),outList.end(), moduleNamesToIndex.size());
1365 
1366  cycle_detector detector(edgeToPathMap,pathNames,moduleNamesToIndex);
1367  boost::depth_first_search(g,boost::visitor(detector));
1368  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:970
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
bool printDependencies_
Definition: Schedule.h:288
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
void edm::Schedule::clearCounters ( )

Clear all the counters in the trigger report.

Definition at line 1101 of file Schedule.cc.

References streamSchedules_.

1101  {
1102  for(auto& s: streamSchedules_) {
1103  s->clearCounters();
1104  }
1105  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
void edm::Schedule::closeOutputFiles ( )

Definition at line 854 of file Schedule.cc.

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

854  {
855  using std::placeholders::_1;
857  }
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:282
void edm::Schedule::enableEndPaths ( bool  active)

Turn end_paths "off" if "active" is false; turn end_paths "on" if "active" is true.

Definition at line 1042 of file Schedule.cc.

References endpathsAreActive_, and streamSchedules_.

1042  {
1043  endpathsAreActive_ = active;
1044  for(auto& s : streamSchedules_) {
1045  s->enableEndPaths(active);
1046  }
1047  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
volatile bool endpathsAreActive_
Definition: Schedule.h:290
void edm::Schedule::endJob ( ExceptionCollector collector)

Definition at line 569 of file Schedule.cc.

References constexpr, edm::EventTimingSummary::cpuTime, edm::TriggerTimingReport::endPathSummaries, edm::TriggerReport::endPathSummaries, edm::TriggerTimingReport::eventSummary, edm::TriggerReport::eventSummary, getTriggerReport(), getTriggerTimingReport(), globalSchedule_, edm::ExceptionCollector::hasThrown(), bookConverter::max, mod(), edm::PreallocationConfiguration::numberOfThreads(), AlCaHLTBitMon_ParallelJobs::p, preallocConfig_, edm::EventTimingSummary::realTime, 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.

569  {
570  globalSchedule_->endJob(collector);
571  if (collector.hasThrown()) {
572  return;
573  }
574 
575  if (wantSummary_ == false) return;
576  {
577  TriggerReport tr;
578  getTriggerReport(tr);
579 
580  // The trigger report (pass/fail etc.):
581 
582  LogVerbatim("FwkSummary") << "";
583  LogVerbatim("FwkSummary") << "TrigReport " << "---------- Event Summary ------------";
584  if(!tr.trigPathSummaries.empty()) {
585  LogVerbatim("FwkSummary") << "TrigReport"
586  << " Events total = " << tr.eventSummary.totalEvents
587  << " passed = " << tr.eventSummary.totalEventsPassed
588  << " failed = " << tr.eventSummary.totalEventsFailed
589  << "";
590  } else {
591  LogVerbatim("FwkSummary") << "TrigReport"
592  << " Events total = " << tr.eventSummary.totalEvents
593  << " passed = " << tr.eventSummary.totalEvents
594  << " failed = 0";
595  }
596 
597  LogVerbatim("FwkSummary") << "";
598  LogVerbatim("FwkSummary") << "TrigReport " << "---------- Path Summary ------------";
599  LogVerbatim("FwkSummary") << "TrigReport "
600  << std::right << std::setw(10) << "Trig Bit#" << " "
601  << std::right << std::setw(10) << "Executed" << " "
602  << std::right << std::setw(10) << "Passed" << " "
603  << std::right << std::setw(10) << "Failed" << " "
604  << std::right << std::setw(10) << "Error" << " "
605  << "Name" << "";
606  for (auto const& p: tr.trigPathSummaries) {
607  LogVerbatim("FwkSummary") << "TrigReport "
608  << std::right << std::setw(5) << 1
609  << std::right << std::setw(5) << p.bitPosition << " "
610  << std::right << std::setw(10) << p.timesRun << " "
611  << std::right << std::setw(10) << p.timesPassed << " "
612  << std::right << std::setw(10) << p.timesFailed << " "
613  << std::right << std::setw(10) << p.timesExcept << " "
614  << p.name << "";
615  }
616 
617  /*
618  std::vector<int>::const_iterator epi = empty_trig_paths_.begin();
619  std::vector<int>::const_iterator epe = empty_trig_paths_.end();
620  std::vector<std::string>::const_iterator epn = empty_trig_path_names_.begin();
621  for (; epi != epe; ++epi, ++epn) {
622 
623  LogVerbatim("FwkSummary") << "TrigReport "
624  << std::right << std::setw(5) << 1
625  << std::right << std::setw(5) << *epi << " "
626  << std::right << std::setw(10) << totalEvents() << " "
627  << std::right << std::setw(10) << totalEvents() << " "
628  << std::right << std::setw(10) << 0 << " "
629  << std::right << std::setw(10) << 0 << " "
630  << *epn << "";
631  }
632  */
633 
634  LogVerbatim("FwkSummary") << "";
635  LogVerbatim("FwkSummary") << "TrigReport " << "-------End-Path Summary ------------";
636  LogVerbatim("FwkSummary") << "TrigReport "
637  << std::right << std::setw(10) << "Trig Bit#" << " "
638  << std::right << std::setw(10) << "Executed" << " "
639  << std::right << std::setw(10) << "Passed" << " "
640  << std::right << std::setw(10) << "Failed" << " "
641  << std::right << std::setw(10) << "Error" << " "
642  << "Name" << "";
643  for (auto const& p: tr.endPathSummaries) {
644  LogVerbatim("FwkSummary") << "TrigReport "
645  << std::right << std::setw(5) << 0
646  << std::right << std::setw(5) << p.bitPosition << " "
647  << std::right << std::setw(10) << p.timesRun << " "
648  << std::right << std::setw(10) << p.timesPassed << " "
649  << std::right << std::setw(10) << p.timesFailed << " "
650  << std::right << std::setw(10) << p.timesExcept << " "
651  << p.name << "";
652  }
653 
654  for (auto const& p: tr.trigPathSummaries) {
655  LogVerbatim("FwkSummary") << "";
656  LogVerbatim("FwkSummary") << "TrigReport " << "---------- Modules in Path: " << p.name << " ------------";
657  LogVerbatim("FwkSummary") << "TrigReport "
658  << std::right << std::setw(10) << "Trig Bit#" << " "
659  << std::right << std::setw(10) << "Visited" << " "
660  << std::right << std::setw(10) << "Passed" << " "
661  << std::right << std::setw(10) << "Failed" << " "
662  << std::right << std::setw(10) << "Error" << " "
663  << "Name" << "";
664 
665  unsigned int bitpos = 0;
666  for (auto const& mod: p.moduleInPathSummaries) {
667  LogVerbatim("FwkSummary") << "TrigReport "
668  << std::right << std::setw(5) << 1
669  << std::right << std::setw(5) << bitpos << " "
670  << std::right << std::setw(10) << mod.timesVisited << " "
671  << std::right << std::setw(10) << mod.timesPassed << " "
672  << std::right << std::setw(10) << mod.timesFailed << " "
673  << std::right << std::setw(10) << mod.timesExcept << " "
674  << mod.moduleLabel << "";
675  ++bitpos;
676  }
677  }
678 
679  for (auto const& p: tr.endPathSummaries) {
680  LogVerbatim("FwkSummary") << "";
681  LogVerbatim("FwkSummary") << "TrigReport " << "------ Modules in End-Path: " << p.name << " ------------";
682  LogVerbatim("FwkSummary") << "TrigReport "
683  << std::right << std::setw(10) << "Trig Bit#" << " "
684  << std::right << std::setw(10) << "Visited" << " "
685  << std::right << std::setw(10) << "Passed" << " "
686  << std::right << std::setw(10) << "Failed" << " "
687  << std::right << std::setw(10) << "Error" << " "
688  << "Name" << "";
689 
690  unsigned int bitpos=0;
691  for (auto const& mod: p.moduleInPathSummaries) {
692  LogVerbatim("FwkSummary") << "TrigReport "
693  << std::right << std::setw(5) << 0
694  << std::right << std::setw(5) << bitpos << " "
695  << std::right << std::setw(10) << mod.timesVisited << " "
696  << std::right << std::setw(10) << mod.timesPassed << " "
697  << std::right << std::setw(10) << mod.timesFailed << " "
698  << std::right << std::setw(10) << mod.timesExcept << " "
699  << mod.moduleLabel << "";
700  ++bitpos;
701  }
702  }
703 
704  LogVerbatim("FwkSummary") << "";
705  LogVerbatim("FwkSummary") << "TrigReport " << "---------- Module Summary ------------";
706  LogVerbatim("FwkSummary") << "TrigReport "
707  << std::right << std::setw(10) << "Visited" << " "
708  << std::right << std::setw(10) << "Executed" << " "
709  << std::right << std::setw(10) << "Passed" << " "
710  << std::right << std::setw(10) << "Failed" << " "
711  << std::right << std::setw(10) << "Error" << " "
712  << "Name" << "";
713  for (auto const& worker : tr.workerSummaries) {
714  LogVerbatim("FwkSummary") << "TrigReport "
715  << std::right << std::setw(10) << worker.timesVisited << " "
716  << std::right << std::setw(10) << worker.timesRun << " "
717  << std::right << std::setw(10) << worker.timesPassed << " "
718  << std::right << std::setw(10) << worker.timesFailed << " "
719  << std::right << std::setw(10) << worker.timesExcept << " "
720  << worker.moduleLabel << "";
721  }
722  LogVerbatim("FwkSummary") << "";
723  }
724  // The timing report (CPU and Real Time):
725  TriggerTimingReport tr;
727 
728  const int totalEvents = std::max(1, tr.eventSummary.totalEvents);
729 
730  LogVerbatim("FwkSummary") << "TimeReport " << "---------- Event Summary ---[sec]----";
731  LogVerbatim("FwkSummary") << "TimeReport"
732  << std::setprecision(6) << std::fixed
733  << " event loop CPU/event = " << tr.eventSummary.cpuTime/totalEvents;
734  LogVerbatim("FwkSummary") << "TimeReport"
735  << std::setprecision(6) << std::fixed
736  << " event loop Real/event = " << tr.eventSummary.realTime/totalEvents;
737  LogVerbatim("FwkSummary") << "TimeReport"
738  << std::setprecision(6) << std::fixed
739  << " sum Streams Real/event = " << tr.eventSummary.sumStreamRealTime/totalEvents;
740  LogVerbatim("FwkSummary") << "TimeReport"
741  << std::setprecision(6) << std::fixed
742  << " efficiency CPU/Real/thread = " << tr.eventSummary.cpuTime/tr.eventSummary.realTime/preallocConfig_.numberOfThreads();
743 
744  constexpr int kColumn1Size = 10;
745  constexpr int kColumn2Size = 12;
746  constexpr int kColumn3Size = 12;
747  LogVerbatim("FwkSummary") << "";
748  LogVerbatim("FwkSummary") << "TimeReport " << "---------- Path Summary ---[Real sec]----";
749  LogVerbatim("FwkSummary") << "TimeReport "
750  << std::right << std::setw(kColumn1Size) << "per event"<<" "
751  << std::right << std::setw(kColumn2Size) << "per exec"
752  << " Name";
753  for (auto const& p: tr.trigPathSummaries) {
754  const int timesRun = std::max(1, p.timesRun);
755  LogVerbatim("FwkSummary") << "TimeReport "
756  << std::setprecision(6) << std::fixed
757  << std::right << std::setw(kColumn1Size) << p.realTime/totalEvents << " "
758  << std::right << std::setw(kColumn2Size) << p.realTime/timesRun << " "
759  << p.name << "";
760  }
761  LogVerbatim("FwkSummary") << "TimeReport "
762  << std::right << std::setw(kColumn1Size) << "per event"<<" "
763  << std::right << std::setw(kColumn2Size) << "per exec"
764  << " Name" << "";
765 
766  LogVerbatim("FwkSummary") << "";
767  LogVerbatim("FwkSummary") << "TimeReport " << "-------End-Path Summary ---[Real sec]----";
768  LogVerbatim("FwkSummary") << "TimeReport "
769  << std::right << std::setw(kColumn1Size) << "per event" <<" "
770  << std::right << std::setw(kColumn2Size) << "per exec"
771  << " Name" << "";
772  for (auto const& p: tr.endPathSummaries) {
773  const int timesRun = std::max(1, p.timesRun);
774 
775  LogVerbatim("FwkSummary") << "TimeReport "
776  << std::setprecision(6) << std::fixed
777  << std::right << std::setw(kColumn1Size) << p.realTime/totalEvents << " "
778  << std::right << std::setw(kColumn2Size) << p.realTime/timesRun << " "
779  << p.name << "";
780  }
781  LogVerbatim("FwkSummary") << "TimeReport "
782  << std::right << std::setw(kColumn1Size) << "per event" <<" "
783  << std::right << std::setw(kColumn2Size) << "per exec"
784  << " Name" << "";
785 
786  for (auto const& p: tr.trigPathSummaries) {
787  LogVerbatim("FwkSummary") << "";
788  LogVerbatim("FwkSummary") << "TimeReport " << "---------- Modules in Path: " << p.name << " ---[Real sec]----";
789  LogVerbatim("FwkSummary") << "TimeReport "
790  << std::right << std::setw(kColumn1Size) << "per event" <<" "
791  << std::right << std::setw(kColumn2Size) << "per visit"
792  << " Name" << "";
793  for (auto const& mod: p.moduleInPathSummaries) {
794  LogVerbatim("FwkSummary") << "TimeReport "
795  << std::setprecision(6) << std::fixed
796  << std::right << std::setw(kColumn1Size) << mod.realTime/totalEvents << " "
797  << std::right << std::setw(kColumn2Size) << mod.realTime/std::max(1, mod.timesVisited) << " "
798  << mod.moduleLabel << "";
799  }
800  }
801  if(not tr.trigPathSummaries.empty()) {
802  LogVerbatim("FwkSummary") << "TimeReport "
803  << std::right << std::setw(kColumn1Size) << "per event" <<" "
804  << std::right << std::setw(kColumn2Size) << "per visit"
805  << " Name" << "";
806  }
807  for (auto const& p: tr.endPathSummaries) {
808  LogVerbatim("FwkSummary") << "";
809  LogVerbatim("FwkSummary") << "TimeReport " << "------ Modules in End-Path: " << p.name << " ---[Real sec]----";
810  LogVerbatim("FwkSummary") << "TimeReport "
811  << std::right << std::setw(kColumn1Size) << "per event" <<" "
812  << std::right << std::setw(kColumn2Size) << "per visit"
813  << " Name" << "";
814  for (auto const& mod: p.moduleInPathSummaries) {
815  LogVerbatim("FwkSummary") << "TimeReport "
816  << std::setprecision(6) << std::fixed
817  << std::right << std::setw(kColumn1Size) << mod.realTime/totalEvents << " "
818  << std::right << std::setw(kColumn2Size) << mod.realTime/std::max(1, mod.timesVisited) << " "
819  << mod.moduleLabel << "";
820  }
821  }
822  if(not tr.endPathSummaries.empty()) {
823  LogVerbatim("FwkSummary") << "TimeReport "
824  << std::right << std::setw(kColumn1Size) << "per event" <<" "
825  << std::right << std::setw(kColumn2Size) << "per visit"
826  << " Name" << "";
827  }
828  LogVerbatim("FwkSummary") << "";
829  LogVerbatim("FwkSummary") << "TimeReport " << "---------- Module Summary ---[Real sec]----";
830  LogVerbatim("FwkSummary") << "TimeReport "
831  << std::right << std::setw(kColumn1Size) << "per event" <<" "
832  << std::right << std::setw(kColumn2Size) << "per exec" <<" "
833  << std::right << std::setw(kColumn3Size) << "per visit"
834  << " Name" << "";
835  for (auto const& worker : tr.workerSummaries) {
836  LogVerbatim("FwkSummary") << "TimeReport "
837  << std::setprecision(6) << std::fixed
838  << std::right << std::setw(kColumn1Size) << worker.realTime/totalEvents << " "
839  << std::right << std::setw(kColumn2Size) << worker.realTime/std::max(1, worker.timesRun) << " "
840  << std::right << std::setw(kColumn3Size) << worker.realTime/std::max(1, worker.timesVisited) << " "
841  << worker.moduleLabel << "";
842  }
843  LogVerbatim("FwkSummary") << "TimeReport "
844  << std::right << std::setw(kColumn1Size) << "per event" <<" "
845  << std::right << std::setw(kColumn2Size) << "per exec" <<" "
846  << std::right << std::setw(kColumn3Size) << "per visit"
847  << " Name" << "";
848 
849  LogVerbatim("FwkSummary") << "";
850  LogVerbatim("FwkSummary") << "T---Report end!" << "";
851  LogVerbatim("FwkSummary") << "";
852  }
#define constexpr
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:280
int totalEvents() const
Definition: Schedule.cc:1073
void getTriggerReport(TriggerReport &rep) const
Definition: Schedule.cc:1055
PreallocationConfiguration preallocConfig_
Definition: Schedule.h:283
bool wantSummary_
Definition: Schedule.h:287
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
void getTriggerTimingReport(TriggerTimingReport &rep) const
Definition: Schedule.cc:1065
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 985 of file Schedule.cc.

References streamSchedules_.

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

985  {
986  streamSchedules_[0]->endPaths(oLabelsToFill);
987  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
bool edm::Schedule::endPathsEnabled ( ) const

Return true if end_paths are active, and false if they are inactive.

Definition at line 1050 of file Schedule.cc.

References endpathsAreActive_.

1050  {
1051  return endpathsAreActive_;
1052  }
volatile bool endpathsAreActive_
Definition: Schedule.h:290
void edm::Schedule::endStream ( unsigned int  iStreamID)

Definition at line 908 of file Schedule.cc.

References assert(), and streamSchedules_.

908  {
909  assert(iStreamID<streamSchedules_.size());
910  streamSchedules_[iStreamID]->endStream();
911  }
assert(m_qm.get())
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
void edm::Schedule::fillModuleAndConsumesInfo ( std::vector< ModuleDescription const * > &  allModuleDescriptions,
std::vector< std::pair< unsigned int, unsigned int > > &  moduleIDToIndex,
std::vector< std::vector< ModuleDescription const * > > &  modulesWhoseProductsAreConsumedBy,
ProductRegistry const &  preg 
) const

Definition at line 1010 of file Schedule.cc.

References allWorkers(), i, edm::ModuleDescription::id(), edm::ModuleDescription::moduleLabel(), edmConvertToStreamModule::modules, AlCaHLTBitMon_ParallelJobs::p, findQualityFiles::size, and edm::sort_all().

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

1013  {
1014  allModuleDescriptions.clear();
1015  moduleIDToIndex.clear();
1016  modulesWhoseProductsAreConsumedBy.clear();
1017 
1018  allModuleDescriptions.reserve(allWorkers().size());
1019  moduleIDToIndex.reserve(allWorkers().size());
1020  modulesWhoseProductsAreConsumedBy.resize(allWorkers().size());
1021 
1022  std::map<std::string, ModuleDescription const*> labelToDesc;
1023  unsigned int i = 0;
1024  for (auto const& worker : allWorkers()) {
1025  ModuleDescription const* p = worker->descPtr();
1026  allModuleDescriptions.push_back(p);
1027  moduleIDToIndex.push_back(std::pair<unsigned int, unsigned int>(p->id(), i));
1028  labelToDesc[p->moduleLabel()] = p;
1029  ++i;
1030  }
1031  sort_all(moduleIDToIndex);
1032 
1033  i = 0;
1034  for (auto const& worker : allWorkers()) {
1035  std::vector<ModuleDescription const*>& modules = modulesWhoseProductsAreConsumedBy.at(i);
1036  worker->modulesWhoseProductsAreConsumed(modules, preg, labelToDesc);
1037  ++i;
1038  }
1039  }
int i
Definition: DBlmapReader.cc:9
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:970
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:120
preg
Definition: Schedule.cc:374
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 958 of file Schedule.cc.

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

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

958  {
959  std::vector<ModuleDescription const*> result;
960  result.reserve(allWorkers().size());
961 
962  for (auto const& worker : allWorkers()) {
963  ModuleDescription const* p = worker->descPtr();
964  result.push_back(p);
965  }
966  return result;
967  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:970
tuple result
Definition: mps_fire.py:84
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 1055 of file Schedule.cc.

References edm::TriggerReport::eventSummary, streamSchedules_, edm::EventSummary::totalEvents, edm::EventSummary::totalEventsFailed, and edm::EventSummary::totalEventsPassed.

Referenced by endJob().

1055  {
1056  rep.eventSummary.totalEvents = 0;
1057  rep.eventSummary.totalEventsPassed = 0;
1058  rep.eventSummary.totalEventsFailed = 0;
1059  for(auto& s: streamSchedules_) {
1060  s->getTriggerReport(rep);
1061  }
1062  }
string rep
Definition: cuy.py:1188
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
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 1065 of file Schedule.cc.

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

Referenced by endJob().

1065  {
1066  rep.eventSummary.totalEvents = 0;
1067  rep.eventSummary.cpuTime = 0.;
1068  rep.eventSummary.realTime = 0.;
1069  summaryTimeKeeper_->fillTriggerTimingReport(rep);
1070  }
string rep
Definition: cuy.py:1188
edm::propagate_const< std::unique_ptr< SystemTimeKeeper > > summaryTimeKeeper_
Definition: Schedule.h:285
void edm::Schedule::limitOutput ( ParameterSet const &  proc_pset,
BranchIDLists const &  branchIDLists 
)
private

Definition at line 514 of file Schedule.cc.

References all_output_communicators_, EnergyCorrector::c, edm::errors::Configuration, 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.

514  {
515  std::string const output("output");
516 
517  ParameterSet const& maxEventsPSet = proc_pset.getUntrackedParameterSet("maxEvents", ParameterSet());
518  int maxEventSpecs = 0;
519  int maxEventsOut = -1;
520  ParameterSet const* vMaxEventsOut = 0;
521  std::vector<std::string> intNamesE = maxEventsPSet.getParameterNamesForType<int>(false);
522  if (search_all(intNamesE, output)) {
523  maxEventsOut = maxEventsPSet.getUntrackedParameter<int>(output);
524  ++maxEventSpecs;
525  }
526  std::vector<std::string> psetNamesE;
527  maxEventsPSet.getParameterSetNames(psetNamesE, false);
528  if (search_all(psetNamesE, output)) {
529  vMaxEventsOut = &maxEventsPSet.getUntrackedParameterSet(output);
530  ++maxEventSpecs;
531  }
532 
533  if (maxEventSpecs > 1) {
535  "\nAt most, one form of 'output' may appear in the 'maxEvents' parameter set";
536  }
537 
538  for (auto& c : all_output_communicators_) {
539  OutputModuleDescription desc(branchIDLists, maxEventsOut);
540  if (vMaxEventsOut != 0 && !vMaxEventsOut->empty()) {
541  std::string const& moduleLabel = c->description().moduleLabel();
542  try {
543  desc.maxEvents_ = vMaxEventsOut->getUntrackedParameter<int>(moduleLabel);
544  } catch (Exception const&) {
546  "\nNo entry in 'maxEvents' for output module label '" << moduleLabel << "'.\n";
547  }
548  }
549  c->configure(desc);
550  }
551  }
bool search_all(ForwardSequence const &s, Datum const &d)
Definition: Algorithms.h:46
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:282
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 1003 of file Schedule.cc.

References streamSchedules_.

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

1005  {
1006  streamSchedules_[0]->moduleDescriptionsInEndPath(iEndPathLabel, descriptions, hint);
1007  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
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 996 of file Schedule.cc.

References streamSchedules_.

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

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

Definition at line 273 of file Schedule.h.

References edm::get_underlying_safe(), and moduleRegistry_.

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:277
std::shared_ptr<ModuleRegistry>& edm::Schedule::moduleRegistry ( )
inlineprivate

Definition at line 274 of file Schedule.h.

References edm::get_underlying_safe(), and moduleRegistry_.

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:277
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 990 of file Schedule.cc.

References streamSchedules_.

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

991  {
992  streamSchedules_[0]->modulesInPath(iPathLabel,oLabelsToFill);
993  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
void edm::Schedule::openNewOutputFilesIfNeeded ( )

Definition at line 859 of file Schedule.cc.

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

859  {
860  using std::placeholders::_1;
862  }
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
virtual void openNewFileIfNeeded()=0
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:282
void edm::Schedule::openOutputFiles ( FileBlock fb)

Definition at line 864 of file Schedule.cc.

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

864  {
865  using std::placeholders::_1;
867  }
virtual void openFile(FileBlock const &fb)=0
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:282
void edm::Schedule::postForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)

Definition at line 917 of file Schedule.cc.

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

917  {
918  using std::placeholders::_1;
919  for_all(allWorkers(), std::bind(&Worker::postForkReacquireResources, _1, iChildIndex, iNumberOfChildren));
920  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:970
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
Definition: Worker.h:92
void edm::Schedule::preForkReleaseResources ( )

Definition at line 913 of file Schedule.cc.

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

913  {
914  using std::placeholders::_1;
916  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:970
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
void preForkReleaseResources()
Definition: Worker.h:91
template<typename T >
void edm::Schedule::processOneEvent ( unsigned int  iStreamID,
typename T::MyPrincipal &  principal,
EventSetup const &  eventSetup,
bool  cleaningUpAfterException = false 
)

Definition at line 295 of file Schedule.h.

References assert(), and streamSchedules_.

298  {
299  assert(iStreamID<streamSchedules_.size());
300  streamSchedules_[iStreamID]->processOneEvent<T>(ep,es,cleaningUpAfterException);
301  }
assert(m_qm.get())
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
long double T
template<typename T >
void edm::Schedule::processOneGlobal ( typename T::MyPrincipal &  principal,
EventSetup const &  eventSetup,
bool  cleaningUpAfterException = false 
)

Definition at line 313 of file Schedule.h.

References globalSchedule_.

315  {
316  globalSchedule_->processOneGlobal<T>(ep,es,cleaningUpAfterException);
317  }
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
Definition: Schedule.h:280
long double T
template<typename T >
void edm::Schedule::processOneStream ( unsigned int  iStreamID,
typename T::MyPrincipal &  principal,
EventSetup const &  eventSetup,
bool  cleaningUpAfterException = false 
)

Definition at line 304 of file Schedule.h.

References assert(), and streamSchedules_.

307  {
308  assert(iStreamID<streamSchedules_.size());
309  streamSchedules_[iStreamID]->processOneStream<T>(ep,es,cleaningUpAfterException);
310  }
assert(m_qm.get())
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
long double T
void edm::Schedule::respondToCloseInputFile ( FileBlock const &  fb)

Definition at line 892 of file Schedule.cc.

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

892  {
893  using std::placeholders::_1;
894  for_all(allWorkers(), std::bind(&Worker::respondToCloseInputFile, _1, std::cref(fb)));
895  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:970
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
void respondToCloseInputFile(FileBlock const &fb)
Definition: Worker.h:89
void edm::Schedule::respondToOpenInputFile ( FileBlock const &  fb)

Definition at line 887 of file Schedule.cc.

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

887  {
888  using std::placeholders::_1;
889  for_all(allWorkers(), std::bind(&Worker::respondToOpenInputFile, _1, std::cref(fb)));
890  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:970
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
void respondToOpenInputFile(FileBlock const &fb)
Definition: Worker.h:88
std::shared_ptr<TriggerResultInserter const> edm::Schedule::resultsInserter ( ) const
inlineprivate

Definition at line 271 of file Schedule.h.

References edm::get_underlying_safe(), and resultsInserter_.

edm::propagate_const< std::shared_ptr< TriggerResultInserter > > resultsInserter_
Definition: Schedule.h:276
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
std::shared_ptr<TriggerResultInserter>& edm::Schedule::resultsInserter ( )
inlineprivate

Definition at line 272 of file Schedule.h.

References edm::get_underlying_safe(), and resultsInserter_.

edm::propagate_const< std::shared_ptr< TriggerResultInserter > > resultsInserter_
Definition: Schedule.h:276
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
bool edm::Schedule::shouldWeCloseOutput ( ) const

Definition at line 879 of file Schedule.cc.

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

879  {
880  using std::placeholders::_1;
881  // Return true iff at least one output module returns true.
882  return (std::find_if (all_output_communicators_.begin(), all_output_communicators_.end(),
884  != all_output_communicators_.end());
885  }
virtual bool shouldWeCloseFile() const =0
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:282
bool edm::Schedule::terminate ( void  ) const

Return whether each output module has reached its maximum count.

Definition at line 553 of file Schedule.cc.

References all_output_communicators_, and EnergyCorrector::c.

553  {
554  if (all_output_communicators_.empty()) {
555  return false;
556  }
557  for (auto& c : all_output_communicators_) {
558  if (!c->limitReached()) {
559  // Found an output module that has not reached output event count.
560  return false;
561  }
562  }
563  LogInfo("SuccessfulTermination")
564  << "The job is terminating successfully because each output module\n"
565  << "has reached its configured limit.\n";
566  return true;
567  }
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:282
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 1073 of file Schedule.cc.

References streamSchedules_.

Referenced by endJob().

1073  {
1074  int returnValue = 0;
1075  for(auto& s: streamSchedules_) {
1076  returnValue += s->totalEvents();
1077  }
1078  return returnValue;
1079  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
int edm::Schedule::totalEventsFailed ( ) const

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

Definition at line 1091 of file Schedule.cc.

References streamSchedules_.

1091  {
1092  int returnValue = 0;
1093  for(auto& s: streamSchedules_) {
1094  returnValue += s->totalEventsFailed();
1095  }
1096  return returnValue;
1097  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
int edm::Schedule::totalEventsPassed ( ) const

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

Definition at line 1082 of file Schedule.cc.

References streamSchedules_.

1082  {
1083  int returnValue = 0;
1084  for(auto& s: streamSchedules_) {
1085  returnValue += s->totalEventsPassed();
1086  }
1087  return returnValue;
1088  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
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 980 of file Schedule.cc.

References streamSchedules_.

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

980  {
981  streamSchedules_[0]->triggerPaths(oLabelsToFill);
982  }
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Definition: Schedule.h:278
void edm::Schedule::writeLumi ( LuminosityBlockPrincipal const &  lbp,
ProcessContext const *  processContext 
)

Definition at line 874 of file Schedule.cc.

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

874  {
875  using std::placeholders::_1;
876  for_all(all_output_communicators_, std::bind(&OutputModuleCommunicator::writeLumi, _1, std::cref(lbp), processContext));
877  }
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
virtual void writeLumi(LuminosityBlockPrincipal const &lbp, ProcessContext const *)=0
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:282
void edm::Schedule::writeRun ( RunPrincipal const &  rp,
ProcessContext const *  processContext 
)

Definition at line 869 of file Schedule.cc.

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

869  {
870  using std::placeholders::_1;
871  for_all(all_output_communicators_, std::bind(&OutputModuleCommunicator::writeRun, _1, std::cref(rp), processContext));
872  }
virtual void writeRun(RunPrincipal const &rp, ProcessContext const *)=0
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:282

Member Data Documentation

AllOutputModuleCommunicators edm::Schedule::all_output_communicators_
private
volatile bool edm::Schedule::endpathsAreActive_
private

Definition at line 290 of file Schedule.h.

Referenced by enableEndPaths(), and endPathsEnabled().

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

Definition at line 280 of file Schedule.h.

Referenced by allWorkers(), beginJob(), changeModule(), endJob(), and processOneGlobal().

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

Definition at line 277 of file Schedule.h.

Referenced by changeModule(), and moduleRegistry().

PreallocationConfiguration edm::Schedule::preallocConfig_
private

Definition at line 283 of file Schedule.h.

Referenced by changeModule(), and endJob().

bool edm::Schedule::printDependencies_
private

Definition at line 288 of file Schedule.h.

Referenced by checkForCorrectness().

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

Definition at line 276 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 285 of file Schedule.h.

Referenced by getTriggerTimingReport().

bool edm::Schedule::wantSummary_
private

Definition at line 287 of file Schedule.h.

Referenced by endJob().