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
< std::shared_ptr
< OutputModuleCommunicator > > 
AllOutputModuleCommunicators
 
typedef std::vector< Worker * > AllWorkers
 
typedef std::vector< std::string > vstring
 
typedef std::shared_ptr< WorkerWorkerPtr
 
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, const ParameterSet *subProcPSet, 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)
 

Private Attributes

AllOutputModuleCommunicators all_output_communicators_
 
volatile bool endpathsAreActive_
 
std::unique_ptr< GlobalScheduleglobalSchedule_
 
std::shared_ptr< ModuleRegistrymoduleRegistry_
 
PreallocationConfiguration preallocConfig_
 
std::shared_ptr
< TriggerResultInserter
resultsInserter_
 
std::vector< std::shared_ptr
< StreamSchedule > > 
streamSchedules_
 
std::unique_ptr< SystemTimeKeepersummaryTimeKeeper_
 
bool wantSummary_
 

Detailed Description

Definition at line 113 of file Schedule.h.

Member Typedef Documentation

Definition at line 118 of file Schedule.h.

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

Definition at line 117 of file Schedule.h.

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

Definition at line 115 of file Schedule.h.

typedef std::shared_ptr<Worker> edm::Schedule::WorkerPtr

Definition at line 116 of file Schedule.h.

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

Definition at line 120 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,
const ParameterSet subProcPSet,
PreallocationConfiguration const &  config,
ProcessContext const *  processContext 
)

Definition at line 358 of file Schedule.cc.

368  :
369  //Only create a resultsInserter if there is a trigger path
370  resultsInserter_{tns.getTrigPaths().empty()? std::shared_ptr<TriggerResultInserter>{} :makeInserter(proc_pset,prealloc,preg,actions,areg,processConfiguration)},
processConfiguration
Definition: Schedule.cc:370
actions
Definition: Schedule.cc:370
std::shared_ptr< TriggerResultInserter > resultsInserter_
Definition: Schedule.h:273
areg
Definition: Schedule.cc:370
preg
Definition: Schedule.cc:370
prealloc
Definition: Schedule.cc:370

Member Function Documentation

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

returns the collection of pointers to workers

Definition at line 955 of file Schedule.cc.

References globalSchedule_.

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

955  {
956  return globalSchedule_->allWorkers();
957  }
std::unique_ptr< GlobalSchedule > globalSchedule_
Definition: Schedule.h:277
void edm::Schedule::availablePaths ( std::vector< std::string > &  oLabelsToFill) const

adds to oLabelsToFill the labels for all paths in the process

Definition at line 960 of file Schedule.cc.

References streamSchedules_.

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

960  {
961  streamSchedules_[0]->availablePaths(oLabelsToFill);
962  }
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
void edm::Schedule::beginJob ( ProductRegistry const &  iRegistry)

Definition at line 882 of file Schedule.cc.

References checkForCorrectness(), and globalSchedule_.

882  {
884 
885  globalSchedule_->beginJob(iRegistry);
886  }
void checkForCorrectness() const
Check that the schedule is actually runable.
Definition: Schedule.cc:1280
std::unique_ptr< GlobalSchedule > globalSchedule_
Definition: Schedule.h:277
void edm::Schedule::beginStream ( unsigned int  iStreamID)

Definition at line 888 of file Schedule.cc.

References assert(), and streamSchedules_.

888  {
889  assert(iStreamID<streamSchedules_.size());
890  streamSchedules_[iStreamID]->beginStream();
891  }
assert(m_qm.get())
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
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 907 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().

Referenced by edm::ModuleChanger::changeModule().

