CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

edm::UnscheduledCallProducer Class Reference

#include <Schedule.h>

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

List of all members.

Public Member Functions

void addWorker (Worker *aWorker)
template<typename T >
void runNow (typename T::MyPrincipal &p, EventSetup const &es)
 UnscheduledCallProducer ()

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 310 of file Schedule.h.


Constructor & Destructor Documentation

edm::UnscheduledCallProducer::UnscheduledCallProducer ( ) [inline]

Definition at line 312 of file Schedule.h.


Member Function Documentation

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

Definition at line 313 of file Schedule.h.

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

                                    {
      assert(0 != aWorker);
      labelToWorkers_[aWorker->description().moduleLabel()] = aWorker;
    }
template<typename T >
void edm::UnscheduledCallProducer::runNow ( typename T::MyPrincipal &  p,
EventSetup const &  es 
) [inline]

Definition at line 319 of file Schedule.h.

References labelToWorkers_, and L1TEmulatorMonitor_cff::p.

                                                                {
      //do nothing for event since we will run when requested
      if(!T::isEvent_) {
        for(std::map<std::string, Worker*>::iterator it = labelToWorkers_.begin(), itEnd=labelToWorkers_.end();
            it != itEnd;
            ++it) {
          CPUTimer timer;
          it->second->doWork<T>(p, es, 0, &timer);
        }
      }
    }
virtual bool edm::UnscheduledCallProducer::tryToFillImpl ( std::string const &  moduleLabel,
EventPrincipal event,
EventSetup const &  eventSetup,
CurrentProcessingContext const *  iContext 
) [inline, private, virtual]

Implements edm::UnscheduledHandler.

Definition at line 332 of file Schedule.h.

References event(), and labelToWorkers_.

                                                                         {
      std::map<std::string, Worker*>::const_iterator itFound =
        labelToWorkers_.find(moduleLabel);
      if(itFound != labelToWorkers_.end()) {
        CPUTimer timer;
        itFound->second->doWork<OccurrenceTraits<EventPrincipal, BranchActionBegin> >(event, eventSetup, iContext, &timer);
        return true;
      }
      return false;
    }

Member Data Documentation

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

Definition at line 345 of file Schedule.h.

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