1 #ifndef FWCore_Framework_Schedule_h
2 #define FWCore_Framework_Schedule_h
82 #include "boost/shared_ptr.hpp"
93 class TriggerNamesService;
97 class ExceptionCollector;
100 class UnscheduledCallProducer;
120 boost::shared_ptr<ActivityRegistry> areg,
121 boost::shared_ptr<ProcessConfiguration> processConfiguration,
126 template <
typename T>
129 bool cleaningUpAfterException =
false);
180 void availablePaths(std::vector<std::string>& oLabelsToFill)
const;
184 std::vector<std::string>& oLabelsToFill)
const;
247 template <
typename T>
250 template <
typename T>
261 std::set<std::string>
const& modulesInConfigSet,
264 std::map<std::string, std::vector<std::pair<std::string, int> > >& outputModulePathPositions);
268 boost::shared_ptr<ProcessConfiguration const> processConfiguration,
273 boost::shared_ptr<ProcessConfiguration const> processConfiguration,
275 vstring* labelsOnTriggerPaths);
278 boost::shared_ptr<ProcessConfiguration const> processConfiguration,
279 int bitpos, std::string
const&
name);
337 template <
typename T>
342 ep(principal),
es(setup) {};
347 typename T::MyPrincipal&
ep;
355 assert(0 != aWorker);
359 template <
typename T>
368 it->second->doWork<
T>(
p, es, 0, &timer);
371 std::ostringstream ost;
373 ost <<
"Calling event method";
375 else if (T::begin_ && T::branchType_ ==
InRun) {
376 ost <<
"Calling beginRun";
378 else if (T::begin_ && T::branchType_ ==
InLumi) {
379 ost <<
"Calling beginLuminosityBlock";
381 else if (!T::begin_ && T::branchType_ ==
InLumi) {
382 ost <<
"Calling endLuminosityBlock";
384 else if (!T::begin_ && T::branchType_ ==
InRun) {
385 ost <<
"Calling endRun";
389 ost <<
"Calling unknown function";
391 ost <<
" for unscheduled module " << it->second->description().moduleName()
392 <<
"/'" << it->second->description().moduleLabel() <<
"'";
395 ost <<
"Processing " << p.id();
408 std::map<std::string, Worker*>::const_iterator itFound =
416 std::ostringstream ost;
417 ost <<
"Calling produce method for unscheduled module "
418 << itFound->second->description().moduleName() <<
"/'"
419 << itFound->second->description().moduleLabel() <<
"'";
434 reportSvc->reportSkippedEvent(ep.
id().
run(), ep.
id().
event());
437 template <
typename T>
441 bool cleaningUpAfterException) {
457 if (runTriggerPaths<T>(ep, es)) {
479 ex.
addContext(
"Calling produce method for module TriggerResultInserter");
481 std::ostringstream ost;
482 ost <<
"Processing " << ep.id();
510 template <
typename T>
517 template <
typename T>
std::vector< Path > NonTrigPaths
EventNumber_t event() const
void initializeEarlyDelete(edm::ParameterSet const &opts, edm::ProductRegistry const &preg, edm::ParameterSet const *subProcPSet)
std::pair< double, double > timeCpuReal() const
ModuleDescription const & description() const
roAction_t actions[nactions]
void availablePaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all paths in the process
void limitOutput(ParameterSet const &proc_pset)
AllOutputWorkers all_output_workers_
WorkerPtr results_inserter_
bool endPathsEnabled() const
void respondToCloseInputFile(FileBlock const &fb)
std::vector< OutputWorker * > AllOutputWorkers
std::vector< std::string > vstring
bool changeModule(std::string const &iLabel, ParameterSet const &iPSet)
void writeLumi(LuminosityBlockPrincipal const &lbp)
std::vector< Worker * > AllWorkers
std::vector< EarlyDeleteHelper > earlyDeleteHelpers_
WorkerRegistry worker_reg_
std::vector< WorkerInPath > PathWorkers
void reportSkipped(LuminosityBlockPrincipal const &) const
EventID const & id() const
void enableEndPaths(bool active)
void addContextAndPrintException(char const *context, cms::Exception &ex, bool disablePrint)
std::string const & category() const
TrigResPtr endpath_results_
std::string const & moduleLabel() const
boost::shared_ptr< HLTGlobalStatus > TrigResPtr
int totalEventsFailed() const
void fillEndPath(ParameterSet &proc_pset, ProductRegistry &preg, boost::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name)
RunStopwatch::StopwatchPointer stopwatch_
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
void runEndPaths(typename T::MyPrincipal &, EventSetup const &)
void addWorker(Worker *aWorker)
int totalEventsPassed() const
void processOneOccurrence(typename T::MyPrincipal &, EventSetup const &)
boost::shared_ptr< CPUTimer > StopwatchPointer
void runNow(typename T::MyPrincipal &p, EventSetup const &es)
void reduceParameterSet(ParameterSet &proc_pset, vstring &modulesInConfig, std::set< std::string > const &modulesInConfigSet, vstring &labelsOnTriggerPaths, vstring &shouldBeUsedLabels, std::map< std::string, std::vector< std::pair< std::string, int > > > &outputModulePathPositions)
void stdToEDM(std::exception const &e)
AllWorkers::iterator workersBegin()
void clearCounters()
Clear all the counters in the trigger report.
std::list< std::string > const & context() const
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e, edm::JobReport *jobRep=0, int rc=-1)
bool runTriggerPaths(typename T::MyPrincipal &, EventSetup const &)
void respondToCloseOutputFiles(FileBlock const &fb)
std::vector< std::string > vstring
bool terminate() const
Return whether each output module has reached its maximum count.
void respondToOpenInputFile(FileBlock const &fb)
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
virtual bool tryToFillImpl(std::string const &moduleLabel, EventPrincipal &event, EventSetup const &eventSetup, CurrentProcessingContext const *iContext)
ActionTable const * act_table_
UnscheduledCallProducer()
std::vector< Worker * > Workers
AllWorkers::const_iterator workersBegin() const
void getTriggerReport(TriggerReport &rep) const
Schedule(ParameterSet &proc_pset, service::TriggerNamesService &tns, ProductRegistry &pregistry, ActionTable const &actions, boost::shared_ptr< ActivityRegistry > areg, boost::shared_ptr< ProcessConfiguration > processConfiguration, const ParameterSet *subProcPSet)
boost::shared_ptr< Worker > WorkerPtr
void respondToOpenOutputFiles(FileBlock const &fb)
void charPtrToEDM(char const *c)
void stringToEDM(std::string &s)
volatile bool endpathsAreActive_
void reportSkipped(RunPrincipal const &) const
void addContext(std::string const &context)
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 ...
void reportSkipped(EventPrincipal const &ep) const
void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
author Stefano ARGIRO author Bill Tanenbaum
std::vector< unsigned int > earlyDeleteHelperToBranchIndicies_
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
void fillTrigPath(ParameterSet &proc_pset, ProductRegistry &preg, boost::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name, TrigResPtr, vstring *labelsOnTriggerPaths)
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetup const &eventSetup, bool cleaningUpAfterException=false)
actions::ActionCodes find(const std::string &category) const
std::vector< Path > TrigPaths
void openNewOutputFilesIfNeeded()
void preForkReleaseResources()
void openOutputFiles(FileBlock &fb)
void writeRun(RunPrincipal const &rp)
ProcessOneOccurrence(typename T::MyPrincipal &principal, EventSetup const &setup)
std::vector< std::pair< BranchID, unsigned int > > earlyDeleteBranchToCount_
void endJob(ExceptionCollector &collector)
AllWorkers::iterator workersEnd()
bool shouldWeCloseOutput() const
void setupOnDemandSystem(EventPrincipal &principal, EventSetup const &es)
std::map< std::string, Worker * > labelToWorkers_
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void fillWorkers(ParameterSet &proc_pset, ProductRegistry &preg, boost::shared_ptr< ProcessConfiguration const > processConfiguration, std::string const &name, bool ignoreFilters, PathWorkers &out, vstring *labelsOnPaths)
vstring end_path_name_list_
AllWorkers::const_iterator workersEnd() const
void addToAllWorkers(Worker *w)
boost::shared_ptr< ActivityRegistry > actReg_
boost::shared_ptr< UnscheduledCallProducer > unscheduled_