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::StreamSchedule Class Reference

#include <StreamSchedule.h>

Public Types

typedef std::vector
< boost::shared_ptr
< OutputModuleCommunicator > > 
AllOutputModuleCommunicators
 
typedef std::vector< Worker * > AllWorkers
 
typedef std::vector< PathNonTrigPaths
 
typedef std::vector< WorkerInPathPathWorkers
 
typedef std::vector< PathTrigPaths
 
typedef boost::shared_ptr
< HLTGlobalStatus
TrigResPtr
 
typedef std::vector< std::string > vstring
 
typedef boost::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 beginStream ()
 
void clearCounters ()
 Clear all the counters in the trigger report. More...
 
void enableEndPaths (bool active)
 
bool endPathsEnabled () const
 
void endStream ()
 
std::vector< ModuleDescription
const * > 
getAllModuleDescriptions () const
 
void getTriggerReport (TriggerReport &rep) const
 
void getTriggerTimingReport (TriggerTimingReport &rep) 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...
 
unsigned int numberOfUnscheduledModules () const
 
template<typename T >
void processOneEvent (typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
 
template<typename T >
void processOneStream (typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
 
void replaceModule (maker::ModuleHolder *iMod, std::string const &iLabel)
 clone the type of module with label iLabel but configure with iPSet. More...
 
StreamID streamID () const
 
 StreamSchedule (TriggerResultInserter *inserter, boost::shared_ptr< ModuleRegistry >, ParameterSet &proc_pset, service::TriggerNamesService &tns, PreallocationConfiguration const &prealloc, ProductRegistry &pregistry, BranchIDListHelper &branchIDListHelper, ExceptionToActionTable const &actions, boost::shared_ptr< ActivityRegistry > areg, boost::shared_ptr< ProcessConfiguration > processConfiguration, bool allowEarlyDelete, StreamID streamID, ProcessContext const *processContext)
 
 StreamSchedule (StreamSchedule const &)=delete
 
std::pair< double, double > timeCpuReal () const
 
int totalEvents () const
 
int totalEventsFailed () const
 
int totalEventsPassed () const
 

Private Member Functions

ExceptionToActionTable const & actionTable () const
 returns the action table More...
 
void addToAllWorkers (Worker *w)
 
void fillEndPath (ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, boost::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name)
 
void fillTrigPath (ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, boost::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name, TrigResPtr, vstring *labelsOnTriggerPaths)
 
void fillWorkers (ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, boost::shared_ptr< ProcessConfiguration const > processConfiguration, std::string const &name, bool ignoreFilters, PathWorkers &out, vstring *labelsOnPaths)
 
void initializeEarlyDelete (ModuleRegistry &modReg, edm::ParameterSet const &opts, edm::ProductRegistry const &preg, bool allowEarlyDelete)
 
void reportSkipped (EventPrincipal const &ep) const
 
void resetAll ()
 
void resetEarlyDelete ()
 
template<typename T >
void runEndPaths (typename T::MyPrincipal &, EventSetup const &, typename T::Context const *)
 
template<typename T >
bool runTriggerPaths (typename T::MyPrincipal &, EventSetup const &, typename T::Context const *)
 

Private Attributes

boost::shared_ptr
< ActivityRegistry
actReg_
 
std::vector< std::pair
< BranchID, unsigned int > > 
earlyDeleteBranchToCount_
 
std::vector< EarlyDeleteHelperearlyDeleteHelpers_
 
std::vector< unsigned int > earlyDeleteHelperToBranchIndicies_
 
vstring empty_trig_path_names_
 
std::vector< int > empty_trig_paths_
 
vstring end_path_name_list_
 
TrigPaths end_paths_
 
volatile bool endpathsAreActive_
 
unsigned int number_of_unscheduled_modules_
 
TrigResPtr results_
 
WorkerPtr results_inserter_
 
RunStopwatch::StopwatchPointer stopwatch_
 
StreamContext streamContext_
 
StreamID streamID_
 
int total_events_
 
int total_passed_
 
vstring trig_name_list_
 
TrigPaths trig_paths_
 
bool wantSummary_
 
WorkerManager workerManager_
 

Detailed Description

Definition at line 143 of file StreamSchedule.h.

Member Typedef Documentation

Definition at line 151 of file StreamSchedule.h.

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

Definition at line 150 of file StreamSchedule.h.

Definition at line 147 of file StreamSchedule.h.

Definition at line 155 of file StreamSchedule.h.

typedef std::vector<Path> edm::StreamSchedule::TrigPaths

Definition at line 146 of file StreamSchedule.h.

Definition at line 148 of file StreamSchedule.h.

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

Definition at line 145 of file StreamSchedule.h.

typedef boost::shared_ptr<Worker> edm::StreamSchedule::WorkerPtr

Definition at line 149 of file StreamSchedule.h.

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

Definition at line 153 of file StreamSchedule.h.

Constructor & Destructor Documentation

edm::StreamSchedule::StreamSchedule ( TriggerResultInserter inserter,
boost::shared_ptr< ModuleRegistry modReg,
ParameterSet proc_pset,
service::TriggerNamesService tns,
PreallocationConfiguration const &  prealloc,
ProductRegistry pregistry,
BranchIDListHelper branchIDListHelper,
ExceptionToActionTable const &  actions,
boost::shared_ptr< ActivityRegistry areg,
boost::shared_ptr< ProcessConfiguration processConfiguration,
bool  allowEarlyDelete,
StreamID  streamID,
ProcessContext const *  processContext 
)

Definition at line 136 of file StreamSchedule.cc.

References actReg_, addToAllWorkers(), edm::WorkerManager::addToUnscheduledWorkers(), allWorkers(), end_path_name_list_, end_paths_, fillEndPath(), fillTrigPath(), edm::ParameterSet::getParameter(), edm::ParameterSet::getPSetForUpdate(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), initializeEarlyDelete(), diffTwoXMLs::label, number_of_unscheduled_modules_, geometryDiff::opts, results_, results_inserter_, edm::WorkerManager::setOnDemandProducts(), edm::TriggerResultInserter::setTrigResultForStream(), trig_name_list_, trig_paths_, edm::StreamID::value(), wantSummary_, and workerManager_.

148  :
149  workerManager_(modReg,areg, actions),
150  actReg_(areg),
151  trig_name_list_(tns.getTrigPaths()),
152  end_path_name_list_(tns.getEndPaths()),
153  results_(new HLTGlobalStatus(trig_name_list_.size())),
155  trig_paths_(),
156  end_paths_(),
157  stopwatch_(tns.wantSummary() ? new RunStopwatch::StopwatchPointer::element_type : static_cast<RunStopwatch::StopwatchPointer::element_type*> (nullptr)),
158  total_events_(),
159  total_passed_(),
162  streamContext_(streamID_, processContext),
163  wantSummary_(tns.wantSummary()),
164  endpathsAreActive_(true) {
165 
166  ParameterSet const& opts = proc_pset.getUntrackedParameterSet("options", ParameterSet());
167  bool hasPath = false;
168 
169  int trig_bitpos = 0;
170  trig_paths_.reserve(trig_name_list_.size());
171  vstring labelsOnTriggerPaths;
172  for (auto const& trig_name : trig_name_list_) {
173  fillTrigPath(proc_pset, preg, &prealloc, processConfiguration, trig_bitpos, trig_name, results_, &labelsOnTriggerPaths);
174  ++trig_bitpos;
175  hasPath = true;
176  }
177 
178  if (hasPath) {
179  // the results inserter stands alone
180  inserter->setTrigResultForStream(streamID.value(),results_);
181 
182  results_inserter_ = makeInserter(actions, actReg_, inserter);
184  }
185 
186  // fill normal endpaths
187  int bitpos = 0;
188  end_paths_.reserve(end_path_name_list_.size());
189  for (auto const& end_path_name : end_path_name_list_) {
190  fillEndPath(proc_pset, preg, &prealloc, processConfiguration, bitpos, end_path_name);
191  ++bitpos;
192  }
193 
194  //See if all modules were used
195  std::set<std::string> usedWorkerLabels;
196  for (auto const& worker : allWorkers()) {
197  usedWorkerLabels.insert(worker->description().moduleLabel());
198  }
199  std::vector<std::string> modulesInConfig(proc_pset.getParameter<std::vector<std::string> >("@all_modules"));
200  std::set<std::string> modulesInConfigSet(modulesInConfig.begin(), modulesInConfig.end());
201  std::vector<std::string> unusedLabels;
202  set_difference(modulesInConfigSet.begin(), modulesInConfigSet.end(),
203  usedWorkerLabels.begin(), usedWorkerLabels.end(),
204  back_inserter(unusedLabels));
205  //does the configuration say we should allow on demand?
206  bool allowUnscheduled = opts.getUntrackedParameter<bool>("allowUnscheduled", false);
207  std::set<std::string> unscheduledLabels;
208  std::vector<std::string> shouldBeUsedLabels;
209  if (!unusedLabels.empty()) {
210  //Need to
211  // 1) create worker
212  // 2) if it is a WorkerT<EDProducer>, add it to our list
213  // 3) hand list to our delayed reader
214  for (auto const& label : unusedLabels) {
215  if (allowUnscheduled) {
216  bool isTracked;
217  ParameterSet* modulePSet(proc_pset.getPSetForUpdate(label, isTracked));
218  assert(isTracked);
219  assert(modulePSet != nullptr);
220  workerManager_.addToUnscheduledWorkers(*modulePSet, preg, &prealloc, processConfiguration, label, wantSummary_, unscheduledLabels, shouldBeUsedLabels);
221  } else {
222  //everthing is marked are unused so no 'on demand' allowed
223  shouldBeUsedLabels.push_back(label);
224  }
225  }
226  if (!shouldBeUsedLabels.empty()) {
227  std::ostringstream unusedStream;
228  unusedStream << "'" << shouldBeUsedLabels.front() << "'";
229  for (std::vector<std::string>::iterator itLabel = shouldBeUsedLabels.begin() + 1,
230  itLabelEnd = shouldBeUsedLabels.end();
231  itLabel != itLabelEnd;
232  ++itLabel) {
233  unusedStream << ",'" << *itLabel << "'";
234  }
235  LogInfo("path")
236  << "The following module labels are not assigned to any path:\n"
237  << unusedStream.str()
238  << "\n";
239  }
240  }
241  if (!unscheduledLabels.empty()) {
242  number_of_unscheduled_modules_=unscheduledLabels.size();
243  workerManager_.setOnDemandProducts(preg, unscheduledLabels);
244  }
245 
246 
247  initializeEarlyDelete(*modReg, opts,preg,allowEarlyDelete);
248 
249  } // StreamSchedule::StreamSchedule
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
vector< string > vstring
Definition: ExoticaDQM.cc:75
void initializeEarlyDelete(ModuleRegistry &modReg, edm::ParameterSet const &opts, edm::ProductRegistry const &preg, bool allowEarlyDelete)
void setOnDemandProducts(ProductRegistry &pregistry, std::set< std::string > const &unscheduledLabels) const
volatile bool endpathsAreActive_
void addToUnscheduledWorkers(ParameterSet &pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, boost::shared_ptr< ProcessConfiguration > processConfiguration, std::string label, bool useStopwatch, std::set< std::string > &unscheduledLabels, std::vector< std::string > &shouldBeUsedLabels)
processConfiguration
Definition: Schedule.cc:369
void addToAllWorkers(Worker *w)
actions
Definition: Schedule.cc:369
unsigned int number_of_unscheduled_modules_
WorkerManager workerManager_
boost::shared_ptr< ActivityRegistry > actReg_
StreamID streamID() const
StreamContext streamContext_
void fillEndPath(ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, boost::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name)
areg
Definition: Schedule.cc:369
WorkerPtr results_inserter_
unsigned int value() const
Definition: StreamID.h:46
RunStopwatch::StopwatchPointer stopwatch_
preg
Definition: Schedule.cc:369
void fillTrigPath(ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, boost::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name, TrigResPtr, vstring *labelsOnTriggerPaths)
prealloc
Definition: Schedule.cc:369
edm::StreamSchedule::StreamSchedule ( StreamSchedule const &  )
delete

Member Function Documentation

ExceptionToActionTable const& edm::StreamSchedule::actionTable ( ) const
inlineprivate

returns the action table

Definition at line 259 of file StreamSchedule.h.

References edm::WorkerManager::actionTable(), and workerManager_.

Referenced by fillEndPath(), fillTrigPath(), and processOneEvent().

259  {
260  return workerManager_.actionTable();
261  }
WorkerManager workerManager_
ExceptionToActionTable const & actionTable() const
Definition: WorkerManager.h:68
void edm::StreamSchedule::addToAllWorkers ( Worker w)
private

Definition at line 723 of file StreamSchedule.cc.

References edm::WorkerManager::addToAllWorkers(), wantSummary_, and workerManager_.

Referenced by fillEndPath(), fillTrigPath(), and StreamSchedule().

723  {
725  }
WorkerManager workerManager_
T w() const
void addToAllWorkers(Worker *w, bool useStopwatch)
AllWorkers const& edm::StreamSchedule::allWorkers ( ) const
inline

returns the collection of pointers to workers

Definition at line 249 of file StreamSchedule.h.

References edm::WorkerManager::allWorkers(), and workerManager_.

Referenced by clearCounters(), getAllModuleDescriptions(), getTriggerReport(), getTriggerTimingReport(), initializeEarlyDelete(), replaceModule(), and StreamSchedule().

249  {
250  return workerManager_.allWorkers();
251  }
WorkerManager workerManager_
AllWorkers const & allWorkers() const
Definition: WorkerManager.h:64
void edm::StreamSchedule::availablePaths ( std::vector< std::string > &  oLabelsToFill) const

adds to oLabelsToFill the labels for all paths in the process

Definition at line 554 of file StreamSchedule.cc.

References edm::Path::name(), create_public_lumi_plots::transform, and trig_paths_.

554  {
555  oLabelsToFill.reserve(trig_paths_.size());
556  std::transform(trig_paths_.begin(),
557  trig_paths_.end(),
558  std::back_inserter(oLabelsToFill),
559  boost::bind(&Path::name, _1));
560  }
std::string const & name() const
Definition: Path.h:65
void edm::StreamSchedule::beginStream ( )

Definition at line 516 of file StreamSchedule.cc.

References edm::WorkerManager::beginStream(), streamContext_, streamID_, and workerManager_.

516  {
518  }
WorkerManager workerManager_
StreamContext streamContext_
void beginStream(StreamID iID, StreamContext &streamContext)
void edm::StreamSchedule::clearCounters ( )

Clear all the counters in the trigger report.

Definition at line 710 of file StreamSchedule.cc.

References allWorkers(), edm::Path::clearCounters(), edm::Worker::clearCounters(), end_paths_, edm::for_all(), total_events_, total_passed_, and trig_paths_.

710  {
712  for_all(trig_paths_, boost::bind(&Path::clearCounters, _1));
713  for_all(end_paths_, boost::bind(&Path::clearCounters, _1));
714  for_all(allWorkers(), boost::bind(&Worker::clearCounters, _1));
715  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
void clearCounters()
Definition: Worker.h:117
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
void clearCounters()
Definition: Path.cc:161
void edm::StreamSchedule::enableEndPaths ( bool  active)

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

Definition at line 580 of file StreamSchedule.cc.

References endpathsAreActive_.

580  {
581  endpathsAreActive_ = active;
582  }
volatile bool endpathsAreActive_
bool edm::StreamSchedule::endPathsEnabled ( ) const

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

Definition at line 585 of file StreamSchedule.cc.

References endpathsAreActive_.

585  {
586  return endpathsAreActive_;
587  }
volatile bool endpathsAreActive_
void edm::StreamSchedule::endStream ( )

Definition at line 520 of file StreamSchedule.cc.

References edm::WorkerManager::endStream(), streamContext_, streamID_, and workerManager_.

520  {
522  }
void endStream(StreamID iID, StreamContext &streamContext)
WorkerManager workerManager_
StreamContext streamContext_
void edm::StreamSchedule::fillEndPath ( ParameterSet proc_pset,
ProductRegistry preg,
PreallocationConfiguration const *  prealloc,
boost::shared_ptr< ProcessConfiguration const >  processConfiguration,
int  bitpos,
std::string const &  name 
)
private

Definition at line 494 of file StreamSchedule.cc.

References actionTable(), actReg_, addToAllWorkers(), end_paths_, fillWorkers(), edm::for_all(), edm::PathContext::kEndPath, streamContext_, and wantSummary_.

Referenced by StreamSchedule().

498  {
499  PathWorkers tmpworkers;
500  fillWorkers(proc_pset, preg, prealloc, processConfiguration, name, true, tmpworkers, 0);
501  Workers holder;
502 
503  for (PathWorkers::iterator wi(tmpworkers.begin()), we(tmpworkers.end()); wi != we; ++wi) {
504  holder.push_back(wi->getWorker());
505  }
506 
507  if (!tmpworkers.empty()) {
508  end_paths_.emplace_back(bitpos, name, tmpworkers, TrigResPtr(), actionTable(), actReg_, &streamContext_, PathContext::PathType::kEndPath);
509  if (wantSummary_) {
510  end_paths_.back().useStopwatch();
511  }
512  }
513  for_all(holder, boost::bind(&StreamSchedule::addToAllWorkers, this, _1));
514  }
std::vector< Worker * > Workers
processConfiguration
Definition: Schedule.cc:369
void addToAllWorkers(Worker *w)
ExceptionToActionTable const & actionTable() const
returns the action table
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
std::vector< WorkerInPath > PathWorkers
boost::shared_ptr< ActivityRegistry > actReg_
void fillWorkers(ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, boost::shared_ptr< ProcessConfiguration const > processConfiguration, std::string const &name, bool ignoreFilters, PathWorkers &out, vstring *labelsOnPaths)
StreamContext streamContext_
boost::shared_ptr< HLTGlobalStatus > TrigResPtr
preg
Definition: Schedule.cc:369
prealloc
Definition: Schedule.cc:369
void edm::StreamSchedule::fillTrigPath ( ParameterSet proc_pset,
ProductRegistry preg,
PreallocationConfiguration const *  prealloc,
boost::shared_ptr< ProcessConfiguration const >  processConfiguration,
int  bitpos,
std::string const &  name,
TrigResPtr  trptr,
vstring labelsOnTriggerPaths 
)
private

Definition at line 466 of file StreamSchedule.cc.

References actionTable(), actReg_, addToAllWorkers(), empty_trig_path_names_, empty_trig_paths_, fillWorkers(), edm::for_all(), edm::PathContext::kPath, streamContext_, trig_paths_, and wantSummary_.

Referenced by StreamSchedule().

471  {
472  PathWorkers tmpworkers;
473  Workers holder;
474  fillWorkers(proc_pset, preg, prealloc, processConfiguration, name, false, tmpworkers, labelsOnTriggerPaths);
475 
476  for (PathWorkers::iterator wi(tmpworkers.begin()),
477  we(tmpworkers.end()); wi != we; ++wi) {
478  holder.push_back(wi->getWorker());
479  }
480 
481  // an empty path will cause an extra bit that is not used
482  if (!tmpworkers.empty()) {
483  trig_paths_.emplace_back(bitpos, name, tmpworkers, trptr, actionTable(), actReg_, &streamContext_, PathContext::PathType::kPath);
484  if (wantSummary_) {
485  trig_paths_.back().useStopwatch();
486  }
487  } else {
488  empty_trig_paths_.push_back(bitpos);
489  empty_trig_path_names_.push_back(name);
490  }
491  for_all(holder, boost::bind(&StreamSchedule::addToAllWorkers, this, _1));
492  }
std::vector< Worker * > Workers
std::vector< int > empty_trig_paths_
processConfiguration
Definition: Schedule.cc:369
void addToAllWorkers(Worker *w)
ExceptionToActionTable const & actionTable() const
returns the action table
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
std::vector< WorkerInPath > PathWorkers
boost::shared_ptr< ActivityRegistry > actReg_
void fillWorkers(ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, boost::shared_ptr< ProcessConfiguration const > processConfiguration, std::string const &name, bool ignoreFilters, PathWorkers &out, vstring *labelsOnPaths)
StreamContext streamContext_
vstring empty_trig_path_names_
preg
Definition: Schedule.cc:369
prealloc
Definition: Schedule.cc:369
void edm::StreamSchedule::fillWorkers ( ParameterSet proc_pset,
ProductRegistry preg,
PreallocationConfiguration const *  prealloc,
boost::shared_ptr< ProcessConfiguration const >  processConfiguration,
std::string const &  name,
bool  ignoreFilters,
PathWorkers out,
vstring labelsOnPaths 
)
private

Definition at line 407 of file StreamSchedule.cc.

References edm::errors::Configuration, edm::Worker::description(), end_path_name_list_, edm::hlt::Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getPSetForUpdate(), edm::ParameterSet::getUntrackedParameter(), edm::WorkerManager::getWorker(), edm::WorkerInPath::Ignore, edm::Worker::kFilter, edm::ModuleDescription::moduleName(), edm::Worker::moduleType(), mergeVDriftHistosByStation::name, edm::WorkerInPath::Normal, edm::search_all(), AlCaHLTBitMon_QueryRunRegistry::string, edm::WorkerInPath::Veto, and workerManager_.

Referenced by fillEndPath(), and fillTrigPath().

414  {
415  vstring modnames = proc_pset.getParameter<vstring>(name);
416  PathWorkers tmpworkers;
417 
418  unsigned int placeInPath = 0;
419  for (auto const& name : modnames) {
420 
421  if (labelsOnPaths) labelsOnPaths->push_back(name);
422 
424  if (name[0] == '!') filterAction = WorkerInPath::Veto;
425  else if (name[0] == '-') filterAction = WorkerInPath::Ignore;
426 
427  std::string moduleLabel = name;
428  if (filterAction != WorkerInPath::Normal) moduleLabel.erase(0, 1);
429 
430  bool isTracked;
431  ParameterSet* modpset = proc_pset.getPSetForUpdate(moduleLabel, isTracked);
432  if (modpset == 0) {
433  std::string pathType("endpath");
435  pathType = std::string("path");
436  }
438  "The unknown module label \"" << moduleLabel <<
439  "\" appears in " << pathType << " \"" << name <<
440  "\"\n please check spelling or remove that label from the path.";
441  }
442  assert(isTracked);
443 
444  Worker* worker = workerManager_.getWorker(*modpset, preg, prealloc, processConfiguration, moduleLabel);
445  if (ignoreFilters && filterAction != WorkerInPath::Ignore && worker->moduleType()==Worker::kFilter) {
446  // We have a filter on an end path, and the filter is not explicitly ignored.
447  // See if the filter is allowed.
448  std::vector<std::string> allowed_filters = proc_pset.getUntrackedParameter<vstring>("@filters_on_endpaths");
449  if (!search_all(allowed_filters, worker->description().moduleName())) {
450  // Filter is not allowed. Ignore the result, and issue a warning.
451  filterAction = WorkerInPath::Ignore;
452  LogWarning("FilterOnEndPath")
453  << "The EDFilter '" << worker->description().moduleName() << "' with module label '" << moduleLabel << "' appears on EndPath '" << name << "'.\n"
454  << "The return value of the filter will be ignored.\n"
455  << "To suppress this warning, either remove the filter from the endpath,\n"
456  << "or explicitly ignore it in the configuration by using cms.ignore().\n";
457  }
458  }
459  tmpworkers.emplace_back(worker, filterAction, placeInPath);
460  ++placeInPath;
461  }
462 
463  out.swap(tmpworkers);
464  }
vector< string > vstring
Definition: ExoticaDQM.cc:75
processConfiguration
Definition: Schedule.cc:369
WorkerManager workerManager_
Worker * getWorker(ParameterSet &pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, boost::shared_ptr< ProcessConfiguration const > processConfiguration, std::string const &label)
std::vector< WorkerInPath > PathWorkers
tuple out
Definition: dbtoconf.py:99
bool search_all(ForwardSequence const &s, Datum const &d)
Definition: Algorithms.h:46
preg
Definition: Schedule.cc:369
prealloc
Definition: Schedule.cc:369
std::vector< ModuleDescription const * > edm::StreamSchedule::getAllModuleDescriptions ( ) const

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

Definition at line 542 of file StreamSchedule.cc.

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

542  {
543  std::vector<ModuleDescription const*> result;
544  result.reserve(allWorkers().size());
545 
546  for (auto const& worker : allWorkers()) {
547  ModuleDescription const* p = worker->descPtr();
548  result.push_back(p);
549  }
550  return result;
551  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
tuple result
Definition: query.py:137
tuple size
Write out results.
void edm::StreamSchedule::getTriggerReport ( TriggerReport rep) const

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

Definition at line 640 of file StreamSchedule.cc.

References allWorkers(), end_paths_, edm::TriggerReport::endPathSummaries, edm::TriggerReport::eventSummary, edm::fillPathSummary(), edm::fillWorkerSummary(), edm::EventSummary::totalEvents, totalEvents(), edm::EventSummary::totalEventsFailed, totalEventsFailed(), edm::EventSummary::totalEventsPassed, totalEventsPassed(), trig_paths_, edm::TriggerReport::trigPathSummaries, and edm::TriggerReport::workerSummaries.

640  {
641  rep.eventSummary.totalEvents += totalEvents();
642  rep.eventSummary.totalEventsPassed += totalEventsPassed();
643  rep.eventSummary.totalEventsFailed += totalEventsFailed();
644 
645  fill_summary(trig_paths_, rep.trigPathSummaries, &fillPathSummary);
646  fill_summary(end_paths_, rep.endPathSummaries, &fillPathSummary);
647  fill_summary(allWorkers(), rep.workerSummaries, &fillWorkerSummary);
648  }
string rep
Definition: cuy.py:1188
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
int totalEventsFailed() const
int totalEvents() const
int totalEventsPassed() const
static void fillPathSummary(Path const &path, PathSummary &sum)
static void fillWorkerSummary(Worker const *pw, WorkerSummary &sum)
void edm::StreamSchedule::getTriggerTimingReport ( TriggerTimingReport rep) const

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

Definition at line 701 of file StreamSchedule.cc.

References allWorkers(), end_paths_, edm::TriggerTimingReport::endPathSummaries, edm::TriggerTimingReport::eventSummary, edm::fillPathTimingSummary(), edm::fillWorkerTimingSummary(), edm::EventTimingSummary::totalEvents, totalEvents(), trig_paths_, edm::TriggerTimingReport::trigPathSummaries, and edm::TriggerTimingReport::workerSummaries.

701  {
702  rep.eventSummary.totalEvents += totalEvents();
703 
704  fill_summary(trig_paths_, rep.trigPathSummaries, &fillPathTimingSummary);
705  fill_summary(end_paths_, rep.endPathSummaries, &fillPathTimingSummary);
706  fill_summary(allWorkers(), rep.workerSummaries, &fillWorkerTimingSummary);
707  }
string rep
Definition: cuy.py:1188
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
int totalEvents() const
static void fillPathTimingSummary(Path const &path, PathTimingSummary &sum)
static void fillWorkerTimingSummary(Worker const *pw, WorkerTimingSummary &sum)
void edm::StreamSchedule::initializeEarlyDelete ( ModuleRegistry modReg,
edm::ParameterSet const &  opts,
edm::ProductRegistry const &  preg,
bool  allowEarlyDelete 
)
private

Definition at line 252 of file StreamSchedule.cc.

References allWorkers(), edm::maker::ModuleHolder::createOutputModuleCommunicator(), delta, earlyDeleteBranchToCount_, earlyDeleteHelpers_, earlyDeleteHelperToBranchIndicies_, end_paths_, edm::ModuleRegistry::forAllModuleHolders(), newFWLiteAna::found, edm::pset::Registry::getMapped(), cmsHarvester::index, edm::InEvent, edm::pset::Registry::instance(), ConfigFiles::l, n, AlCaHLTBitMon_ParallelJobs::p, resetEarlyDelete(), AlCaHLTBitMon_QueryRunRegistry::string, trig_paths_, and w().

Referenced by StreamSchedule().

254  {
255  //for now, if have a subProcess, don't allow early delete
256  // In the future we should use the SubProcess's 'keep list' to decide what can be kept
257  if(not allowEarlyDelete) return;
258 
259  //see if 'canDeleteEarly' was set and if so setup the list with those products actually
260  // registered for this job
261  std::multimap<std::string,Worker*> branchToReadingWorker;
262  initializeBranchToReadingWorker(opts,preg,branchToReadingWorker);
263 
264  //If no delete early items have been specified we don't have to do anything
265  if(branchToReadingWorker.size()==0) {
266  return;
267  }
268  const std::vector<std::string> kEmpty;
269  std::map<Worker*,unsigned int> reserveSizeForWorker;
270  unsigned int upperLimitOnReadingWorker =0;
271  unsigned int upperLimitOnIndicies = 0;
272  unsigned int nUniqueBranchesToDelete=branchToReadingWorker.size();
273 
274  //talk with output modules first
275  modReg.forAllModuleHolders([this, &branchToReadingWorker,&nUniqueBranchesToDelete](maker::ModuleHolder* iHolder){
276  auto comm = iHolder->createOutputModuleCommunicator();
277  if (comm) {
278  if(branchToReadingWorker.size()>0) {
279  //If an OutputModule needs a product, we can't delete it early
280  // so we should remove it from our list
281  SelectedProductsForBranchType const&kept = comm->keptProducts();
282  for( auto const& item: kept[InEvent]) {
283  auto found = branchToReadingWorker.equal_range(item->branchName());
284  if(found.first !=found.second) {
285  --nUniqueBranchesToDelete;
286  branchToReadingWorker.erase(found.first,found.second);
287  }
288  }
289  }
290  }
291  });
292 
293  if(branchToReadingWorker.size()==0) {
294  return;
295  }
296 
297  for (auto w :allWorkers()) {
298  //determine if this module could read a branch we want to delete early
299  auto pset = pset::Registry::instance()->getMapped(w->description().parameterSetID());
300  if(0!=pset) {
301  auto branches = pset->getUntrackedParameter<std::vector<std::string>>("mightGet",kEmpty);
302  if(not branches.empty()) {
303  ++upperLimitOnReadingWorker;
304  }
305  for(auto const& branch:branches){
306  auto found = branchToReadingWorker.equal_range(branch);
307  if(found.first != found.second) {
308  ++upperLimitOnIndicies;
309  ++reserveSizeForWorker[w];
310  if(nullptr == found.first->second) {
311  found.first->second = w;
312  } else {
313  branchToReadingWorker.insert(make_pair(found.first->first,w));
314  }
315  }
316  }
317  }
318  }
319  {
320  auto it = branchToReadingWorker.begin();
321  std::vector<std::string> unusedBranches;
322  while(it !=branchToReadingWorker.end()) {
323  if(it->second == nullptr) {
324  unusedBranches.push_back(it->first);
325  //erasing the object invalidates the iterator so must advance it first
326  auto temp = it;
327  ++it;
328  branchToReadingWorker.erase(temp);
329  } else {
330  ++it;
331  }
332  }
333  if(not unusedBranches.empty()) {
334  LogWarning l("UnusedProductsForCanDeleteEarly");
335  l<<"The following products in the 'canDeleteEarly' list are not used in this job and will be ignored.\n"
336  " If possible, remove the producer from the job or add the product to the producer's own 'mightGet' list.";
337  for(auto const& n:unusedBranches){
338  l<<"\n "<<n;
339  }
340  }
341  }
342  if(0!=branchToReadingWorker.size()) {
343  earlyDeleteHelpers_.reserve(upperLimitOnReadingWorker);
344  earlyDeleteHelperToBranchIndicies_.resize(upperLimitOnIndicies,0);
345  earlyDeleteBranchToCount_.reserve(nUniqueBranchesToDelete);
346  std::map<const Worker*,EarlyDeleteHelper*> alreadySeenWorkers;
347  std::string lastBranchName;
348  size_t nextOpenIndex = 0;
349  unsigned int* beginAddress = &(earlyDeleteHelperToBranchIndicies_.front());
350  for(auto& branchAndWorker:branchToReadingWorker) {
351  if(lastBranchName != branchAndWorker.first) {
352  //have to put back the period we removed earlier in order to get the proper name
353  BranchID bid(branchAndWorker.first+".");
354  earlyDeleteBranchToCount_.emplace_back(std::make_pair(bid,0U));
355  lastBranchName = branchAndWorker.first;
356  }
357  auto found = alreadySeenWorkers.find(branchAndWorker.second);
358  if(alreadySeenWorkers.end() == found) {
359  //NOTE: we will set aside enough space in earlyDeleteHelperToBranchIndicies_ to accommodate
360  // all the branches that might be read by this worker. However, initially we will only tell the
361  // EarlyDeleteHelper about the first one. As additional branches are added via 'appendIndex' the
362  // EarlyDeleteHelper will automatically advance its internal end pointer.
363  size_t index = nextOpenIndex;
364  size_t nIndices = reserveSizeForWorker[branchAndWorker.second];
366  earlyDeleteHelpers_.emplace_back(EarlyDeleteHelper(beginAddress+index,
367  beginAddress+index+1,
369  branchAndWorker.second->setEarlyDeleteHelper(&(earlyDeleteHelpers_.back()));
370  alreadySeenWorkers.insert(std::make_pair(branchAndWorker.second,&(earlyDeleteHelpers_.back())));
371  nextOpenIndex +=nIndices;
372  } else {
373  found->second->appendIndex(earlyDeleteBranchToCount_.size()-1);
374  }
375  }
376 
377  //Now we can compactify the earlyDeleteHelperToBranchIndicies_ since we may have over estimated the
378  // space needed for each module
379  auto itLast = earlyDeleteHelpers_.begin();
380  for(auto it = earlyDeleteHelpers_.begin()+1;it != earlyDeleteHelpers_.end();++it) {
381  if(itLast->end() != it->begin()) {
382  //figure the offset for next Worker since it hasn't been moved yet so it has the original address
383  unsigned int delta = it->begin()- itLast->end();
384  it->shiftIndexPointers(delta);
385 
387  (itLast->end()-beginAddress),
389  (it->begin()-beginAddress));
390  }
391  itLast = it;
392  }
393  earlyDeleteHelperToBranchIndicies_.erase(earlyDeleteHelperToBranchIndicies_.begin()+(itLast->end()-beginAddress),
395 
396  //now tell the paths about the deleters
397  for(auto& p : trig_paths_) {
398  p.setEarlyDeleteHelpers(alreadySeenWorkers);
399  }
400  for(auto& p : end_paths_) {
401  p.setEarlyDeleteHelpers(alreadySeenWorkers);
402  }
404  }
405  }
dbl * delta
Definition: mlp_gen.cc:36
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
std::vector< std::pair< BranchID, unsigned int > > earlyDeleteBranchToCount_
bool getMapped(key_type const &k, value_type &result) const
Definition: Registry.cc:20
boost::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
std::vector< unsigned int > earlyDeleteHelperToBranchIndicies_
T w() const
preg
Definition: Schedule.cc:369
static Registry * instance()
Definition: Registry.cc:14
std::vector< EarlyDeleteHelper > earlyDeleteHelpers_
void edm::StreamSchedule::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 563 of file StreamSchedule.cc.

References i, edm::Path::name(), and trig_paths_.

564  {
565  TrigPaths::const_iterator itFound =
566  std::find_if (trig_paths_.begin(),
567  trig_paths_.end(),
568  boost::bind(std::equal_to<std::string>(),
569  iPathLabel,
570  boost::bind(&Path::name, _1)));
571  if (itFound!=trig_paths_.end()) {
572  oLabelsToFill.reserve(itFound->size());
573  for (size_t i = 0; i < itFound->size(); ++i) {
574  oLabelsToFill.push_back(itFound->getWorker(i)->description().moduleLabel());
575  }
576  }
577  }
int i
Definition: DBlmapReader.cc:9
std::string const & name() const
Definition: Path.h:65
unsigned int edm::StreamSchedule::numberOfUnscheduledModules ( ) const
inline

Definition at line 253 of file StreamSchedule.h.

References number_of_unscheduled_modules_.

253  {
255  }
unsigned int number_of_unscheduled_modules_
template<typename T >
void edm::StreamSchedule::processOneEvent ( typename T::MyPrincipal &  principal,
EventSetup const &  eventSetup,
bool  cleaningUpAfterException = false 
)

Definition at line 348 of file StreamSchedule.h.

References alignCSCRings::action, actionTable(), actReg_, cms::Exception::addContext(), edm::addContextAndPrintException(), cms::Exception::category(), cms::Exception::context(), alignCSCRings::e, empty_trig_paths_, endpathsAreActive_, edm::exception_actions::FailPath, edm::ExceptionToActionTable::find(), edm::exception_actions::IgnoreCompletely, edm::hlt::Pass, edm::printCmsExceptionWarning(), edm::WorkerManager::processOneOccurrence(), resetAll(), resetEarlyDelete(), results_, results_inserter_, edm::exception_actions::SkipEvent, stopwatch_, streamContext_, streamID_, total_events_, total_passed_, workerManager_, and edm::convertException::wrap().

350  {
351  this->resetAll();
352  for (int empty_trig_path : empty_trig_paths_) {
353  results_->at(empty_trig_path) = HLTPathStatus(hlt::Pass, 0);
354  }
355 
356  T::setStreamContext(streamContext_, ep);
357  StreamScheduleSignalSentry<T> sentry(actReg_.get(), &streamContext_);
358 
359  // A RunStopwatch, but only if we are processing an event.
360  RunStopwatch stopwatch(stopwatch_);
361 
362  // This call takes care of the unscheduled processing.
363  workerManager_.processOneOccurrence<T>(ep, es, streamID_, &streamContext_, &streamContext_, cleaningUpAfterException);
364 
365  ++total_events_;
366  try {
367  convertException::wrap([&]() {
368  try {
369  if (runTriggerPaths<T>(ep, es, &streamContext_)) {
370  ++total_passed_;
371  }
372  }
373  catch(cms::Exception& e) {
375  assert (action != exception_actions::IgnoreCompletely);
376  assert (action != exception_actions::FailPath);
377  if (action == exception_actions::SkipEvent) {
378  edm::printCmsExceptionWarning("SkipEvent", e);
379  } else {
380  throw;
381  }
382  }
383 
384  try {
385  CPUTimer timer;
386  ParentContext parentContext(&streamContext_);
387  if (results_inserter_.get()) results_inserter_->doWork<T>(ep, es, &timer,streamID_, parentContext, &streamContext_);
388  }
389  catch (cms::Exception & ex) {
390  if (T::isEvent_) {
391  ex.addContext("Calling produce method for module TriggerResultInserter");
392  }
393  std::ostringstream ost;
394  ost << "Processing " << ep.id();
395  ex.addContext(ost.str());
396  throw;
397  }
398 
399  if (endpathsAreActive_) runEndPaths<T>(ep, es, &streamContext_);
401  });
402  }
403  catch(cms::Exception& ex) {
404  if (ex.context().empty()) {
405  addContextAndPrintException("Calling function StreamSchedule::processOneEvent", ex, cleaningUpAfterException);
406  } else {
407  addContextAndPrintException("", ex, cleaningUpAfterException);
408  }
409  throw;
410  }
411  //If we got here no other exception has happened so we can propogate any Service related exceptions
412  sentry.allowThrow();
413  }
std::vector< int > empty_trig_paths_
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetup const &eventSetup, StreamID streamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
Definition: WorkerManager.h:92
volatile bool endpathsAreActive_
void addContextAndPrintException(char const *context, cms::Exception &ex, bool disablePrint)
std::string const & category() const
Definition: Exception.cc:183
exception_actions::ActionCodes find(const std::string &category) const
ExceptionToActionTable const & actionTable() const
returns the action table
WorkerManager workerManager_
boost::shared_ptr< ActivityRegistry > actReg_
accept
Definition: HLTenums.h:19
StreamContext streamContext_
std::list< std::string > const & context() const
Definition: Exception.cc:191
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e, edm::JobReport *jobRep=0, int rc=-1)
WorkerPtr results_inserter_
RunStopwatch::StopwatchPointer stopwatch_
void addContext(std::string const &context)
Definition: Exception.cc:227
auto wrap(F iFunc) -> decltype(iFunc())
long double T
template<typename T >
void edm::StreamSchedule::processOneStream ( typename T::MyPrincipal &  principal,
EventSetup const &  eventSetup,
bool  cleaningUpAfterException = false 
)

Definition at line 416 of file StreamSchedule.h.

References actReg_, edm::addContextAndPrintException(), cms::Exception::context(), endpathsAreActive_, edm::WorkerManager::processOneOccurrence(), resetAll(), streamContext_, streamID_, workerManager_, and edm::convertException::wrap().

418  {
419  this->resetAll();
420 
421  T::setStreamContext(streamContext_, ep);
422  StreamScheduleSignalSentry<T> sentry(actReg_.get(), &streamContext_);
423 
424  // This call takes care of the unscheduled processing.
425  workerManager_.processOneOccurrence<T>(ep, es, streamID_, &streamContext_, &streamContext_, cleaningUpAfterException);
426 
427  try {
428  convertException::wrap([&]() {
429  runTriggerPaths<T>(ep, es, &streamContext_);
430 
431  if (endpathsAreActive_) runEndPaths<T>(ep, es, &streamContext_);
432  });
433  }
434  catch(cms::Exception& ex) {
435  if (ex.context().empty()) {
436  addContextAndPrintException("Calling function StreamSchedule::processOneStream", ex, cleaningUpAfterException);
437  } else {
438  addContextAndPrintException("", ex, cleaningUpAfterException);
439  }
440  throw;
441  }
442  //If we got here no other exception has happened so we can propogate any Service related exceptions
443  sentry.allowThrow();
444  }
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetup const &eventSetup, StreamID streamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
Definition: WorkerManager.h:92
volatile bool endpathsAreActive_
void addContextAndPrintException(char const *context, cms::Exception &ex, bool disablePrint)
WorkerManager workerManager_
boost::shared_ptr< ActivityRegistry > actReg_
StreamContext streamContext_
std::list< std::string > const & context() const
Definition: Exception.cc:191
auto wrap(F iFunc) -> decltype(iFunc())
long double T
void edm::StreamSchedule::replaceModule ( maker::ModuleHolder iMod,
std::string const &  iLabel 
)

clone the type of module with label iLabel but configure with iPSet.

Definition at line 524 of file StreamSchedule.cc.

References allWorkers(), edm::Worker::beginStream(), newFWLiteAna::found, edm::maker::ModuleHolder::replaceModuleFor(), streamContext_, and streamID_.

525  {
526  Worker* found = nullptr;
527  for (auto const& worker : allWorkers()) {
528  if (worker->description().moduleLabel() == iLabel) {
529  found = worker;
530  break;
531  }
532  }
533  if (nullptr == found) {
534  return;
535  }
536 
537  iMod->replaceModuleFor(found);
538  found->beginStream(streamID_,streamContext_);
539  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
StreamContext streamContext_
void edm::StreamSchedule::reportSkipped ( EventPrincipal const &  ep) const
inlineprivate

Definition at line 342 of file StreamSchedule.h.

References edm::EventID::event(), edm::EventPrincipal::id(), and edm::EventID::run().

342  {
343  Service<JobReport> reportSvc;
344  reportSvc->reportSkippedEvent(ep.id().run(), ep.id().event());
345  }
void edm::StreamSchedule::resetAll ( )
private

Definition at line 718 of file StreamSchedule.cc.

References results_.

Referenced by processOneEvent(), and processOneStream().

718  {
719  results_->reset();
720  }
void edm::StreamSchedule::resetEarlyDelete ( )
private

Definition at line 728 of file StreamSchedule.cc.

References prof2calltree::count, earlyDeleteBranchToCount_, earlyDeleteHelpers_, earlyDeleteHelperToBranchIndicies_, and cmsHarvester::index.

Referenced by initializeEarlyDelete(), and processOneEvent().

728  {
729  //must be sure we have cleared the count first
730  for(auto& count:earlyDeleteBranchToCount_) {
731  count.second = 0;
732  }
733  //now reset based on how many helpers use that branch
735  ++(earlyDeleteBranchToCount_[index].second);
736  }
737  for(auto& helper: earlyDeleteHelpers_) {
738  helper.reset();
739  }
740  }
std::vector< std::pair< BranchID, unsigned int > > earlyDeleteBranchToCount_
std::vector< unsigned int > earlyDeleteHelperToBranchIndicies_
std::vector< EarlyDeleteHelper > earlyDeleteHelpers_
template<typename T >
void edm::StreamSchedule::runEndPaths ( typename T::MyPrincipal &  ep,
EventSetup const &  es,
typename T::Context const *  context 
)
private

Definition at line 457 of file StreamSchedule.h.

References end_paths_, AlCaHLTBitMon_ParallelJobs::p, and streamID_.

457  {
458  // Note there is no state-checking safety controlling the
459  // activation/deactivation of endpaths.
460  for(auto& p : end_paths_) {
461  p.processOneOccurrence<T>(ep, es, streamID_, context);
462  }
463  }
long double T
template<typename T >
bool edm::StreamSchedule::runTriggerPaths ( typename T::MyPrincipal &  ep,
EventSetup const &  es,
typename T::Context const *  context 
)
private

Definition at line 448 of file StreamSchedule.h.

References AlCaHLTBitMon_ParallelJobs::p, results_, streamID_, and trig_paths_.

448  {
449  for(auto& p : trig_paths_) {
450  p.processOneOccurrence<T>(ep, es, streamID_, context);
451  }
452  return results_->accept();
453  }
long double T
StreamID edm::StreamSchedule::streamID ( ) const
inline

Definition at line 186 of file StreamSchedule.h.

References streamID_.

186 { return streamID_; }
std::pair<double, double> edm::StreamSchedule::timeCpuReal ( ) const
inline

Definition at line 188 of file StreamSchedule.h.

References stopwatch_.

188  {
189  return std::pair<double, double>(stopwatch_->cpuTime(), stopwatch_->realTime());
190  }
RunStopwatch::StopwatchPointer stopwatch_
int edm::StreamSchedule::totalEvents ( ) const
inline

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

Definition at line 210 of file StreamSchedule.h.

References total_events_.

Referenced by getTriggerReport(), getTriggerTimingReport(), and totalEventsFailed().

210  {
211  return total_events_;
212  }
int edm::StreamSchedule::totalEventsFailed ( ) const
inline

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

Definition at line 222 of file StreamSchedule.h.

References totalEvents(), and totalEventsPassed().

Referenced by getTriggerReport().

222  {
223  return totalEvents() - totalEventsPassed();
224  }
int totalEvents() const
int totalEventsPassed() const
int edm::StreamSchedule::totalEventsPassed ( ) const
inline

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

Definition at line 216 of file StreamSchedule.h.

References total_passed_.

Referenced by getTriggerReport(), and totalEventsFailed().

216  {
217  return total_passed_;
218  }

Member Data Documentation

boost::shared_ptr<ActivityRegistry> edm::StreamSchedule::actReg_
private
std::vector<std::pair<BranchID,unsigned int> > edm::StreamSchedule::earlyDeleteBranchToCount_
private

Definition at line 317 of file StreamSchedule.h.

Referenced by initializeEarlyDelete(), and resetEarlyDelete().

std::vector<EarlyDeleteHelper> edm::StreamSchedule::earlyDeleteHelpers_
private

Definition at line 327 of file StreamSchedule.h.

Referenced by initializeEarlyDelete(), and resetEarlyDelete().

std::vector<unsigned int> edm::StreamSchedule::earlyDeleteHelperToBranchIndicies_
private

Definition at line 324 of file StreamSchedule.h.

Referenced by initializeEarlyDelete(), and resetEarlyDelete().

vstring edm::StreamSchedule::empty_trig_path_names_
private

Definition at line 312 of file StreamSchedule.h.

Referenced by fillTrigPath().

std::vector<int> edm::StreamSchedule::empty_trig_paths_
private

Definition at line 311 of file StreamSchedule.h.

Referenced by fillTrigPath(), and processOneEvent().

vstring edm::StreamSchedule::end_path_name_list_
private

Definition at line 304 of file StreamSchedule.h.

Referenced by fillWorkers(), and StreamSchedule().

TrigPaths edm::StreamSchedule::end_paths_
private
volatile bool edm::StreamSchedule::endpathsAreActive_
private
unsigned int edm::StreamSchedule::number_of_unscheduled_modules_
private

Definition at line 332 of file StreamSchedule.h.

Referenced by numberOfUnscheduledModules(), and StreamSchedule().

TrigResPtr edm::StreamSchedule::results_
private

Definition at line 306 of file StreamSchedule.h.

Referenced by processOneEvent(), resetAll(), runTriggerPaths(), and StreamSchedule().

WorkerPtr edm::StreamSchedule::results_inserter_
private

Definition at line 308 of file StreamSchedule.h.

Referenced by processOneEvent(), and StreamSchedule().

RunStopwatch::StopwatchPointer edm::StreamSchedule::stopwatch_
private

Definition at line 329 of file StreamSchedule.h.

Referenced by processOneEvent(), and timeCpuReal().

StreamContext edm::StreamSchedule::streamContext_
private
StreamID edm::StreamSchedule::streamID_
private
int edm::StreamSchedule::total_events_
private

Definition at line 330 of file StreamSchedule.h.

Referenced by clearCounters(), processOneEvent(), and totalEvents().

int edm::StreamSchedule::total_passed_
private

Definition at line 331 of file StreamSchedule.h.

Referenced by clearCounters(), processOneEvent(), and totalEventsPassed().

vstring edm::StreamSchedule::trig_name_list_
private

Definition at line 303 of file StreamSchedule.h.

Referenced by StreamSchedule().

TrigPaths edm::StreamSchedule::trig_paths_
private
bool edm::StreamSchedule::wantSummary_
private

Definition at line 336 of file StreamSchedule.h.

Referenced by addToAllWorkers(), fillEndPath(), fillTrigPath(), and StreamSchedule().

WorkerManager edm::StreamSchedule::workerManager_
private