CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::UnscheduledCallProducer Class Reference

#include <Schedule.h>

Inheritance diagram for edm::UnscheduledCallProducer:
edm::UnscheduledHandler

Public Member Functions

void addWorker (Worker *aWorker)
 
template<typename T >
void runNow (typename T::MyPrincipal &p, EventSetup const &es)
 
 UnscheduledCallProducer ()
 
- Public Member Functions inherited from edm::UnscheduledHandler
void setEventSetup (EventSetup const &iSetup)
 
bool tryToFill (std::string const &label, EventPrincipal &iEvent)
 returns true if found an EDProducer and ran it More...
 
 UnscheduledHandler ()
 
virtual ~UnscheduledHandler ()
 

Private Member Functions

virtual bool tryToFillImpl (std::string const &moduleLabel, EventPrincipal &event, EventSetup const &eventSetup, CurrentProcessingContext const *iContext)
 

Private Attributes

std::map< std::string, Worker * > labelToWorkers_
 

Detailed Description

Definition at line 351 of file Schedule.h.

Constructor & Destructor Documentation

edm::UnscheduledCallProducer::UnscheduledCallProducer ( )
inline

Definition at line 353 of file Schedule.h.

std::map< std::string, Worker * > labelToWorkers_
Definition: Schedule.h:427

Member Function Documentation

void edm::UnscheduledCallProducer::addWorker ( Worker aWorker)
inline

Definition at line 354 of file Schedule.h.

References edm::Worker::description(), labelToWorkers_, and edm::ModuleDescription::moduleLabel().

354  {
355  assert(0 != aWorker);
356  labelToWorkers_[aWorker->description().moduleLabel()] = aWorker;
357  }
std::map< std::string, Worker * > labelToWorkers_
Definition: Schedule.h:427
template<typename T >
void edm::UnscheduledCallProducer::runNow ( typename T::MyPrincipal &  p,
EventSetup const &  es 
)
inline

Definition at line 360 of file Schedule.h.

References cms::Exception::addContext(), edm::InLumi, edm::InRun, labelToWorkers_, and AlCaHLTBitMon_ParallelJobs::p.

360  {
361  //do nothing for event since we will run when requested
362  if(!T::isEvent_) {
363  for(std::map<std::string, Worker*>::iterator it = labelToWorkers_.begin(), itEnd=labelToWorkers_.end();
364  it != itEnd;
365  ++it) {
366  CPUTimer timer;
367  try {
368  it->second->doWork<T>(p, es, 0, &timer);
369  }
370  catch (cms::Exception & ex) {
371  std::ostringstream ost;
372  if (T::isEvent_) {
373  ost << "Calling event method";
374  }
375  else if (T::begin_ && T::branchType_ == InRun) {
376  ost << "Calling beginRun";
377  }
378  else if (T::begin_ && T::branchType_ == InLumi) {
379  ost << "Calling beginLuminosityBlock";
380  }
381  else if (!T::begin_ && T::branchType_ == InLumi) {
382  ost << "Calling endLuminosityBlock";
383  }
384  else if (!T::begin_ && T::branchType_ == InRun) {
385  ost << "Calling endRun";
386  }
387  else {
388  // It should be impossible to get here ...
389  ost << "Calling unknown function";
390  }
391  ost << " for unscheduled module " << it->second->description().moduleName()
392  << "/'" << it->second->description().moduleLabel() << "'";
393  ex.addContext(ost.str());
394  ost.str("");
395  ost << "Processing " << p.id();
396  ex.addContext(ost.str());
397  throw;
398  }
399  }
400  }
401  }
void addContext(std::string const &context)
Definition: Exception.cc:227
long double T
std::map< std::string, Worker * > labelToWorkers_
Definition: Schedule.h:427
virtual bool edm::UnscheduledCallProducer::tryToFillImpl ( std::string const &  moduleLabel,
EventPrincipal event,
EventSetup const &  eventSetup,
CurrentProcessingContext const *  iContext 
)
inlineprivatevirtual

Implements edm::UnscheduledHandler.

Definition at line 404 of file Schedule.h.

References cms::Exception::addContext(), event(), and labelToWorkers_.

407  {
408  std::map<std::string, Worker*>::const_iterator itFound =
409  labelToWorkers_.find(moduleLabel);
410  if(itFound != labelToWorkers_.end()) {
411  CPUTimer timer;
412  try {
413  itFound->second->doWork<OccurrenceTraits<EventPrincipal, BranchActionBegin> >(event, eventSetup, iContext, &timer);
414  }
415  catch (cms::Exception & ex) {
416  std::ostringstream ost;
417  ost << "Calling produce method for unscheduled module "
418  << itFound->second->description().moduleName() << "/'"
419  << itFound->second->description().moduleLabel() << "'";
420  ex.addContext(ost.str());
421  throw;
422  }
423  return true;
424  }
425  return false;
426  }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void addContext(std::string const &context)
Definition: Exception.cc:227
std::map< std::string, Worker * > labelToWorkers_
Definition: Schedule.h:427

Member Data Documentation

std::map<std::string, Worker*> edm::UnscheduledCallProducer::labelToWorkers_
private

Definition at line 427 of file Schedule.h.

Referenced by addWorker(), runNow(), and tryToFillImpl().