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 145 of file StreamSchedule.h.

Member Typedef Documentation

Definition at line 153 of file StreamSchedule.h.

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

Definition at line 152 of file StreamSchedule.h.

Definition at line 149 of file StreamSchedule.h.

Definition at line 157 of file StreamSchedule.h.

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

Definition at line 148 of file StreamSchedule.h.

Definition at line 150 of file StreamSchedule.h.

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

Definition at line 147 of file StreamSchedule.h.

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

Definition at line 151 of file StreamSchedule.h.

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

Definition at line 155 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 140 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_.

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

Member Function Documentation

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

returns the action table

Definition at line 261 of file StreamSchedule.h.

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

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

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

Definition at line 727 of file StreamSchedule.cc.

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

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

727  {
729  }
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 251 of file StreamSchedule.h.

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

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

251  {
252  return workerManager_.allWorkers();
253  }
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 558 of file StreamSchedule.cc.

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

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

Definition at line 520 of file StreamSchedule.cc.

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

520  {
522  }
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 714 of file StreamSchedule.cc.

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

714  {
716  for_all(trig_paths_, boost::bind(&Path::clearCounters, _1));
717  for_all(end_paths_, boost::bind(&Path::clearCounters, _1));
718  for_all(allWorkers(), boost::bind(&Worker::clearCounters, _1));
719  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
void clearCounters()
Definition: Worker.h:116
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
void clearCounters()
Definition: Path.cc:163
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 584 of file StreamSchedule.cc.

References endpathsAreActive_.

584  {
585  endpathsAreActive_ = active;
586  }
volatile bool endpathsAreActive_
bool edm::StreamSchedule::endPathsEnabled ( ) const

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

Definition at line 589 of file StreamSchedule.cc.

References endpathsAreActive_.

589  {
590  return endpathsAreActive_;
591  }
volatile bool endpathsAreActive_
void edm::StreamSchedule::endStream ( )

Definition at line 524 of file StreamSchedule.cc.

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

524  {
526  }
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 498 of file StreamSchedule.cc.

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

Referenced by StreamSchedule().

502  {
503  PathWorkers tmpworkers;
504  fillWorkers(proc_pset, preg, prealloc, processConfiguration, name, true, tmpworkers, 0);
505  Workers holder;
506 
507  for (PathWorkers::iterator wi(tmpworkers.begin()), we(tmpworkers.end()); wi != we; ++wi) {
508  holder.push_back(wi->getWorker());
509  }
510 
511  if (!tmpworkers.empty()) {
512  end_paths_.emplace_back(bitpos, name, tmpworkers, TrigResPtr(), actionTable(), actReg_, &streamContext_, PathContext::PathType::kEndPath);
513  if (wantSummary_) {
514  end_paths_.back().useStopwatch();
515  }
516  }
517  for_all(holder, boost::bind(&StreamSchedule::addToAllWorkers, this, _1));
518  }
std::vector< Worker * > Workers
processConfiguration
Definition: Schedule.cc:362
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:362
prealloc
Definition: Schedule.cc:362
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 470 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().

475  {
476  PathWorkers tmpworkers;
477  Workers holder;
478  fillWorkers(proc_pset, preg, prealloc, processConfiguration, name, false, tmpworkers, labelsOnTriggerPaths);
479 
480  for (PathWorkers::iterator wi(tmpworkers.begin()),
481  we(tmpworkers.end()); wi != we; ++wi) {
482  holder.push_back(wi->getWorker());
483  }
484 
485  // an empty path will cause an extra bit that is not used
486  if (!tmpworkers.empty()) {
487  trig_paths_.emplace_back(bitpos, name, tmpworkers, trptr, actionTable(), actReg_, &streamContext_, PathContext::PathType::kPath);
488  if (wantSummary_) {
489  trig_paths_.back().useStopwatch();
490  }
491  } else {
492  empty_trig_paths_.push_back(bitpos);
493  empty_trig_path_names_.push_back(name);
494  }
495  for_all(holder, boost::bind(&StreamSchedule::addToAllWorkers, this, _1));
496  }
std::vector< Worker * > Workers
std::vector< int > empty_trig_paths_
processConfiguration
Definition: Schedule.cc:362
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:362
prealloc
Definition: Schedule.cc:362
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 411 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().

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

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

546  {
547  std::vector<ModuleDescription const*> result;
548  result.reserve(allWorkers().size());
549 
550  for (auto const& worker : allWorkers()) {
551  ModuleDescription const* p = worker->descPtr();
552  result.push_back(p);
553  }
554  return result;
555  }
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 644 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.

644  {
645  rep.eventSummary.totalEvents += totalEvents();
646  rep.eventSummary.totalEventsPassed += totalEventsPassed();
647  rep.eventSummary.totalEventsFailed += totalEventsFailed();
648 
649  fill_summary(trig_paths_, rep.trigPathSummaries, &fillPathSummary);
650  fill_summary(end_paths_, rep.endPathSummaries, &fillPathSummary);
651  fill_summary(allWorkers(), rep.workerSummaries, &fillWorkerSummary);
652  }
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 705 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.

705  {
706  rep.eventSummary.totalEvents += totalEvents();
707 
708  fill_summary(trig_paths_, rep.trigPathSummaries, &fillPathTimingSummary);
709  fill_summary(end_paths_, rep.endPathSummaries, &fillPathTimingSummary);
710  fill_summary(allWorkers(), rep.workerSummaries, &fillWorkerTimingSummary);
711  }
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 256 of file StreamSchedule.cc.

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

Referenced by StreamSchedule().

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

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

568  {
569  TrigPaths::const_iterator itFound =
570  std::find_if (trig_paths_.begin(),
571  trig_paths_.end(),
572  boost::bind(std::equal_to<std::string>(),
573  iPathLabel,
574  boost::bind(&Path::name, _1)));
575  if (itFound!=trig_paths_.end()) {
576  oLabelsToFill.reserve(itFound->size());
577  for (size_t i = 0; i < itFound->size(); ++i) {
578  oLabelsToFill.push_back(itFound->getWorker(i)->description().moduleLabel());
579  }
580  }
581  }
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 255 of file StreamSchedule.h.

References number_of_unscheduled_modules_.

255  {
257  }
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 350 of file StreamSchedule.h.

References alignCSCRings::action, actionTable(), actReg_, cms::Exception::addContext(), edm::addContextAndPrintException(), edm::convertException::badAllocToEDM(), trackerHits::c, cms::Exception::category(), edm::convertException::charPtrToEDM(), cms::Exception::context(), alignCSCRings::e, empty_trig_paths_, endpathsAreActive_, cppFunctionSkipper::exception, edm::exception_actions::FailPath, edm::ExceptionToActionTable::find(), edm::exception_actions::IgnoreCompletely, edm::hlt::Pass, edm::printCmsExceptionWarning(), edm::WorkerManager::processOneOccurrence(), resetAll(), resetEarlyDelete(), results_, results_inserter_, alignCSCRings::s, edm::exception_actions::SkipEvent, edm::convertException::stdToEDM(), stopwatch_, streamContext_, streamID_, AlCaHLTBitMon_QueryRunRegistry::string, edm::convertException::stringToEDM(), total_events_, total_passed_, edm::convertException::unknownToEDM(), and workerManager_.

352  {
353  this->resetAll();
354  for (int empty_trig_path : empty_trig_paths_) {
355  results_->at(empty_trig_path) = HLTPathStatus(hlt::Pass, 0);
356  }
357 
358  T::setStreamContext(streamContext_, ep);
359  StreamScheduleSignalSentry<T> sentry(actReg_.get(), &ep, &es, &streamContext_);
360 
361  // A RunStopwatch, but only if we are processing an event.
362  RunStopwatch stopwatch(stopwatch_);
363 
364  // This call takes care of the unscheduled processing.
365  workerManager_.processOneOccurrence<T>(ep, es, streamID_, &streamContext_, &streamContext_, cleaningUpAfterException);
366 
367  ++total_events_;
368  try {
369  try {
370  try {
371  if (runTriggerPaths<T>(ep, es, &streamContext_)) {
372  ++total_passed_;
373  }
374  }
375  catch(cms::Exception& e) {
377  assert (action != exception_actions::IgnoreCompletely);
378  assert (action != exception_actions::FailPath);
379  if (action == exception_actions::SkipEvent) {
380  edm::printCmsExceptionWarning("SkipEvent", e);
381  } else {
382  throw;
383  }
384  }
385 
386  try {
387  CPUTimer timer;
388  ParentContext parentContext(&streamContext_);
389  if (results_inserter_.get()) results_inserter_->doWork<T>(ep, es, &timer,streamID_, parentContext, &streamContext_);
390  }
391  catch (cms::Exception & ex) {
392  if (T::isEvent_) {
393  ex.addContext("Calling produce method for module TriggerResultInserter");
394  }
395  std::ostringstream ost;
396  ost << "Processing " << ep.id();
397  ex.addContext(ost.str());
398  throw;
399  }
400 
401  if (endpathsAreActive_) runEndPaths<T>(ep, es, &streamContext_);
403  }
404  catch (cms::Exception& e) { throw; }
405  catch(std::bad_alloc& bda) { convertException::badAllocToEDM(); }
406  catch (std::exception& e) { convertException::stdToEDM(e); }
408  catch(char const* c) { convertException::charPtrToEDM(c); }
409  catch (...) { convertException::unknownToEDM(); }
410  }
411  catch(cms::Exception& ex) {
412  if (ex.context().empty()) {
413  addContextAndPrintException("Calling function StreamSchedule::processOneEvent", ex, cleaningUpAfterException);
414  } else {
415  addContextAndPrintException("", ex, cleaningUpAfterException);
416  }
417  throw;
418  }
419  //If we got here no other exception has happened so we can propogate any Service related exceptions
420  sentry.allowThrow();
421  }
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
void stdToEDM(std::exception const &e)
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)
void charPtrToEDM(char const *c)
WorkerPtr results_inserter_
void stringToEDM(std::string &s)
RunStopwatch::StopwatchPointer stopwatch_
void addContext(std::string const &context)
Definition: Exception.cc:227
long double T
template<typename T >
void edm::StreamSchedule::processOneStream ( typename T::MyPrincipal &  principal,
EventSetup const &  eventSetup,
bool  cleaningUpAfterException = false 
)

