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

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

Member Function Documentation

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

returns the collection of pointers to workers

Definition at line 953 of file Schedule.cc.

References globalSchedule_.

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

953  {
954  return globalSchedule_->allWorkers();
955  }
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 958 of file Schedule.cc.

References streamSchedules_.

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

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

Definition at line 880 of file Schedule.cc.

References checkForCorrectness(), and globalSchedule_.

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

Definition at line 886 of file Schedule.cc.

References assert(), and streamSchedules_.

886  {
887  assert(iStreamID<streamSchedules_.size());
888  streamSchedules_[iStreamID]->beginStream();
889  }
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 905 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().

907  {
908  Worker* found = nullptr;
909  for (auto const& worker : allWorkers()) {
910  if (worker->description().moduleLabel() == iLabel) {
911  found = worker;
912  break;
913  }
914  }
915  if (nullptr == found) {
916  return false;
917  }
918 
919  auto newMod = moduleRegistry_->replaceModule(iLabel,iPSet,preallocConfig_);
920 
921  globalSchedule_->replaceModule(newMod,iLabel);
922 
923  for(auto s: streamSchedules_) {
924  s->replaceModule(newMod,iLabel);
925  }
926 
927  {
928  //Need to updateLookup in order to make getByToken work
929  auto const runLookup = iRegistry.productLookup(InRun);
930  auto const lumiLookup = iRegistry.productLookup(InLumi);
931  auto const eventLookup = iRegistry.productLookup(InEvent);
932  found->updateLookup(InRun,*runLookup);
933  found->updateLookup(InLumi,*lumiLookup);
934  found->updateLookup(InEvent,*eventLookup);
935  }
936 
937  return true;
938  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:953
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 1278 of file Schedule.cc.

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

Referenced by beginJob().

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

References streamSchedules_.

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

Definition at line 837 of file Schedule.cc.

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

837  {
838  using std::placeholders::_1;
840  }
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 1025 of file Schedule.cc.

References endpathsAreActive_, and streamSchedules_.

1025  {
1026  endpathsAreActive_ = active;
1027  for(auto const & s : streamSchedules_) {
1028  s->enableEndPaths(active);
1029  }
1030  }
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 552 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.

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

References streamSchedules_.

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

968  {
969  streamSchedules_[0]->endPaths(oLabelsToFill);
970  }
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 1033 of file Schedule.cc.

References endpathsAreActive_.

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

Definition at line 891 of file Schedule.cc.

References assert(), and streamSchedules_.

891  {
892  assert(iStreamID<streamSchedules_.size());
893  streamSchedules_[iStreamID]->endStream();
894  }
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 993 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().

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

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

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

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

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

Referenced by endJob().

1038  {
1039  rep.eventSummary.totalEvents = 0;
1040  rep.eventSummary.totalEventsPassed = 0;
1041  rep.eventSummary.totalEventsFailed = 0;
1042  for(auto& s: streamSchedules_) {
1043  s->getTriggerReport(rep);
1044  }
1045  }
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 1048 of file Schedule.cc.

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

Referenced by endJob().

1048  {
1049  rep.eventSummary.totalEvents = 0;
1050  rep.eventSummary.cpuTime = 0.;
1051  rep.eventSummary.realTime = 0.;
1052  summaryTimeKeeper_->fillTriggerTimingReport(rep);
1053  }
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 497 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.

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

References streamSchedules_.

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

988  {
989  streamSchedules_[0]->moduleDescriptionsInEndPath(iEndPathLabel, descriptions, hint);
990  }
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 979 of file Schedule.cc.

References streamSchedules_.

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

981  {
982  streamSchedules_[0]->moduleDescriptionsInPath(iPathLabel, descriptions, hint);
983  }
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 973 of file Schedule.cc.

References streamSchedules_.

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

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

Definition at line 842 of file Schedule.cc.

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

842  {
843  using std::placeholders::_1;
845  }
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 847 of file Schedule.cc.

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

847  {
848  using std::placeholders::_1;
850  }
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 900 of file Schedule.cc.

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

900  {
901  using std::placeholders::_1;
902  for_all(allWorkers(), std::bind(&Worker::postForkReacquireResources, _1, iChildIndex, iNumberOfChildren));
903  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:953
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 896 of file Schedule.cc.

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

896  {
897  using std::placeholders::_1;
899  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:953
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 875 of file Schedule.cc.

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

875  {
876  using std::placeholders::_1;
877  for_all(allWorkers(), std::bind(&Worker::respondToCloseInputFile, _1, std::cref(fb)));
878  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:953
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 870 of file Schedule.cc.

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

870  {
871  using std::placeholders::_1;
872  for_all(allWorkers(), std::bind(&Worker::respondToOpenInputFile, _1, std::cref(fb)));
873  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:953
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 862 of file Schedule.cc.

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

862  {
863  using std::placeholders::_1;
864  // Return true iff at least one output module returns true.
865  return (std::find_if (all_output_communicators_.begin(), all_output_communicators_.end(),
867  != all_output_communicators_.end());
868  }
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 536 of file Schedule.cc.

References all_output_communicators_, and EnergyCorrector::c.

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

References streamSchedules_.

Referenced by endJob().

1056  {
1057  int returnValue = 0;
1058  for(auto& s: streamSchedules_) {
1059  returnValue += s->totalEvents();
1060  }
1061  return returnValue;
1062  }
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 1074 of file Schedule.cc.

References streamSchedules_.

1074  {
1075  int returnValue = 0;
1076  for(auto& s: streamSchedules_) {
1077  returnValue += s->totalEventsFailed();
1078  }
1079  return returnValue;
1080  }
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 1065 of file Schedule.cc.

References streamSchedules_.

1065  {
1066  int returnValue = 0;
1067  for(auto& s: streamSchedules_) {
1068  returnValue += s->totalEventsPassed();
1069  }
1070  return returnValue;
1071  }
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 963 of file Schedule.cc.

References streamSchedules_.

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

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

Definition at line 857 of file Schedule.cc.

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

857  {
858  using std::placeholders::_1;
859  for_all(all_output_communicators_, std::bind(&OutputModuleCommunicator::writeLumi, _1, std::cref(lbp), processContext));
860  }
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 852 of file Schedule.cc.

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

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