#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 (ExceptionCollector &collector) |
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_ |
bool | printedFirstException_ |
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 100 of file Schedule.h.
typedef std::vector<OutputWorker*> edm::Schedule::AllOutputWorkers |
Definition at line 108 of file Schedule.h.
typedef std::vector<Worker*> edm::Schedule::AllWorkers |
Definition at line 107 of file Schedule.h.
typedef std::vector<Path> edm::Schedule::NonTrigPaths |
Definition at line 104 of file Schedule.h.
typedef std::vector<WorkerInPath> edm::Schedule::PathWorkers |
Definition at line 112 of file Schedule.h.
typedef std::vector<Path> edm::Schedule::TrigPaths |
Definition at line 103 of file Schedule.h.
typedef boost::shared_ptr<HLTGlobalStatus> edm::Schedule::TrigResPtr |
Definition at line 105 of file Schedule.h.
typedef std::vector<std::string> edm::Schedule::vstring |
Definition at line 102 of file Schedule.h.
typedef boost::shared_ptr<Worker> edm::Schedule::WorkerPtr |
Definition at line 106 of file Schedule.h.
typedef std::vector<Worker*> edm::Schedule::Workers |
Definition at line 110 of file Schedule.h.
enum edm::Schedule::State |
Definition at line 121 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 99 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(), edm::loadMissingDictionaries(), 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), printedFirstException_(false) { 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 982 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 873 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 825 of file Schedule.cc.
References all_workers_, edm::Worker::beginJob(), edm::for_all(), and edm::loadMissingDictionaries().
{ for_all(all_workers_, boost::bind(&Worker::beginJob, _1)); loadMissingDictionaries(); }
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 837 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 967 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 782 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 899 of file Schedule.cc.
References endpathsAreActive_.
{ endpathsAreActive_ = active; }
void edm::Schedule::endJob | ( | ExceptionCollector & | collector | ) |
Definition at line 431 of file Schedule.cc.
References edm::ExceptionCollector::addException(), edm::convertException::badAllocToEDM(), trackerHits::c, edm::convertException::charPtrToEDM(), end_paths_, exception, i, edm::max(), pi, asciidump::s, edm::convertException::stdToEDM(), edm::convertException::stringToEDM(), timeCpuReal(), totalEvents(), totalEventsFailed(), totalEventsPassed(), trig_paths_, edm::convertException::unknownToEDM(), wantSummary_, workersBegin(), and workersEnd().
{ bool failure = false; AllWorkers::iterator ai(workersBegin()), ae(workersEnd()); for (; ai != ae; ++ai) { try { try { (*ai)->endJob(); } catch (cms::Exception& e) { throw; } catch (std::bad_alloc& bda) { convertException::badAllocToEDM(); } catch (std::exception& e) { convertException::stdToEDM(e); } catch (std::string& s) { convertException::stringToEDM(s); } catch (char const* c) { convertException::charPtrToEDM(c); } catch (...) { convertException::unknownToEDM(); } } catch (cms::Exception const& ex) { collector.addException(ex); failure = true; } } if (failure) { return; } 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 904 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 409 of file Schedule.cc.
References act_table_, actReg_, addToAllWorkers(), end_paths_, endpath_results_, fillWorkers(), edm::for_all(), AlCaHLTBitMon_ParallelJobs::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 385 of file Schedule.cc.
References act_table_, actReg_, addToAllWorkers(), fillWorkers(), edm::for_all(), AlCaHLTBitMon_ParallelJobs::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 329 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 858 of file Schedule.cc.
References all_workers_, i, AlCaHLTBitMon_ParallelJobs::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 956 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 267 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 882 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 786 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 790 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 833 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 830 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 407 of file Schedule.h.
References act_table_, alignmentValidation::action, cms::Exception::addContext(), edm::convertException::badAllocToEDM(), trackerHits::c, cms::Exception::category(), edm::convertException::charPtrToEDM(), cms::Exception::context(), endpathsAreActive_, exception, edm::actions::FailPath, edm::ActionTable::find(), edm::actions::IgnoreCompletely, edm::Service< T >::isAvailable(), Latched, edm::printCmsException(), edm::printCmsExceptionWarning(), printedFirstException_, Ready, resetAll(), results_inserter_, edm::actions::Rethrow, cms::Exception::returnCode(), Running, asciidump::s, cms::Exception::setAlreadyPrinted(), setupOnDemandSystem(), edm::actions::SkipEvent, state_, edm::convertException::stdToEDM(), stopwatch_, edm::convertException::stringToEDM(), total_events_, total_passed_, edm::convertException::unknownToEDM(), and unscheduled_.
{ 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 { 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.category()) : actions::Rethrow); assert (action != actions::IgnoreCompletely); assert (action != actions::FailPath); if (action == actions::SkipEvent) { edm::printCmsExceptionWarning("SkipEvent", e); } else { throw; } } try { CPUTimer timer; if (results_inserter_.get()) results_inserter_->doWork<T>(ep, es, 0, &timer); } catch (cms::Exception & ex) { if (T::isEvent_) { ex.addContext("Calling produce method for module TriggerResultInserter"); } std::ostringstream ost; ost << "Processing " << ep.id(); ex.addContext(ost.str()); throw; } if (endpathsAreActive_) runEndPaths<T>(ep, es); } catch (cms::Exception& e) { throw; } catch(std::bad_alloc& bda) { convertException::badAllocToEDM(); } catch (std::exception& e) { convertException::stdToEDM(e); } catch(std::string& s) { convertException::stringToEDM(s); } catch(char const* c) { convertException::charPtrToEDM(c); } catch (...) { convertException::unknownToEDM(); } } catch(cms::Exception& ex) { if (!printedFirstException_) { Service<JobReport> jobReportSvc; if (ex.context().empty()) { ex.addContext("Calling function Schedule::processOneOccurrence"); } if (jobReportSvc.isAvailable()) { JobReport *jobRep = jobReportSvc.operator->(); edm::printCmsException(ex, jobRep, ex.returnCode()); } else { edm::printCmsException(ex); } ex.setAlreadyPrinted(true); printedFirstException_ = true; } 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 400 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 252 of file Schedule.h.
{}
void edm::Schedule::reportSkipped | ( | LuminosityBlockPrincipal const & | ) | const [inline, private] |
Definition at line 251 of file Schedule.h.
{}
void edm::Schedule::resetAll | ( | ) | [private] |
Definition at line 975 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 813 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 821 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 809 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 817 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 494 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 487 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 992 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 802 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 311 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 162 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 184 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 196 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 190 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 232 of file Schedule.h.
References all_workers_.
{ return all_workers_.begin(); }
AllWorkers::const_iterator edm::Schedule::workersBegin | ( | ) | const [inline, private] |
Definition at line 224 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 228 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 798 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 794 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 272 of file Schedule.h.
Referenced by fillEndPath(), fillTrigPath(), fillWorkers(), processOneOccurrence(), and Schedule().
boost::shared_ptr<ActivityRegistry> edm::Schedule::actReg_ [private] |
Definition at line 273 of file Schedule.h.
Referenced by fillEndPath(), fillTrigPath(), and Schedule().
Definition at line 284 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 283 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 277 of file Schedule.h.
Referenced by fillWorkers(), and Schedule().
TrigPaths edm::Schedule::end_paths_ [private] |
Definition at line 286 of file Schedule.h.
Referenced by clearCounters(), endJob(), fillEndPath(), getTriggerReport(), and runEndPaths().
TrigResPtr edm::Schedule::endpath_results_ [private] |
Definition at line 280 of file Schedule.h.
Referenced by fillEndPath(), resetAll(), and Schedule().
volatile bool edm::Schedule::endpathsAreActive_ [private] |
Definition at line 295 of file Schedule.h.
Referenced by enableEndPaths(), endPathsEnabled(), and processOneOccurrence().
bool edm::Schedule::printedFirstException_ [private] |
Definition at line 297 of file Schedule.h.
Referenced by processOneOccurrence().
TrigResPtr edm::Schedule::results_ [private] |
Definition at line 279 of file Schedule.h.
Referenced by resetAll(), runTriggerPaths(), and Schedule().
WorkerPtr edm::Schedule::results_inserter_ [private] |
Definition at line 282 of file Schedule.h.
Referenced by processOneOccurrence(), and Schedule().
State edm::Schedule::state_ [private] |
Definition at line 275 of file Schedule.h.
Referenced by processOneOccurrence().
Definition at line 291 of file Schedule.h.
Referenced by processOneOccurrence(), and timeCpuReal().
int edm::Schedule::total_events_ [private] |
Definition at line 289 of file Schedule.h.
Referenced by clearCounters(), processOneOccurrence(), and totalEvents().
int edm::Schedule::total_passed_ [private] |
Definition at line 290 of file Schedule.h.
Referenced by clearCounters(), processOneOccurrence(), and totalEventsPassed().
vstring edm::Schedule::trig_name_list_ [private] |
Definition at line 276 of file Schedule.h.
Referenced by Schedule().
TrigPaths edm::Schedule::trig_paths_ [private] |
Definition at line 285 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 293 of file Schedule.h.
Referenced by processOneOccurrence(), Schedule(), and setupOnDemandSystem().
bool edm::Schedule::wantSummary_ [private] |
Definition at line 288 of file Schedule.h.
Referenced by addToAllWorkers(), endJob(), fillEndPath(), and fillTrigPath().
WorkerRegistry edm::Schedule::worker_reg_ [private] |
Definition at line 271 of file Schedule.h.
Referenced by fillWorkers(), and Schedule().