Definition at line 424 of file StreamSchedule.h.

References actReg_, edm::addContextAndPrintException(), edm::convertException::badAllocToEDM(), trackerHits::c, edm::convertException::charPtrToEDM(), cms::Exception::context(), alignCSCRings::e, endpathsAreActive_, cppFunctionSkipper::exception, edm::WorkerManager::processOneOccurrence(), resetAll(), alignCSCRings::s, edm::convertException::stdToEDM(), streamContext_, streamID_, AlCaHLTBitMon_QueryRunRegistry::string, edm::convertException::stringToEDM(), edm::convertException::unknownToEDM(), and workerManager_.

426  {
427  this->resetAll();
428 
429  T::setStreamContext(streamContext_, ep);
430  StreamScheduleSignalSentry<T> sentry(actReg_.get(), &ep, &es, &streamContext_);
431 
432  // This call takes care of the unscheduled processing.
433  workerManager_.processOneOccurrence<T>(ep, es, streamID_, &streamContext_, &streamContext_, cleaningUpAfterException);
434 
435  try {
436  try {
437  runTriggerPaths<T>(ep, es, &streamContext_);
438 
439  if (endpathsAreActive_) runEndPaths<T>(ep, es, &streamContext_);
440  }
441  catch (cms::Exception& e) { throw; }
442  catch(std::bad_alloc& bda) { convertException::badAllocToEDM(); }
443  catch (std::exception& e) { convertException::stdToEDM(e); }
445  catch(char const* c) { convertException::charPtrToEDM(c); }
446  catch (...) { convertException::unknownToEDM(); }
447  }
448  catch(cms::Exception& ex) {
449  if (ex.context().empty()) {
450  addContextAndPrintException("Calling function StreamSchedule::processOneStream", ex, cleaningUpAfterException);
451  } else {
452  addContextAndPrintException("", ex, cleaningUpAfterException);
453  }
454  throw;
455  }
456  //If we got here no other exception has happened so we can propogate any Service related exceptions
457  sentry.allowThrow();
458  }
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_
void stdToEDM(std::exception const &e)
StreamContext streamContext_
std::list< std::string > const & context() const
Definition: Exception.cc:191
void charPtrToEDM(char const *c)
void stringToEDM(std::string &s)
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 528 of file StreamSchedule.cc.

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