909  {
910  Worker* found = nullptr;
911  for (auto const& worker : allWorkers()) {
912  if (worker->description().moduleLabel() == iLabel) {
913  found = worker;
914  break;
915  }
916  }
917  if (nullptr == found) {
918  return false;
919  }
920 
921  auto newMod = moduleRegistry_->replaceModule(iLabel,iPSet,preallocConfig_);
922 
923  globalSchedule_->replaceModule(newMod,iLabel);
924 
925  for(auto s: streamSchedules_) {
926  s->replaceModule(newMod,iLabel);
927  }
928 
929  {
930  //Need to updateLookup in order to make getByToken work
931  auto const runLookup = iRegistry.productLookup(InRun);
932  auto const lumiLookup = iRegistry.productLookup(InLumi);
933  auto const eventLookup = iRegistry.productLookup(InEvent);
934  found->updateLookup(InRun,*runLookup);
935  found->updateLookup(InLumi,*lumiLookup);
936  found->updateLookup(InEvent,*eventLookup);
937  }
938 
939  return true;
940  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:955
std::shared_ptr< ModuleRegistry > moduleRegistry_
Definition: Schedule.h:274
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
PreallocationConfiguration preallocConfig_
Definition: Schedule.h:280
std::unique_ptr< GlobalSchedule > globalSchedule_
Definition: Schedule.h:277
void edm::Schedule::checkForCorrectness ( ) const
private

Check that the schedule is actually runable.

Definition at line 1280 of file Schedule.cc.

References allWorkers(), newFWLiteAna::found, g, bookConverter::max, mergeVDriftHistosByStation::name, cmsHarvester::path, streamSchedules_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by beginJob().

1281  {
1282  //Need to lookup names to ids quickly
1283  std::map<std::string,unsigned int> moduleNamesToIndex;
1284  for(auto worker: allWorkers()) {
1285  moduleNamesToIndex.insert( std::make_pair(worker->description().moduleLabel(),
1286  worker->description().id()));
1287  }
1288 
1289  //If a module to module dependency comes from a path, remember which path
1290  EdgeToPathMap edgeToPathMap;
1291 
1292  //determine the path dependencies
1293  std::vector<std::string> pathNames;
1294  {
1295  streamSchedules_[0]->availablePaths(pathNames);
1296 
1297  std::vector<std::string> moduleNames;
1298  std::vector<std::string> reducedModuleNames;
1299  unsigned int pathIndex=0;
1300  for(auto const& path: pathNames) {
1301  moduleNames.clear();
1302  reducedModuleNames.clear();
1303  std::set<std::string> alreadySeenNames;
1304 
1305  streamSchedules_[0]->modulesInPath(path,moduleNames);
1306  std::string lastModuleName;
1307  unsigned int lastModuleIndex;
1308  for(auto const& name: moduleNames) {
1309  auto found = alreadySeenNames.insert(name);
1310  if(found.second) {
1311  //first time for this path
1312  unsigned int moduleIndex = moduleNamesToIndex[name];
1313  if(not lastModuleName.empty() ) {
1314  edgeToPathMap[std::make_pair(moduleIndex,lastModuleIndex)].push_back(pathIndex);
1315  }
1316  lastModuleName = name;
1317  lastModuleIndex = moduleIndex;
1318  }
1319  }
1320  ++pathIndex;
1321  }
1322  }
1323  {
1324  std::vector<const char*> dependentModules;
1325  //determine the data dependencies
1326  for(auto const& worker: allWorkers()) {
1327  dependentModules.clear();
1328  //NOTE: what about aliases?
1329  worker->modulesDependentUpon(dependentModules);
1330  auto found = moduleNamesToIndex.find(worker->description().moduleLabel());
1331  if (found == moduleNamesToIndex.end()) {
1332  //The module was from a previous process
1333  continue;
1334  }
1335  unsigned int moduleIndex = found->second;
1336  for(auto name: dependentModules) {
1337  edgeToPathMap[std::make_pair(moduleIndex, moduleNamesToIndex[name])].push_back(std::numeric_limits<unsigned int>::max());
1338  }
1339  }
1340  }
1341  //Now use boost graph library to find cycles in the dependencies
1342  std::vector<SimpleEdge> outList;
1343  outList.reserve(edgeToPathMap.size());
1344  for(auto const& edgeInfo: edgeToPathMap) {
1345  outList.push_back(edgeInfo.first);
1346  }
1347 
1348  Graph g(outList.begin(),outList.end(), moduleNamesToIndex.size());
1349 
1350  cycle_detector detector(edgeToPathMap,pathNames,moduleNamesToIndex);
1351  boost::depth_first_search(g,boost::visitor(detector));
1352  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:955
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
tuple path
else: Piece not in the list, fine.
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
void edm::Schedule::clearCounters ( )

Clear all the counters in the trigger report.

Definition at line 1086 of file Schedule.cc.

References streamSchedules_.

1086  {
1087  for(auto const& s: streamSchedules_) {
1088  s->clearCounters();
1089  }
1090  }
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
void edm::Schedule::closeOutputFiles ( )

Definition at line 839 of file Schedule.cc.

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

839  {
840  using std::placeholders::_1;
842  }
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:279
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 1027 of file Schedule.cc.

References endpathsAreActive_, and streamSchedules_.

1027  {
1028  endpathsAreActive_ = active;
1029  for(auto const & s : streamSchedules_) {
1030  s->enableEndPaths(active);
1031  }
1032  }
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
volatile bool endpathsAreActive_
Definition: Schedule.h:286
void edm::Schedule::endJob ( ExceptionCollector collector)

Definition at line 554 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.

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

References streamSchedules_.

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

970  {
971  streamSchedules_[0]->endPaths(oLabelsToFill);
972  }
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
bool edm::Schedule::endPathsEnabled ( ) const

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

Definition at line 1035 of file Schedule.cc.

References endpathsAreActive_.

1035  {
1036  return endpathsAreActive_;
1037  }
volatile bool endpathsAreActive_
Definition: Schedule.h:286
void edm::Schedule::endStream ( unsigned int  iStreamID)

Definition at line 893 of file Schedule.cc.

References assert(), and streamSchedules_.

893  {
894  assert(iStreamID<streamSchedules_.size());
895  streamSchedules_[iStreamID]->endStream();
896  }
assert(m_qm.get())
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
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 995 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().

998  {
999  allModuleDescriptions.clear();
1000  moduleIDToIndex.clear();
1001  modulesWhoseProductsAreConsumedBy.clear();
1002 
1003  allModuleDescriptions.reserve(allWorkers().size());
1004  moduleIDToIndex.reserve(allWorkers().size());
1005  modulesWhoseProductsAreConsumedBy.resize(allWorkers().size());
1006 
1007  std::map<std::string, ModuleDescription const*> labelToDesc;
1008  unsigned int i = 0;
1009  for (auto const& worker : allWorkers()) {
1010  ModuleDescription const* p = worker->descPtr();
1011  allModuleDescriptions.push_back(p);
1012  moduleIDToIndex.push_back(std::pair<unsigned int, unsigned int>(p->id(), i));
1013  labelToDesc[p->moduleLabel()] = p;
1014  ++i;
1015  }
1016  sort_all(moduleIDToIndex);
1017 
1018  i = 0;
1019  for (auto const& worker : allWorkers()) {
1020  std::vector<ModuleDescription const*>& modules = modulesWhoseProductsAreConsumedBy.at(i);
1021  worker->modulesWhoseProductsAreConsumed(modules, preg, labelToDesc);
1022  ++i;
1023  }
1024  }
int i
Definition: DBlmapReader.cc:9
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:955
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:120
preg
Definition: Schedule.cc:370
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 943 of file Schedule.cc.

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

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

943  {
944  std::vector<ModuleDescription const*> result;
945  result.reserve(allWorkers().size());
946 
947  for (auto const& worker : allWorkers()) {
948  ModuleDescription const* p = worker->descPtr();
949  result.push_back(p);
950  }
951  return result;
952  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:955
tuple result
Definition: query.py:137
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 1040 of file Schedule.cc.

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

Referenced by endJob().

1040  {
1041  rep.eventSummary.totalEvents = 0;
1042  rep.eventSummary.totalEventsPassed = 0;
1043  rep.eventSummary.totalEventsFailed = 0;
1044  for(auto& s: streamSchedules_) {
1045  s->getTriggerReport(rep);
1046  }
1047  }
string rep
Definition: cuy.py:1188
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
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 1050 of file Schedule.cc.

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

Referenced by endJob().

1050  {
1051  rep.eventSummary.totalEvents = 0;
1052  rep.eventSummary.cpuTime = 0.;
1053  rep.eventSummary.realTime = 0.;
1054  summaryTimeKeeper_->fillTriggerTimingReport(rep);
1055  }
string rep
Definition: cuy.py:1188
std::unique_ptr< SystemTimeKeeper > summaryTimeKeeper_
Definition: Schedule.h:282
void edm::Schedule::limitOutput ( ParameterSet const &  proc_pset,
BranchIDLists const &  branchIDLists 
)
private

Definition at line 499 of file Schedule.cc.

References all_output_communicators_, EnergyCorrector::c, edm::errors::Configuration, edm::ParameterSet::empty(), edm::hlt::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.

499  {
500  std::string const output("output");
501 
502  ParameterSet const& maxEventsPSet = proc_pset.getUntrackedParameterSet("maxEvents", ParameterSet());
503  int maxEventSpecs = 0;
504  int maxEventsOut = -1;
505  ParameterSet const* vMaxEventsOut = 0;
506  std::vector<std::string> intNamesE = maxEventsPSet.getParameterNamesForType<int>(false);
507  if (search_all(intNamesE, output)) {
508  maxEventsOut = maxEventsPSet.getUntrackedParameter<int>(output);
509  ++maxEventSpecs;
510  }
511  std::vector<std::string> psetNamesE;
512  maxEventsPSet.getParameterSetNames(psetNamesE, false);
513  if (search_all(psetNamesE, output)) {
514  vMaxEventsOut = &maxEventsPSet.getUntrackedParameterSet(output);
515  ++maxEventSpecs;
516  }
517 
518  if (maxEventSpecs > 1) {
520  "\nAt most, one form of 'output' may appear in the 'maxEvents' parameter set";
521  }
522 
523  for (auto c : all_output_communicators_) {
524  OutputModuleDescription desc(branchIDLists, maxEventsOut);
525  if (vMaxEventsOut != 0 && !vMaxEventsOut->empty()) {
526  std::string const& moduleLabel = c->description().moduleLabel();
527  try {
528  desc.maxEvents_ = vMaxEventsOut->getUntrackedParameter<int>(moduleLabel);
529  } catch (Exception const&) {
531  "\nNo entry in 'maxEvents' for output module label '" << moduleLabel << "'.\n";
532  }
533  }
534  c->configure(desc);
535  }
536  }
bool search_all(ForwardSequence const &s, Datum const &d)
Definition: Algorithms.h:46
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:279
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 988 of file Schedule.cc.

References streamSchedules_.

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

990  {
991  streamSchedules_[0]->moduleDescriptionsInEndPath(iEndPathLabel, descriptions, hint);
992  }
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
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 981 of file Schedule.cc.

References streamSchedules_.

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

983  {
984  streamSchedules_[0]->moduleDescriptionsInPath(iPathLabel, descriptions, hint);
985  }
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
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 975 of file Schedule.cc.

References streamSchedules_.

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

976  {
977  streamSchedules_[0]->modulesInPath(iPathLabel,oLabelsToFill);
978  }
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
void edm::Schedule::openNewOutputFilesIfNeeded ( )

Definition at line 844 of file Schedule.cc.

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

844  {
845  using std::placeholders::_1;
847  }
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:279
void edm::Schedule::openOutputFiles ( FileBlock fb)

Definition at line 849 of file Schedule.cc.

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

849  {
850  using std::placeholders::_1;
852  }
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:279
void edm::Schedule::postForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)

Definition at line 902 of file Schedule.cc.

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

902  {
903  using std::placeholders::_1;
904  for_all(allWorkers(), std::bind(&Worker::postForkReacquireResources, _1, iChildIndex, iNumberOfChildren));
905  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:955
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:91
void edm::Schedule::preForkReleaseResources ( )

Definition at line 898 of file Schedule.cc.

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

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

Definition at line 291 of file Schedule.h.

References assert(), and streamSchedules_.

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

Definition at line 309 of file Schedule.h.

References globalSchedule_.

311  {
312  globalSchedule_->processOneGlobal<T>(ep,es,cleaningUpAfterException);
313  }
std::unique_ptr< GlobalSchedule > globalSchedule_
Definition: Schedule.h:277
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 300 of file Schedule.h.

References assert(), and streamSchedules_.

303  {
304  assert(iStreamID<streamSchedules_.size());
305  streamSchedules_[iStreamID]->processOneStream<T>(ep,es,cleaningUpAfterException);
306  }
assert(m_qm.get())
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
long double T
void edm::Schedule::respondToCloseInputFile ( FileBlock const &  fb)

Definition at line 877 of file Schedule.cc.

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

877  {
878  using std::placeholders::_1;
879  for_all(allWorkers(), std::bind(&Worker::respondToCloseInputFile, _1, std::cref(fb)));
880  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:955
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
void respondToCloseInputFile(FileBlock const &fb)
Definition: Worker.h:88
void edm::Schedule::respondToOpenInputFile ( FileBlock const &  fb)

Definition at line 872 of file Schedule.cc.

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

872  {
873  using std::placeholders::_1;
874  for_all(allWorkers(), std::bind(&Worker::respondToOpenInputFile, _1, std::cref(fb)));
875  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:955
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
void respondToOpenInputFile(FileBlock const &fb)
Definition: Worker.h:87
bool edm::Schedule::shouldWeCloseOutput ( ) const

Definition at line 864 of file Schedule.cc.

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

864  {
865  using std::placeholders::_1;
866  // Return true iff at least one output module returns true.
867  return (std::find_if (all_output_communicators_.begin(), all_output_communicators_.end(),
869  != all_output_communicators_.end());
870  }
virtual bool shouldWeCloseFile() const =0
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:279
bool edm::Schedule::terminate ( void  ) const

Return whether each output module has reached its maximum count.

Definition at line 538 of file Schedule.cc.

References all_output_communicators_, and EnergyCorrector::c.

538  {
539  if (all_output_communicators_.empty()) {
540  return false;
541  }
542  for (auto c : all_output_communicators_) {
543  if (!c->limitReached()) {
544  // Found an output module that has not reached output event count.
545  return false;
546  }
547  }
548  LogInfo("SuccessfulTermination")
549  << "The job is terminating successfully because each output module\n"
550  << "has reached its configured limit.\n";
551  return true;
552  }
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:279
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 1058 of file Schedule.cc.

References streamSchedules_.

Referenced by endJob().

1058  {
1059  int returnValue = 0;
1060  for(auto& s: streamSchedules_) {
1061  returnValue += s->totalEvents();
1062  }
1063  return returnValue;
1064  }
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
int edm::Schedule::totalEventsFailed ( ) const

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

Definition at line 1076 of file Schedule.cc.

References streamSchedules_.

1076  {
1077  int returnValue = 0;
1078  for(auto& s: streamSchedules_) {
1079  returnValue += s->totalEventsFailed();
1080  }
1081  return returnValue;
1082  }
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
int edm::Schedule::totalEventsPassed ( ) const

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

Definition at line 1067 of file Schedule.cc.

References streamSchedules_.

1067  {
1068  int returnValue = 0;
1069  for(auto& s: streamSchedules_) {
1070  returnValue += s->totalEventsPassed();
1071  }
1072  return returnValue;
1073  }
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
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 965 of file Schedule.cc.

References streamSchedules_.

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

965  {
966  streamSchedules_[0]->triggerPaths(oLabelsToFill);
967  }
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:275
void edm::Schedule::writeLumi ( LuminosityBlockPrincipal const &  lbp,
ProcessContext const *  processContext 
)

Definition at line 859 of file Schedule.cc.

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

859  {
860  using std::placeholders::_1;
861  for_all(all_output_communicators_, std::bind(&OutputModuleCommunicator::writeLumi, _1, std::cref(lbp), processContext));
862  }
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:279
void edm::Schedule::writeRun ( RunPrincipal const &  rp,
ProcessContext const *  processContext 
)

Definition at line 854 of file Schedule.cc.

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

854  {
855  using std::placeholders::_1;
856  for_all(all_output_communicators_, std::bind(&OutputModuleCommunicator::writeRun, _1, std::cref(rp), processContext));
857  }
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:279

Member Data Documentation

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

Definition at line 286 of file Schedule.h.

Referenced by enableEndPaths(), and endPathsEnabled().

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

Definition at line 277 of file Schedule.h.

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

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

Definition at line 274 of file Schedule.h.

Referenced by changeModule().

PreallocationConfiguration edm::Schedule::preallocConfig_
private

Definition at line 280 of file Schedule.h.

Referenced by changeModule(), and endJob().

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

Definition at line 273 of file Schedule.h.

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

Definition at line 282 of file Schedule.h.

Referenced by getTriggerTimingReport().

bool edm::Schedule::wantSummary_
private

Definition at line 284 of file Schedule.h.

Referenced by endJob().