#include <Schedule.h>
Public Types | |
typedef std::vector < OutputWorker * > | AllOutputWorkers |
typedef std::vector< Worker * > | AllWorkers |
typedef std::vector< Path > | NonTrigPaths |
typedef std::vector< WorkerInPath > | PathWorkers |
enum | State { Ready = 0, Running, Latched } |
typedef std::vector< Path > | TrigPaths |
typedef boost::shared_ptr < HLTGlobalStatus > | TrigResPtr |
typedef std::vector< std::string > | vstring |
typedef boost::shared_ptr< Worker > | WorkerPtr |
typedef std::vector< Worker * > | Workers |
Public Member Functions | |
void | availablePaths (std::vector< std::string > &oLabelsToFill) const |
adds to oLabelsToFill the labels for all paths in the process | |
void | beginJob () |
bool | changeModule (std::string const &iLabel, ParameterSet const &iPSet) |
void | clearCounters () |
Clear all the counters in the trigger report. | |
void | closeOutputFiles () |
void | enableEndPaths (bool active) |
void | endJob () |
bool | endPathsEnabled () const |
std::vector< ModuleDescription const * > | getAllModuleDescriptions () const |
void | getTriggerReport (TriggerReport &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 | |
void | openNewOutputFilesIfNeeded () |
void | openOutputFiles (FileBlock &fb) |
void | postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren) |
void | preForkReleaseResources () |
template<typename T > | |
void | processOneOccurrence (typename T::MyPrincipal &principal, EventSetup const &eventSetup) |
void | respondToCloseInputFile (FileBlock const &fb) |
void | respondToCloseOutputFiles (FileBlock const &fb) |
void | respondToOpenInputFile (FileBlock const &fb) |
void | respondToOpenOutputFiles (FileBlock const &fb) |
Schedule (ParameterSet &proc_pset, service::TriggerNamesService &tns, ProductRegistry &pregistry, ActionTable const &actions, boost::shared_ptr< ActivityRegistry > areg, boost::shared_ptr< ProcessConfiguration > processConfiguration) | |
bool | shouldWeCloseOutput () const |
bool const | terminate () const |
Return whether each output module has reached its maximum count. | |
std::pair< double, double > | timeCpuReal () const |
int | totalEvents () const |
int | totalEventsFailed () const |
int | totalEventsPassed () const |
void | writeLumi (LuminosityBlockPrincipal const &lbp) |
void | writeRun (RunPrincipal const &rp) |
Private Member Functions | |
void | addToAllWorkers (Worker *w) |
void | fillEndPath (ParameterSet &proc_pset, ProductRegistry &preg, boost::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name) |
void | fillTrigPath (ParameterSet &proc_pset, ProductRegistry &preg, boost::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name, TrigResPtr) |
void | fillWorkers (ParameterSet &proc_pset, ProductRegistry &preg, boost::shared_ptr< ProcessConfiguration const > processConfiguration, std::string const &name, bool ignoreFilters, PathWorkers &out) |
void | limitOutput (ParameterSet const &proc_pset) |
void | reportSkipped (LuminosityBlockPrincipal const &) const |
void | reportSkipped (RunPrincipal const &) const |
void | reportSkipped (EventPrincipal const &ep) const |
void | resetAll () |
template<typename T > | |
void | runEndPaths (typename T::MyPrincipal &, EventSetup const &) |
template<typename T > | |
bool | runTriggerPaths (typename T::MyPrincipal &, EventSetup const &) |
void | setupOnDemandSystem (EventPrincipal &principal, EventSetup const &es) |
AllWorkers::iterator | workersBegin () |
AllWorkers::const_iterator | workersBegin () const |
AllWorkers::iterator | workersEnd () |
AllWorkers::const_iterator | workersEnd () const |
Private Attributes | |
ActionTable const * | act_table_ |
boost::shared_ptr < ActivityRegistry > | actReg_ |
AllOutputWorkers | all_output_workers_ |
AllWorkers | all_workers_ |
vstring | end_path_name_list_ |
TrigPaths | end_paths_ |
TrigResPtr | endpath_results_ |
volatile bool | endpathsAreActive_ |
TrigResPtr | results_ |
WorkerPtr | results_inserter_ |
State | state_ |
RunStopwatch::StopwatchPointer | stopwatch_ |
int | total_events_ |
int | total_passed_ |
vstring | trig_name_list_ |
TrigPaths | trig_paths_ |
boost::shared_ptr < UnscheduledCallProducer > | unscheduled_ |
bool | wantSummary_ |
WorkerRegistry | worker_reg_ |
Definition at line 93 of file Schedule.h.
typedef std::vector<OutputWorker*> edm::Schedule::AllOutputWorkers |
Definition at line 101 of file Schedule.h.
typedef std::vector<Worker*> edm::Schedule::AllWorkers |
Definition at line 100 of file Schedule.h.
typedef std::vector<Path> edm::Schedule::NonTrigPaths |
Definition at line 97 of file Schedule.h.
typedef std::vector<WorkerInPath> edm::Schedule::PathWorkers |
Definition at line 105 of file Schedule.h.
typedef std::vector<Path> edm::Schedule::TrigPaths |
Definition at line 96 of file Schedule.h.
typedef boost::shared_ptr<HLTGlobalStatus> edm::Schedule::TrigResPtr |
Definition at line 98 of file Schedule.h.
typedef std::vector<std::string> edm::Schedule::vstring |
Definition at line 95 of file Schedule.h.
typedef boost::shared_ptr<Worker> edm::Schedule::WorkerPtr |
Definition at line 99 of file Schedule.h.
typedef std::vector<Worker*> edm::Schedule::Workers |
Definition at line 103 of file Schedule.h.
enum edm::Schedule::State |
Definition at line 114 of file Schedule.h.
edm::Schedule::Schedule | ( | ParameterSet & | proc_pset, |
service::TriggerNamesService & | tns, | ||
ProductRegistry & | pregistry, | ||
ActionTable const & | actions, | ||
boost::shared_ptr< ActivityRegistry > | areg, | ||
boost::shared_ptr< ProcessConfiguration > | processConfiguration | ||
) |
Definition at line 140 of file Schedule.cc.
References act_table_, actReg_, addToAllWorkers(), all_output_workers_, all_workers_, end_path_name_list_, endpath_results_, fillEndPath(), edm::fillProductRegistryTransients(), fillTrigPath(), edm::ParameterSet::getParameter(), edm::ParameterSet::getPSetForUpdate(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), edm::WorkerRegistry::getWorker(), i, edm::ParameterSet::id(), edm::InEvent, edm::detail::ThreadSafeRegistry< KEY, T, E >::instance(), limitOutput(), geometryDiff::opts, edm::ProductRegistry::productList(), edm::ParameterSet::registerIt(), results_, results_inserter_, edm::ProductRegistry::setFrozen(), trig_name_list_, unscheduled_, edm::BranchIDListHelper::updateRegistries(), worker_reg_, workersBegin(), and workersEnd().
: worker_reg_(areg), act_table_(&actions), actReg_(areg), state_(Ready), trig_name_list_(tns.getTrigPaths()), end_path_name_list_(tns.getEndPaths()), results_(new HLTGlobalStatus(trig_name_list_.size())), endpath_results_(), // delay! results_inserter_(), all_workers_(), all_output_workers_(), trig_paths_(), end_paths_(), wantSummary_(tns.wantSummary()), total_events_(), total_passed_(), stopwatch_(wantSummary_? new RunStopwatch::StopwatchPointer::element_type : static_cast<RunStopwatch::StopwatchPointer::element_type*> (0)), unscheduled_(new UnscheduledCallProducer), endpathsAreActive_(true) { ParameterSet const& opts = proc_pset.getUntrackedParameterSet("options", ParameterSet()); bool hasPath = false; int trig_bitpos = 0; for (vstring::const_iterator i = trig_name_list_.begin(), e = trig_name_list_.end(); i != e; ++i) { fillTrigPath(proc_pset, preg, processConfiguration, trig_bitpos, *i, results_); ++trig_bitpos; hasPath = true; } if (hasPath) { // the results inserter stands alone results_inserter_ = makeInserter(proc_pset, preg, actions, actReg_, processConfiguration, results_); addToAllWorkers(results_inserter_.get()); } TrigResPtr epptr(new HLTGlobalStatus(end_path_name_list_.size())); endpath_results_ = epptr; // fill normal endpaths vstring::iterator eib(end_path_name_list_.begin()), eie(end_path_name_list_.end()); for (int bitpos = 0; eib != eie; ++eib, ++bitpos) { fillEndPath(proc_pset, preg, processConfiguration, bitpos, *eib); } //See if all modules were used std::set<std::string> usedWorkerLabels; for (AllWorkers::iterator itWorker = workersBegin(); itWorker != workersEnd(); ++itWorker) { usedWorkerLabels.insert((*itWorker)->description().moduleLabel()); } std::vector<std::string> modulesInConfig(proc_pset.getParameter<std::vector<std::string> >("@all_modules")); std::set<std::string> modulesInConfigSet(modulesInConfig.begin(), modulesInConfig.end()); std::vector<std::string> unusedLabels; set_difference(modulesInConfigSet.begin(), modulesInConfigSet.end(), usedWorkerLabels.begin(), usedWorkerLabels.end(), back_inserter(unusedLabels)); //does the configuration say we should allow on demand? bool allowUnscheduled = opts.getUntrackedParameter<bool>("allowUnscheduled", false); std::set<std::string> unscheduledLabels; if (!unusedLabels.empty()) { //Need to // 1) create worker // 2) if it is a WorkerT<EDProducer>, add it to our list // 3) hand list to our delayed reader std::vector<std::string> shouldBeUsedLabels; for (std::vector<std::string>::iterator itLabel = unusedLabels.begin(), itLabelEnd = unusedLabels.end(); itLabel != itLabelEnd; ++itLabel) { if (allowUnscheduled) { bool isTracked; ParameterSet* modulePSet(proc_pset.getPSetForUpdate(*itLabel, isTracked)); assert(isTracked); assert(modulePSet != 0); WorkerParams params(proc_pset, modulePSet, preg, processConfiguration, *act_table_); Worker* newWorker(worker_reg_.getWorker(params, *itLabel)); if (dynamic_cast<WorkerT<EDProducer>*>(newWorker) || dynamic_cast<WorkerT<EDFilter>*>(newWorker)) { unscheduledLabels.insert(*itLabel); unscheduled_->addWorker(newWorker); //add to list so it gets reset each new event addToAllWorkers(newWorker); } else { //not a producer so should be marked as not used shouldBeUsedLabels.push_back(*itLabel); } } else { //everthing is marked are unused so no 'on demand' allowed shouldBeUsedLabels.push_back(*itLabel); } } if (!shouldBeUsedLabels.empty()) { std::ostringstream unusedStream; unusedStream << "'" << shouldBeUsedLabels.front() << "'"; for (std::vector<std::string>::iterator itLabel = shouldBeUsedLabels.begin() + 1, itLabelEnd = shouldBeUsedLabels.end(); itLabel != itLabelEnd; ++itLabel) { unusedStream << ",'" << *itLabel << "'"; } LogInfo("path") << "The following module labels are not assigned to any path:\n" << unusedStream.str() << "\n"; } } if (!unscheduledLabels.empty()) { for (ProductRegistry::ProductList::const_iterator it = preg.productList().begin(), itEnd = preg.productList().end(); it != itEnd; ++it) { if (it->second.produced() && it->second.branchType() == InEvent && unscheduledLabels.end() != unscheduledLabels.find(it->second.moduleLabel())) { it->second.setOnDemand(); } } } proc_pset.registerIt(); pset::Registry::instance()->extra().setID(proc_pset.id()); processConfiguration->setParameterSetID(proc_pset.id()); // This is used for a little sanity-check to make sure no code // modifications alter the number of workers at a later date. size_t all_workers_count = all_workers_.size(); for (AllWorkers::iterator i = all_workers_.begin(), e = all_workers_.end(); i != e; ++i) { // All the workers should be in all_workers_ by this point. Thus // we can now fill all_output_workers_. OutputWorker* ow = dynamic_cast<OutputWorker*>(*i); if (ow) all_output_workers_.push_back(ow); } // Now that the output workers are filled in, set any output limits. limitOutput(proc_pset); loadMissingDictionaries(); preg.setFrozen(); // Sanity check: make sure nobody has added a worker after we've // already relied on all_workers_ being full. assert (all_workers_count == all_workers_.size()); ProcessConfigurationRegistry::instance()->insertMapped(*processConfiguration); BranchIDListHelper::updateRegistries(preg); fillProductRegistryTransients(*processConfiguration, preg); } // Schedule::Schedule
void edm::Schedule::addToAllWorkers | ( | Worker * | w | ) | [private] |
Definition at line 1025 of file Schedule.cc.
References all_workers_, edm::search_all(), edm::Worker::useStopwatch(), and wantSummary_.
Referenced by fillEndPath(), fillTrigPath(), and Schedule().
{ if (!search_all(all_workers_, w)) { if (wantSummary_) { w->useStopwatch(); } all_workers_.push_back(w); } }
void edm::Schedule::availablePaths | ( | std::vector< std::string > & | oLabelsToFill | ) | const |
adds to oLabelsToFill the labels for all paths in the process
Definition at line 916 of file Schedule.cc.
References edm::Path::name(), and trig_paths_.
Referenced by edm::ScheduleInfo::availablePaths().
{ oLabelsToFill.reserve(trig_paths_.size()); std::transform(trig_paths_.begin(), trig_paths_.end(), std::back_inserter(oLabelsToFill), boost::bind(&Path::name, _1)); }
void edm::Schedule::beginJob | ( | void | ) |
Definition at line 869 of file Schedule.cc.
References all_workers_, edm::Worker::beginJob(), and edm::for_all().
{ for_all(all_workers_, boost::bind(&Worker::beginJob, _1)); }
bool edm::Schedule::changeModule | ( | std::string const & | iLabel, |
ParameterSet const & | iPSet | ||
) |
clone the type of module with label iLabel but configure with iPSet. Returns true if successful.
Definition at line 880 of file Schedule.cc.
References all_workers_, edm::Worker::beginJob(), SurfaceDeformationFactory::create(), edm::Worker::description(), newFWLiteAna::found, reco::get(), and edm::ModuleDescription::moduleName().
Referenced by edm::ModuleChanger::changeModule().
{ Worker* found = 0; for (AllWorkers::const_iterator it=all_workers_.begin(), itEnd=all_workers_.end(); it != itEnd; ++it) { if ((*it)->description().moduleLabel() == iLabel) { found = *it; break; } } if (0 == found) { return false; } std::auto_ptr<Maker> wm(MakerPluginFactory::get()->create(found->description().moduleName())); wm->swapModule(found, iPSet); found->beginJob(); return true; }
void edm::Schedule::clearCounters | ( | ) |
Clear all the counters in the trigger report.
Definition at line 1010 of file Schedule.cc.
References all_workers_, edm::Path::clearCounters(), edm::Worker::clearCounters(), end_paths_, edm::for_all(), total_events_, total_passed_, and trig_paths_.
{ total_events_ = total_passed_ = 0; for_all(trig_paths_, boost::bind(&Path::clearCounters, _1)); for_all(end_paths_, boost::bind(&Path::clearCounters, _1)); for_all(all_workers_, boost::bind(&Worker::clearCounters, _1)); }
void edm::Schedule::closeOutputFiles | ( | ) |
Definition at line 826 of file Schedule.cc.
References all_output_workers_, edm::OutputWorker::closeFile(), and edm::for_all().
{ for_all(all_output_workers_, boost::bind(&OutputWorker::closeFile, _1)); }
void edm::Schedule::enableEndPaths | ( | bool | active | ) |
Turn end_paths "off" if "active" is false; turn end_paths "on" if "active" is true.
Definition at line 942 of file Schedule.cc.
References endpathsAreActive_.
{ endpathsAreActive_ = active; }
void edm::Schedule::endJob | ( | void | ) |
Definition at line 471 of file Schedule.cc.
References end_paths_, exception, cms::Exception::explainSelf(), i, edm::max(), pi, timeCpuReal(), totalEvents(), totalEventsFailed(), totalEventsPassed(), trig_paths_, wantSummary_, cms::Exception::what(), workersBegin(), and workersEnd().
Referenced by edm::EventProcessor::endJob().
{ bool failure = false; cms::Exception accumulated("endJob"); AllWorkers::iterator ai(workersBegin()), ae(workersEnd()); for (; ai != ae; ++ai) { try { (*ai)->endJob(); } catch (cms::Exception& e) { accumulated << "cms::Exception caught in Schedule::endJob\n" << e.explainSelf(); failure = true; } catch (std::exception& e) { accumulated << "Standard library exception caught in Schedule::endJob\n" << e.what(); failure = true; } catch (...) { accumulated << "Unknown exception caught in Schedule::endJob\n"; failure = true; } } if (failure) { throw accumulated; } if (wantSummary_ == false) return; TrigPaths::const_iterator pi, pe; // The trigger report (pass/fail etc.): LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "TrigReport " << "---------- Event Summary ------------"; LogVerbatim("FwkSummary") << "TrigReport" << " Events total = " << totalEvents() << " passed = " << totalEventsPassed() << " failed = " << (totalEventsFailed()) << ""; LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "TrigReport " << "---------- Path Summary ------------"; LogVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#" << " " << std::right << std::setw(10) << "Run" << " " << std::right << std::setw(10) << "Passed" << " " << std::right << std::setw(10) << "Failed" << " " << std::right << std::setw(10) << "Error" << " " << "Name" << ""; pi = trig_paths_.begin(); pe = trig_paths_.end(); for (; pi != pe; ++pi) { LogVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 1 << std::right << std::setw(5) << pi->bitPosition() << " " << std::right << std::setw(10) << pi->timesRun() << " " << std::right << std::setw(10) << pi->timesPassed() << " " << std::right << std::setw(10) << pi->timesFailed() << " " << std::right << std::setw(10) << pi->timesExcept() << " " << pi->name() << ""; } LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "TrigReport " << "-------End-Path Summary ------------"; LogVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#" << " " << std::right << std::setw(10) << "Run" << " " << std::right << std::setw(10) << "Passed" << " " << std::right << std::setw(10) << "Failed" << " " << std::right << std::setw(10) << "Error" << " " << "Name" << ""; pi = end_paths_.begin(); pe = end_paths_.end(); for (; pi != pe; ++pi) { LogVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 0 << std::right << std::setw(5) << pi->bitPosition() << " " << std::right << std::setw(10) << pi->timesRun() << " " << std::right << std::setw(10) << pi->timesPassed() << " " << std::right << std::setw(10) << pi->timesFailed() << " " << std::right << std::setw(10) << pi->timesExcept() << " " << pi->name() << ""; } pi = trig_paths_.begin(); pe = trig_paths_.end(); for (; pi != pe; ++pi) { LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "TrigReport " << "---------- Modules in Path: " << pi->name() << " ------------"; LogVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#" << " " << std::right << std::setw(10) << "Visited" << " " << std::right << std::setw(10) << "Passed" << " " << std::right << std::setw(10) << "Failed" << " " << std::right << std::setw(10) << "Error" << " " << "Name" << ""; for (unsigned int i = 0; i < pi->size(); ++i) { LogVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 1 << std::right << std::setw(5) << pi->bitPosition() << " " << std::right << std::setw(10) << pi->timesVisited(i) << " " << std::right << std::setw(10) << pi->timesPassed(i) << " " << std::right << std::setw(10) << pi->timesFailed(i) << " " << std::right << std::setw(10) << pi->timesExcept(i) << " " << pi->getWorker(i)->description().moduleLabel() << ""; } } pi = end_paths_.begin(); pe = end_paths_.end(); for (; pi != pe; ++pi) { LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "TrigReport " << "------ Modules in End-Path: " << pi->name() << " ------------"; LogVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Trig Bit#" << " " << std::right << std::setw(10) << "Visited" << " " << std::right << std::setw(10) << "Passed" << " " << std::right << std::setw(10) << "Failed" << " " << std::right << std::setw(10) << "Error" << " " << "Name" << ""; for (unsigned int i = 0; i < pi->size(); ++i) { LogVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(5) << 0 << std::right << std::setw(5) << pi->bitPosition() << " " << std::right << std::setw(10) << pi->timesVisited(i) << " " << std::right << std::setw(10) << pi->timesPassed(i) << " " << std::right << std::setw(10) << pi->timesFailed(i) << " " << std::right << std::setw(10) << pi->timesExcept(i) << " " << pi->getWorker(i)->description().moduleLabel() << ""; } } LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "TrigReport " << "---------- Module Summary ------------"; LogVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << "Visited" << " " << std::right << std::setw(10) << "Run" << " " << std::right << std::setw(10) << "Passed" << " " << std::right << std::setw(10) << "Failed" << " " << std::right << std::setw(10) << "Error" << " " << "Name" << ""; ai = workersBegin(); ae = workersEnd(); for (; ai != ae; ++ai) { LogVerbatim("FwkSummary") << "TrigReport " << std::right << std::setw(10) << (*ai)->timesVisited() << " " << std::right << std::setw(10) << (*ai)->timesRun() << " " << std::right << std::setw(10) << (*ai)->timesPassed() << " " << std::right << std::setw(10) << (*ai)->timesFailed() << " " << std::right << std::setw(10) << (*ai)->timesExcept() << " " << (*ai)->description().moduleLabel() << ""; } LogVerbatim("FwkSummary") << ""; // The timing report (CPU and Real Time): LogVerbatim("FwkSummary") << "TimeReport " << "---------- Event Summary ---[sec]----"; LogVerbatim("FwkSummary") << "TimeReport" << std::setprecision(6) << std::fixed << " CPU/event = " << timeCpuReal().first/std::max(1, totalEvents()) << " Real/event = " << timeCpuReal().second/std::max(1, totalEvents()) << ""; LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "TimeReport " << "---------- Path Summary ---[sec]----"; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(22) << "per event " << std::right << std::setw(22) << "per path-run " << ""; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << "Name" << ""; pi = trig_paths_.begin(); pe = trig_paths_.end(); for (; pi != pe; ++pi) { LogVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right << std::setw(10) << pi->timeCpuReal().first/std::max(1, totalEvents()) << " " << std::right << std::setw(10) << pi->timeCpuReal().second/std::max(1, totalEvents()) << " " << std::right << std::setw(10) << pi->timeCpuReal().first/std::max(1, pi->timesRun()) << " " << std::right << std::setw(10) << pi->timeCpuReal().second/std::max(1, pi->timesRun()) << " " << pi->name() << ""; } LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << "Name" << ""; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(22) << "per event " << std::right << std::setw(22) << "per path-run " << ""; LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "TimeReport " << "-------End-Path Summary ---[sec]----"; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(22) << "per event " << std::right << std::setw(22) << "per endpath-run " << ""; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << "Name" << ""; pi = end_paths_.begin(); pe = end_paths_.end(); for (; pi != pe; ++pi) { LogVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right << std::setw(10) << pi->timeCpuReal().first/std::max(1, totalEvents()) << " " << std::right << std::setw(10) << pi->timeCpuReal().second/std::max(1, totalEvents()) << " " << std::right << std::setw(10) << pi->timeCpuReal().first/std::max(1, pi->timesRun()) << " " << std::right << std::setw(10) << pi->timeCpuReal().second/std::max(1, pi->timesRun()) << " " << pi->name() << ""; } LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << "Name" << ""; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(22) << "per event " << std::right << std::setw(22) << "per endpath-run " << ""; pi = trig_paths_.begin(); pe = trig_paths_.end(); for (; pi != pe; ++pi) { LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "TimeReport " << "---------- Modules in Path: " << pi->name() << " ---[sec]----"; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(22) << "per event " << std::right << std::setw(22) << "per module-visit " << ""; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << "Name" << ""; for (unsigned int i = 0; i < pi->size(); ++i) { LogVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right << std::setw(10) << pi->timeCpuReal(i).first/std::max(1, totalEvents()) << " " << std::right << std::setw(10) << pi->timeCpuReal(i).second/std::max(1, totalEvents()) << " " << std::right << std::setw(10) << pi->timeCpuReal(i).first/std::max(1, pi->timesVisited(i)) << " " << std::right << std::setw(10) << pi->timeCpuReal(i).second/std::max(1, pi->timesVisited(i)) << " " << pi->getWorker(i)->description().moduleLabel() << ""; } } LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << "Name" << ""; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(22) << "per event " << std::right << std::setw(22) << "per module-visit " << ""; pi = end_paths_.begin(); pe = end_paths_.end(); for (; pi != pe; ++pi) { LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "TimeReport " << "------ Modules in End-Path: " << pi->name() << " ---[sec]----"; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(22) << "per event " << std::right << std::setw(22) << "per module-visit " << ""; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << "Name" << ""; for (unsigned int i = 0; i < pi->size(); ++i) { LogVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right << std::setw(10) << pi->timeCpuReal(i).first/std::max(1, totalEvents()) << " " << std::right << std::setw(10) << pi->timeCpuReal(i).second/std::max(1, totalEvents()) << " " << std::right << std::setw(10) << pi->timeCpuReal(i).first/std::max(1, pi->timesVisited(i)) << " " << std::right << std::setw(10) << pi->timeCpuReal(i).second/std::max(1, pi->timesVisited(i)) << " " << pi->getWorker(i)->description().moduleLabel() << ""; } } LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << "Name" << ""; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(22) << "per event " << std::right << std::setw(22) << "per module-visit " << ""; LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "TimeReport " << "---------- Module Summary ---[sec]----"; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(22) << "per event " << std::right << std::setw(22) << "per module-run " << std::right << std::setw(22) << "per module-visit " << ""; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << "Name" << ""; ai = workersBegin(); ae = workersEnd(); for (; ai != ae; ++ai) { LogVerbatim("FwkSummary") << "TimeReport " << std::setprecision(6) << std::fixed << std::right << std::setw(10) << (*ai)->timeCpuReal().first/std::max(1, totalEvents()) << " " << std::right << std::setw(10) << (*ai)->timeCpuReal().second/std::max(1, totalEvents()) << " " << std::right << std::setw(10) << (*ai)->timeCpuReal().first/std::max(1, (*ai)->timesRun()) << " " << std::right << std::setw(10) << (*ai)->timeCpuReal().second/std::max(1, (*ai)->timesRun()) << " " << std::right << std::setw(10) << (*ai)->timeCpuReal().first/std::max(1, (*ai)->timesVisited()) << " " << std::right << std::setw(10) << (*ai)->timeCpuReal().second/std::max(1, (*ai)->timesVisited()) << " " << (*ai)->description().moduleLabel() << ""; } LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << std::right << std::setw(10) << "CPU" << " " << std::right << std::setw(10) << "Real" << " " << "Name" << ""; LogVerbatim("FwkSummary") << "TimeReport " << std::right << std::setw(22) << "per event " << std::right << std::setw(22) << "per module-run " << std::right << std::setw(22) << "per module-visit " << ""; LogVerbatim("FwkSummary") << ""; LogVerbatim("FwkSummary") << "T---Report end!" << ""; LogVerbatim("FwkSummary") << ""; }
bool edm::Schedule::endPathsEnabled | ( | ) | const |
Return true if end_paths are active, and false if they are inactive.
Definition at line 947 of file Schedule.cc.
References endpathsAreActive_.
{ return endpathsAreActive_; }
void edm::Schedule::fillEndPath | ( | ParameterSet & | proc_pset, |
ProductRegistry & | preg, | ||
boost::shared_ptr< ProcessConfiguration const > | processConfiguration, | ||
int | bitpos, | ||
std::string const & | name | ||
) | [private] |
Definition at line 449 of file Schedule.cc.
References act_table_, actReg_, addToAllWorkers(), end_paths_, endpath_results_, fillWorkers(), edm::for_all(), L1TEmulatorMonitor_cff::p, edm::Path::useStopwatch(), and wantSummary_.
Referenced by Schedule().
{ PathWorkers tmpworkers; fillWorkers(proc_pset, preg, processConfiguration, name, true, tmpworkers); Workers holder; for (PathWorkers::iterator wi(tmpworkers.begin()), we(tmpworkers.end()); wi != we; ++wi) { holder.push_back(wi->getWorker()); } if (!tmpworkers.empty()) { Path p(bitpos, name, tmpworkers, endpath_results_, *act_table_, actReg_, true); if (wantSummary_) { p.useStopwatch(); } end_paths_.push_back(p); } for_all(holder, boost::bind(&Schedule::addToAllWorkers, this, _1)); }
void edm::Schedule::fillTrigPath | ( | ParameterSet & | proc_pset, |
ProductRegistry & | preg, | ||
boost::shared_ptr< ProcessConfiguration const > | processConfiguration, | ||
int | bitpos, | ||
std::string const & | name, | ||
TrigResPtr | trptr | ||
) | [private] |
Definition at line 425 of file Schedule.cc.
References act_table_, actReg_, addToAllWorkers(), fillWorkers(), edm::for_all(), L1TEmulatorMonitor_cff::p, trig_paths_, edm::Path::useStopwatch(), and wantSummary_.
Referenced by Schedule().
{ PathWorkers tmpworkers; Workers holder; fillWorkers(proc_pset, preg, processConfiguration, name, false, tmpworkers); for (PathWorkers::iterator wi(tmpworkers.begin()), we(tmpworkers.end()); wi != we; ++wi) { holder.push_back(wi->getWorker()); } // an empty path will cause an extra bit that is not used if (!tmpworkers.empty()) { Path p(bitpos, name, tmpworkers, trptr, *act_table_, actReg_, false); if (wantSummary_) { p.useStopwatch(); } trig_paths_.push_back(p); } for_all(holder, boost::bind(&Schedule::addToAllWorkers, this, _1)); }
void edm::Schedule::fillWorkers | ( | ParameterSet & | proc_pset, |
ProductRegistry & | preg, | ||
boost::shared_ptr< ProcessConfiguration const > | processConfiguration, | ||
std::string const & | name, | ||
bool | ignoreFilters, | ||
PathWorkers & | out | ||
) | [private] |
Definition at line 369 of file Schedule.cc.
References act_table_, edm::errors::Configuration, edm::Worker::description(), end_path_name_list_, Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getPSetForUpdate(), edm::ParameterSet::getUntrackedParameter(), edm::WorkerRegistry::getWorker(), edm::WorkerInPath::Ignore, moduleLabel(), edm::ModuleDescription::moduleName(), mergeVDriftHistosByStation::name, edm::Normal, edm::WorkerInPath::Normal, edm::search_all(), edm::WorkerInPath::Veto, and worker_reg_.
Referenced by fillEndPath(), and fillTrigPath().
{ vstring modnames = proc_pset.getParameter<vstring>(name); vstring::iterator it(modnames.begin()), ie(modnames.end()); PathWorkers tmpworkers; for (; it != ie; ++it) { WorkerInPath::FilterAction filterAction = WorkerInPath::Normal; if ((*it)[0] == '!') filterAction = WorkerInPath::Veto; else if ((*it)[0] == '-') filterAction = WorkerInPath::Ignore; std::string moduleLabel = *it; if (filterAction != WorkerInPath::Normal) moduleLabel.erase(0, 1); bool isTracked; ParameterSet* modpset = proc_pset.getPSetForUpdate(moduleLabel, isTracked); if (modpset == 0) { std::string pathType("endpath"); if (!search_all(end_path_name_list_, name)) { pathType = std::string("path"); } throw Exception(errors::Configuration) << "The unknown module label \"" << moduleLabel << "\" appears in " << pathType << " \"" << name << "\"\n please check spelling or remove that label from the path."; } assert(isTracked); WorkerParams params(proc_pset, modpset, preg, processConfiguration, *act_table_); Worker* worker = worker_reg_.getWorker(params, moduleLabel); if (ignoreFilters && filterAction != WorkerInPath::Ignore && dynamic_cast<WorkerT<EDFilter>*>(worker)) { // We have a filter on an end path, and the filter is not explicitly ignored. // See if the filter is allowed. std::vector<std::string> allowed_filters = proc_pset.getUntrackedParameter<vstring>("@filters_on_endpaths"); if (!search_all(allowed_filters, worker->description().moduleName())) { // Filter is not allowed. Ignore the result, and issue a warning. filterAction = WorkerInPath::Ignore; LogWarning("FilterOnEndPath") << "The EDFilter '" << worker->description().moduleName() << "' with module label '" << moduleLabel << "' appears on EndPath '" << name << "'.\n" << "The return value of the filter will be ignored.\n" << "To suppress this warning, either remove the filter from the endpath,\n" << "or explicitly ignore it in the configuration by using cms.ignore().\n"; } } WorkerInPath w(worker, filterAction); tmpworkers.push_back(w); } out.swap(tmpworkers); }
std::vector< ModuleDescription const * > edm::Schedule::getAllModuleDescriptions | ( | ) | const |
Return a vector allowing const access to all the ModuleDescriptions for this Schedule. *** N.B. *** Ownership of the ModuleDescriptions is *not* passed to the caller. Do not call delete on these pointers!
Definition at line 901 of file Schedule.cc.
References all_workers_, i, L1TEmulatorMonitor_cff::p, query::result, workersBegin(), and workersEnd().
Referenced by edm::ScheduleInfo::availableModuleLabels(), and edm::ScheduleInfo::parametersForModule().
{ AllWorkers::const_iterator i(workersBegin()); AllWorkers::const_iterator e(workersEnd()); std::vector<ModuleDescription const*> result; result.reserve(all_workers_.size()); for (; i != e; ++i) { ModuleDescription const* p = (*i)->descPtr(); result.push_back(p); } return result; }
void edm::Schedule::getTriggerReport | ( | TriggerReport & | rep | ) | const |
Return the trigger report information on paths, modules-in-path, modules-in-endpath, and modules.
Definition at line 999 of file Schedule.cc.
References all_workers_, 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.
{ rep.eventSummary.totalEvents = totalEvents(); rep.eventSummary.totalEventsPassed = totalEventsPassed(); rep.eventSummary.totalEventsFailed = totalEventsFailed(); fill_summary(trig_paths_, rep.trigPathSummaries, &fillPathSummary); fill_summary(end_paths_, rep.endPathSummaries, &fillPathSummary); fill_summary(all_workers_, rep.workerSummaries, &fillWorkerSummary); }
void edm::Schedule::limitOutput | ( | ParameterSet const & | proc_pset | ) | [private] |
Definition at line 307 of file Schedule.cc.
References all_output_workers_, edm::errors::Configuration, edm::ParameterSet::empty(), Exception, edm::ParameterSet::getParameterNamesForType(), edm::ParameterSet::getParameterSetNames(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), edm::OutputModuleDescription::maxEvents_, moduleLabel(), convertSQLitetoXML_cfg::output, and edm::search_all().
Referenced by Schedule().
{ std::string const output("output"); ParameterSet const& maxEventsPSet = proc_pset.getUntrackedParameterSet("maxEvents", ParameterSet()); int maxEventSpecs = 0; int maxEventsOut = -1; ParameterSet const* vMaxEventsOut = 0; std::vector<std::string> intNamesE = maxEventsPSet.getParameterNamesForType<int>(false); if (search_all(intNamesE, output)) { maxEventsOut = maxEventsPSet.getUntrackedParameter<int>(output); ++maxEventSpecs; } std::vector<std::string> psetNamesE; maxEventsPSet.getParameterSetNames(psetNamesE, false); if (search_all(psetNamesE, output)) { vMaxEventsOut = &maxEventsPSet.getUntrackedParameterSet(output); ++maxEventSpecs; } if (maxEventSpecs > 1) { throw Exception(errors::Configuration) << "\nAt most, one form of 'output' may appear in the 'maxEvents' parameter set"; } if (maxEventSpecs == 0) { return; } for (AllOutputWorkers::const_iterator it = all_output_workers_.begin(), itEnd = all_output_workers_.end(); it != itEnd; ++it) { OutputModuleDescription desc(maxEventsOut); if (vMaxEventsOut != 0 && !vMaxEventsOut->empty()) { std::string moduleLabel = (*it)->description().moduleLabel(); try { desc.maxEvents_ = vMaxEventsOut->getUntrackedParameter<int>(moduleLabel); } catch (Exception const&) { throw Exception(errors::Configuration) << "\nNo entry in 'maxEvents' for output module label '" << moduleLabel << "'.\n"; } } (*it)->configure(desc); } }
void edm::Schedule::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 925 of file Schedule.cc.
References i, edm::Path::name(), and trig_paths_.
Referenced by edm::ScheduleInfo::modulesInPath().
{ TrigPaths::const_iterator itFound = std::find_if (trig_paths_.begin(), trig_paths_.end(), boost::bind(std::equal_to<std::string>(), iPathLabel, boost::bind(&Path::name, _1))); if (itFound!=trig_paths_.end()) { oLabelsToFill.reserve(itFound->size()); for (size_t i = 0; i < itFound->size(); ++i) { oLabelsToFill.push_back(itFound->getWorker(i)->description().moduleLabel()); } } }
void edm::Schedule::openNewOutputFilesIfNeeded | ( | ) |
Definition at line 830 of file Schedule.cc.
References all_output_workers_, edm::for_all(), and edm::OutputWorker::openNewFileIfNeeded().
{ for_all(all_output_workers_, boost::bind(&OutputWorker::openNewFileIfNeeded, _1)); }
void edm::Schedule::openOutputFiles | ( | FileBlock & | fb | ) |
Definition at line 834 of file Schedule.cc.
References all_output_workers_, edm::for_all(), and edm::OutputWorker::openFile().
{ for_all(all_output_workers_, boost::bind(&OutputWorker::openFile, _1, boost::cref(fb))); }
void edm::Schedule::postForkReacquireResources | ( | unsigned int | iChildIndex, |
unsigned int | iNumberOfChildren | ||
) |
Definition at line 876 of file Schedule.cc.
References all_workers_, edm::for_all(), and edm::Worker::postForkReacquireResources().
{ for_all(all_workers_, boost::bind(&Worker::postForkReacquireResources, _1, iChildIndex, iNumberOfChildren)); }
void edm::Schedule::preForkReleaseResources | ( | ) |
Definition at line 873 of file Schedule.cc.
References all_workers_, edm::for_all(), and edm::Worker::preForkReleaseResources().
{ for_all(all_workers_, boost::bind(&Worker::preForkReleaseResources, _1)); }
void edm::Schedule::processOneOccurrence | ( | typename T::MyPrincipal & | principal, |
EventSetup const & | eventSetup | ||
) |
Definition at line 357 of file Schedule.h.
References act_table_, alignmentValidation::action, cms::Exception::category(), endpathsAreActive_, edm::actions::FailModule, edm::actions::FailPath, edm::ActionTable::find(), edm::actions::IgnoreCompletely, Latched, Ready, resetAll(), results_inserter_, edm::actions::Rethrow, cms::Exception::rootCause(), Running, setupOnDemandSystem(), edm::actions::SkipEvent, state_, stopwatch_, total_events_, total_passed_, unscheduled_, and cms::Exception::what().
{ this->resetAll(); state_ = Running; // A RunStopwatch, but only if we are processing an event. RunStopwatch stopwatch(T::isEvent_ ? stopwatch_ : RunStopwatch::StopwatchPointer()); if (T::isEvent_) { ++total_events_; setupOnDemandSystem(dynamic_cast<EventPrincipal&>(ep), es); } try { try { //make sure the unscheduled items see this transition [Event will be a no-op] unscheduled_->runNow<T>(ep, es); if (runTriggerPaths<T>(ep, es)) { if (T::isEvent_) ++total_passed_; } state_ = Latched; } catch(cms::Exception& e) { actions::ActionCodes action = (T::isEvent_ ? act_table_->find(e.rootCause()) : actions::Rethrow); assert (action != actions::IgnoreCompletely); assert (action != actions::FailPath); assert (action != actions::FailModule); if (action == actions::SkipEvent) { LogWarning(e.category()) << "an exception occurred and all paths for the event are being skipped: \n" << e.what(); } else { throw; } } try { CPUTimer timer; if (results_inserter_.get()) results_inserter_->doWork<T>(ep, es, 0, &timer); } catch (cms::Exception& e) { e << "EventProcessingStopped\n"; e << "Attempt to insert TriggerResults into event failed.\n"; throw; } if (endpathsAreActive_) runEndPaths<T>(ep, es); } catch(cms::Exception& e) { actions::ActionCodes action = (T::isEvent_ ? act_table_->find(e.rootCause()) : actions::Rethrow); assert (action != actions::SkipEvent); assert (action != actions::FailPath); assert (action != actions::FailModule); switch(action) { case actions::IgnoreCompletely: { LogWarning(e.category()) << "exception being ignored for current event:\n" << e.what(); break; } default: { state_ = Ready; e << "EventProcessingStopped\n"; e << "an exception occurred during current event processing\n"; throw; } } } catch(...) { LogError("PassingThrough") << "an exception occurred during current event processing\n"; state_ = Ready; throw; } // next thing probably is not needed, the product insertion code clears it state_ = Ready; }
void edm::Schedule::reportSkipped | ( | EventPrincipal const & | ep | ) | const [inline, private] |
Definition at line 350 of file Schedule.h.
References edm::EventID::event(), edm::EventPrincipal::id(), and edm::EventID::run().
{ Service<JobReport> reportSvc; reportSvc->reportSkippedEvent(ep.id().run(), ep.id().event()); }
void edm::Schedule::reportSkipped | ( | RunPrincipal const & | ) | const [inline, private] |
Definition at line 245 of file Schedule.h.
{}
void edm::Schedule::reportSkipped | ( | LuminosityBlockPrincipal const & | ) | const [inline, private] |
Definition at line 244 of file Schedule.h.
{}
void edm::Schedule::resetAll | ( | ) | [private] |
Definition at line 1018 of file Schedule.cc.
References all_workers_, endpath_results_, edm::for_all(), edm::Worker::reset(), and results_.
Referenced by processOneOccurrence().
{ for_all(all_workers_, boost::bind(&Worker::reset, _1)); results_->reset(); endpath_results_->reset(); }
void edm::Schedule::respondToCloseInputFile | ( | FileBlock const & | fb | ) |
Definition at line 857 of file Schedule.cc.
References all_workers_, edm::for_all(), and edm::Worker::respondToCloseInputFile().
{ for_all(all_workers_, boost::bind(&Worker::respondToCloseInputFile, _1, boost::cref(fb))); }
void edm::Schedule::respondToCloseOutputFiles | ( | FileBlock const & | fb | ) |
Definition at line 865 of file Schedule.cc.
References all_workers_, edm::for_all(), and edm::Worker::respondToCloseOutputFiles().
{ for_all(all_workers_, boost::bind(&Worker::respondToCloseOutputFiles, _1, boost::cref(fb))); }
void edm::Schedule::respondToOpenInputFile | ( | FileBlock const & | fb | ) |
Definition at line 853 of file Schedule.cc.
References all_workers_, edm::for_all(), and edm::Worker::respondToOpenInputFile().
{ for_all(all_workers_, boost::bind(&Worker::respondToOpenInputFile, _1, boost::cref(fb))); }
void edm::Schedule::respondToOpenOutputFiles | ( | FileBlock const & | fb | ) |
Definition at line 861 of file Schedule.cc.
References all_workers_, edm::for_all(), and edm::Worker::respondToOpenOutputFiles().
{ for_all(all_workers_, boost::bind(&Worker::respondToOpenOutputFiles, _1, boost::cref(fb))); }
void edm::Schedule::runEndPaths | ( | typename T::MyPrincipal & | ep, |
EventSetup const & | es | ||
) | [private] |
Definition at line 444 of file Schedule.h.
References end_paths_, and edm::for_all().
{ // Note there is no state-checking safety controlling the // activation/deactivation of endpaths. for_all(end_paths_, ProcessOneOccurrence<T>(ep, es)); // We could get rid of the functor ProcessOneOccurrence if we used // boost::lambda, but the use of lambda with member functions // which take multiple arguments, by both non-const and const // reference, seems much more obscure... // // using namespace boost::lambda; // for_all(end_paths_, // bind(&Path::processOneOccurrence, // boost::lambda::_1, // qualification to avoid ambiguity // var(ep), // pass by reference (not copy) // constant_ref(es))); // pass by const-reference (not copy) }
bool edm::Schedule::runTriggerPaths | ( | typename T::MyPrincipal & | ep, |
EventSetup const & | es | ||
) | [private] |
Definition at line 437 of file Schedule.h.
References edm::for_all(), results_, and trig_paths_.
{ for_all(trig_paths_, ProcessOneOccurrence<T>(ep, es)); return results_->accept(); }
void edm::Schedule::setupOnDemandSystem | ( | EventPrincipal & | principal, |
EventSetup const & | es | ||
) | [private] |
Definition at line 1035 of file Schedule.cc.
References edm::EventPrincipal::setUnscheduledHandler(), and unscheduled_.
Referenced by processOneOccurrence().
{ // NOTE: who owns the productdescrption? Just copied by value unscheduled_->setEventSetup(es); ep.setUnscheduledHandler(unscheduled_); }
bool edm::Schedule::shouldWeCloseOutput | ( | ) | const |
Definition at line 846 of file Schedule.cc.
References all_output_workers_, and edm::OutputWorker::shouldWeCloseFile().
{ // Return true iff at least one output module returns true. return (std::find_if (all_output_workers_.begin(), all_output_workers_.end(), boost::bind(&OutputWorker::shouldWeCloseFile, _1)) != all_output_workers_.end()); }
bool const edm::Schedule::terminate | ( | void | ) | const |
Return whether each output module has reached its maximum count.
Definition at line 351 of file Schedule.cc.
References all_output_workers_.
{ if (all_output_workers_.empty()) { return false; } for (AllOutputWorkers::const_iterator it = all_output_workers_.begin(), itEnd = all_output_workers_.end(); it != itEnd; ++it) { if (!(*it)->limitReached()) { // Found an output module that has not reached output event count. return false; } } LogInfo("SuccessfulTermination") << "The job is terminating successfully because each output module\n" << "has reached its configured limit.\n"; return true; }
std::pair<double, double> edm::Schedule::timeCpuReal | ( | ) | const [inline] |
Definition at line 155 of file Schedule.h.
References stopwatch_.
Referenced by endJob().
{ return std::pair<double, double>(stopwatch_->cpuTime(), stopwatch_->realTime()); }
int edm::Schedule::totalEvents | ( | ) | const [inline] |
Return the number of events this Schedule has tried to process (inclues both successes and failures, including failures due to exceptions during processing).
Definition at line 177 of file Schedule.h.
References total_events_.
Referenced by endJob(), getTriggerReport(), and totalEventsFailed().
{ return total_events_; }
int edm::Schedule::totalEventsFailed | ( | ) | const [inline] |
Return the number of events that have not passed any trigger. (N.B. totalEventsFailed() + totalEventsPassed() == totalEvents()
Definition at line 189 of file Schedule.h.
References totalEvents(), and totalEventsPassed().
Referenced by endJob(), and getTriggerReport().
{ return totalEvents() - totalEventsPassed(); }
int edm::Schedule::totalEventsPassed | ( | ) | const [inline] |
Return the number of events which have been passed by one or more trigger paths.
Definition at line 183 of file Schedule.h.
References total_passed_.
Referenced by endJob(), getTriggerReport(), and totalEventsFailed().
{ return total_passed_; }
AllWorkers::iterator edm::Schedule::workersBegin | ( | ) | [inline, private] |
Definition at line 225 of file Schedule.h.
References all_workers_.
{ return all_workers_.begin(); }
AllWorkers::const_iterator edm::Schedule::workersBegin | ( | ) | const [inline, private] |
Definition at line 217 of file Schedule.h.
References all_workers_.
Referenced by endJob(), getAllModuleDescriptions(), and Schedule().
{ return all_workers_.begin(); }
AllWorkers::const_iterator edm::Schedule::workersEnd | ( | ) | const [inline, private] |
Definition at line 221 of file Schedule.h.
References all_workers_.
Referenced by endJob(), getAllModuleDescriptions(), and Schedule().
{ return all_workers_.end(); }
AllWorkers::iterator edm::Schedule::workersEnd | ( | ) | [inline, private] |
void edm::Schedule::writeLumi | ( | LuminosityBlockPrincipal const & | lbp | ) |
Definition at line 842 of file Schedule.cc.
References all_output_workers_, edm::for_all(), and edm::OutputWorker::writeLumi().
{ for_all(all_output_workers_, boost::bind(&OutputWorker::writeLumi, _1, boost::cref(lbp))); }
void edm::Schedule::writeRun | ( | RunPrincipal const & | rp | ) |
Definition at line 838 of file Schedule.cc.
References all_output_workers_, edm::for_all(), and edm::OutputWorker::writeRun().
{ for_all(all_output_workers_, boost::bind(&OutputWorker::writeRun, _1, boost::cref(rp))); }
ActionTable const* edm::Schedule::act_table_ [private] |
Definition at line 265 of file Schedule.h.
Referenced by fillEndPath(), fillTrigPath(), fillWorkers(), processOneOccurrence(), and Schedule().
boost::shared_ptr<ActivityRegistry> edm::Schedule::actReg_ [private] |
Definition at line 266 of file Schedule.h.
Referenced by fillEndPath(), fillTrigPath(), and Schedule().
Definition at line 277 of file Schedule.h.
Referenced by closeOutputFiles(), limitOutput(), openNewOutputFilesIfNeeded(), openOutputFiles(), Schedule(), shouldWeCloseOutput(), terminate(), writeLumi(), and writeRun().
AllWorkers edm::Schedule::all_workers_ [private] |
Definition at line 276 of file Schedule.h.
Referenced by addToAllWorkers(), beginJob(), changeModule(), clearCounters(), getAllModuleDescriptions(), getTriggerReport(), postForkReacquireResources(), preForkReleaseResources(), resetAll(), respondToCloseInputFile(), respondToCloseOutputFiles(), respondToOpenInputFile(), respondToOpenOutputFiles(), Schedule(), workersBegin(), and workersEnd().
vstring edm::Schedule::end_path_name_list_ [private] |
Definition at line 270 of file Schedule.h.
Referenced by fillWorkers(), and Schedule().
TrigPaths edm::Schedule::end_paths_ [private] |
Definition at line 279 of file Schedule.h.
Referenced by clearCounters(), endJob(), fillEndPath(), getTriggerReport(), and runEndPaths().
TrigResPtr edm::Schedule::endpath_results_ [private] |
Definition at line 273 of file Schedule.h.
Referenced by fillEndPath(), resetAll(), and Schedule().
volatile bool edm::Schedule::endpathsAreActive_ [private] |
Definition at line 288 of file Schedule.h.
Referenced by enableEndPaths(), endPathsEnabled(), and processOneOccurrence().
TrigResPtr edm::Schedule::results_ [private] |
Definition at line 272 of file Schedule.h.
Referenced by resetAll(), runTriggerPaths(), and Schedule().
WorkerPtr edm::Schedule::results_inserter_ [private] |
Definition at line 275 of file Schedule.h.
Referenced by processOneOccurrence(), and Schedule().
State edm::Schedule::state_ [private] |
Definition at line 268 of file Schedule.h.
Referenced by processOneOccurrence().
Definition at line 284 of file Schedule.h.
Referenced by processOneOccurrence(), and timeCpuReal().
int edm::Schedule::total_events_ [private] |
Definition at line 282 of file Schedule.h.
Referenced by clearCounters(), processOneOccurrence(), and totalEvents().
int edm::Schedule::total_passed_ [private] |
Definition at line 283 of file Schedule.h.
Referenced by clearCounters(), processOneOccurrence(), and totalEventsPassed().
vstring edm::Schedule::trig_name_list_ [private] |
Definition at line 269 of file Schedule.h.
Referenced by Schedule().
TrigPaths edm::Schedule::trig_paths_ [private] |
Definition at line 278 of file Schedule.h.
Referenced by availablePaths(), clearCounters(), endJob(), fillTrigPath(), getTriggerReport(), modulesInPath(), and runTriggerPaths().
boost::shared_ptr<UnscheduledCallProducer> edm::Schedule::unscheduled_ [private] |
Definition at line 286 of file Schedule.h.
Referenced by processOneOccurrence(), Schedule(), and setupOnDemandSystem().
bool edm::Schedule::wantSummary_ [private] |
Definition at line 281 of file Schedule.h.
Referenced by addToAllWorkers(), endJob(), fillEndPath(), and fillTrigPath().
WorkerRegistry edm::Schedule::worker_reg_ [private] |
Definition at line 264 of file Schedule.h.
Referenced by fillWorkers(), and Schedule().