529  {
530  Worker* found = nullptr;
531  for (auto const& worker : allWorkers()) {
532  if (worker->description().moduleLabel() == iLabel) {
533  found = worker;
534  break;
535  }
536  }
537  if (nullptr == found) {
538  return;
539  }
540 
541  iMod->replaceModuleFor(found);
542  found->beginStream(streamID_,streamContext_);
543  }
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 344 of file StreamSchedule.h.

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

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

Definition at line 722 of file StreamSchedule.cc.

References results_.

Referenced by processOneEvent(), and processOneStream().

722  {
723  results_->reset();
724  }
void edm::StreamSchedule::resetEarlyDelete ( )
private

Definition at line 732 of file StreamSchedule.cc.

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

Referenced by initializeEarlyDelete(), and processOneEvent().

732  {
733  //must be sure we have cleared the count first
734  for(auto& count:earlyDeleteBranchToCount_) {
735  count.second = 0;
736  }
737  //now reset based on how many helpers use that branch
739  ++(earlyDeleteBranchToCount_[index].second);
740  }
741  for(auto& helper: earlyDeleteHelpers_) {
742  helper.reset();
743  }
744  }
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 471 of file StreamSchedule.h.

References end_paths_, AlCaHLTBitMon_ParallelJobs::p, and streamID_.

471  {
472  // Note there is no state-checking safety controlling the
473  // activation/deactivation of endpaths.
474  for(auto& p : end_paths_) {
475  p.processOneOccurrence<T>(ep, es, streamID_, context);
476  }
477  }
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 462 of file StreamSchedule.h.

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

462  {
463  for(auto& p : trig_paths_) {
464  p.processOneOccurrence<T>(ep, es, streamID_, context);
465  }
466  return results_->accept();
467  }
long double T
StreamID edm::StreamSchedule::streamID ( ) const
inline

Definition at line 188 of file StreamSchedule.h.

References streamID_.

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

Definition at line 190 of file StreamSchedule.h.

References stopwatch_.

190  {
191  return std::pair<double, double>(stopwatch_->cpuTime(), stopwatch_->realTime());
192  }
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 212 of file StreamSchedule.h.

References total_events_.

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

212  {
213  return total_events_;
214  }
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 224 of file StreamSchedule.h.

References totalEvents(), and totalEventsPassed().

Referenced by getTriggerReport().

224  {
225  return totalEvents() - totalEventsPassed();
226  }
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 218 of file StreamSchedule.h.

References total_passed_.

Referenced by getTriggerReport(), and totalEventsFailed().

218  {
219  return total_passed_;
220  }

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 319 of file StreamSchedule.h.

Referenced by initializeEarlyDelete(), and resetEarlyDelete().

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

Definition at line 329 of file StreamSchedule.h.

Referenced by initializeEarlyDelete(), and resetEarlyDelete().

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

Definition at line 326 of file StreamSchedule.h.

Referenced by initializeEarlyDelete(), and resetEarlyDelete().

vstring edm::StreamSchedule::empty_trig_path_names_
private

Definition at line 314 of file StreamSchedule.h.

Referenced by fillTrigPath().

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

Definition at line 313 of file StreamSchedule.h.

Referenced by fillTrigPath(), and processOneEvent().

vstring edm::StreamSchedule::end_path_name_list_
private

Definition at line 306 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 334 of file StreamSchedule.h.

Referenced by numberOfUnscheduledModules(), and StreamSchedule().

TrigResPtr edm::StreamSchedule::results_
private

Definition at line 308 of file StreamSchedule.h.

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

WorkerPtr edm::StreamSchedule::results_inserter_
private

Definition at line 310 of file StreamSchedule.h.

Referenced by processOneEvent(), and StreamSchedule().

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

Definition at line 331 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 332 of file StreamSchedule.h.

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

int edm::StreamSchedule::total_passed_
private

Definition at line 333 of file StreamSchedule.h.

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

vstring edm::StreamSchedule::trig_name_list_
private

Definition at line 305 of file StreamSchedule.h.

Referenced by StreamSchedule().

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

Definition at line 338 of file StreamSchedule.h.

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

WorkerManager edm::StreamSchedule::workerManager_
private