#include <FWCore/Framework/interface/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 | beginJob (EventSetup const &) |
void | clearCounters () |
Clear all the counters in the trigger report. | |
void | closeOutputFiles () |
void | enableEndPaths (bool active) |
Turn end_paths "off" if "active" is false; turn end_paths "on" if "active" is true. | |
void | endJob () |
bool | endPathsEnabled () const |
Return true if end_paths are active, and false if they are inactive. | |
std::vector< ModuleDescription const * > | getAllModuleDescriptions () const |
Return a vector allowing const access to all the ModuleDescriptions for this Schedule. | |
void | getTriggerReport (TriggerReport &rep) const |
Return the trigger report information on paths, modules-in-path, modules-in-endpath, and modules. | |
void | openNewOutputFilesIfNeeded () |
void | openOutputFiles (FileBlock &fb) |
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 const &processDesc, edm::service::TriggerNamesService &tns, WorkerRegistry &wregistry, ProductRegistry &pregistry, ActionTable &actions, boost::shared_ptr< ActivityRegistry > areg) | |
bool | shouldWeCloseOutput () const |
bool const | terminate () const |
Return whether a module has reached its maximum count. | |
std::pair< double, double > | timeCpuReal () const |
int | totalEvents () const |
Return the number of events this Schedule has tried to process (inclues both successes and failures, including failures due to exceptions during processing). | |
int | totalEventsFailed () const |
Return the number of events that have not passed any trigger. | |
int | totalEventsPassed () const |
Return the number of events which have been passed by one or more trigger paths. | |
void | writeLumi (LuminosityBlockPrincipal const &lbp) |
void | writeRun (RunPrincipal const &rp) |
Private Member Functions | |
void | addToAllWorkers (Worker *w) |
void | fillEndPath (int bitpos, std::string const &name) |
void | fillTrigPath (int bitpos, std::string const &name, TrigResPtr) |
void | fillWorkers (std::string const &name, PathWorkers &out) |
void | limitOutput () |
void | reportSkipped (RunPrincipal const &) const |
void | reportSkipped (LuminosityBlockPrincipal 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 * | act_table_ |
boost::shared_ptr < ActivityRegistry > | actReg_ |
AllOutputWorkers | all_output_workers_ |
AllWorkers | all_workers_ |
std::vector< boost::shared_ptr < ConstBranchDescription const > > | demandBranches_ |
vstring | end_path_name_list_ |
TrigPaths | end_paths_ |
TrigResPtr | endpath_results_ |
volatile bool | endpathsAreActive_ |
std::string | processName_ |
ProductRegistry * | prod_reg_ |
ParameterSet | pset_ |
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 107 of file Schedule.h.
typedef std::vector<OutputWorker*> edm::Schedule::AllOutputWorkers |
Definition at line 115 of file Schedule.h.
typedef std::vector<Worker*> edm::Schedule::AllWorkers |
Definition at line 114 of file Schedule.h.
typedef std::vector<Path> edm::Schedule::NonTrigPaths |
Definition at line 111 of file Schedule.h.
typedef std::vector<WorkerInPath> edm::Schedule::PathWorkers |
Definition at line 119 of file Schedule.h.
typedef std::vector<Path> edm::Schedule::TrigPaths |
Definition at line 110 of file Schedule.h.
typedef boost::shared_ptr<HLTGlobalStatus> edm::Schedule::TrigResPtr |
Definition at line 112 of file Schedule.h.
typedef std::vector<std::string> edm::Schedule::vstring |
Definition at line 109 of file Schedule.h.
typedef boost::shared_ptr<Worker> edm::Schedule::WorkerPtr |
Definition at line 113 of file Schedule.h.
typedef std::vector<Worker*> edm::Schedule::Workers |
Definition at line 117 of file Schedule.h.
enum edm::Schedule::State |
edm::Schedule::Schedule | ( | ParameterSet const & | processDesc, | |
edm::service::TriggerNamesService & | tns, | |||
WorkerRegistry & | wregistry, | |||
ProductRegistry & | pregistry, | |||
ActionTable & | actions, | |||
boost::shared_ptr< ActivityRegistry > | areg | |||
) |
Definition at line 94 of file Schedule.cc.
References act_table_, actReg_, addToAllWorkers(), all_output_workers_, all_workers_, demandBranches_, e, end_path_name_list_, endpath_results_, fillEndPath(), fillTrigPath(), edm::ParameterSet::getParameter(), edm::getPassID(), edm::getReleaseVersion(), edm::service::TriggerNamesService::getTriggerPSet(), edm::ParameterSet::getUntrackedParameter(), edm::WorkerRegistry::getWorker(), i, limitOutput(), edm::makeInserter(), bookConverter::opts, params, processName_, prod_reg_, edm::ProductRegistry::productList(), pset_, results_, results_inserter_, edm::ProductRegistry::setFrozen(), trig_name_list_, unscheduled_, workersBegin(), and workersEnd().
00099 : 00100 pset_(proc_pset), 00101 worker_reg_(&wreg), 00102 prod_reg_(&preg), 00103 act_table_(&actions), 00104 processName_(tns.getProcessName()), 00105 actReg_(areg), 00106 state_(Ready), 00107 trig_name_list_(tns.getTrigPaths()), 00108 end_path_name_list_(tns.getEndPaths()), 00109 results_ (new HLTGlobalStatus(trig_name_list_.size())), 00110 endpath_results_(), // delay! 00111 results_inserter_(), 00112 all_workers_(), 00113 all_output_workers_(), 00114 trig_paths_(), 00115 end_paths_(), 00116 wantSummary_(tns.wantSummary()), 00117 total_events_(), 00118 total_passed_(), 00119 stopwatch_(new RunStopwatch::StopwatchPointer::element_type), 00120 unscheduled_(new UnscheduledCallProducer), 00121 demandBranches_(), 00122 endpathsAreActive_(true) 00123 { 00124 ParameterSet opts(pset_.getUntrackedParameter<ParameterSet>("options", ParameterSet())); 00125 bool hasPath = false; 00126 00127 int trig_bitpos = 0; 00128 for (vstring::const_iterator i = trig_name_list_.begin(), 00129 e = trig_name_list_.end(); 00130 i != e; 00131 ++i) { 00132 fillTrigPath(trig_bitpos,*i, results_); 00133 ++trig_bitpos; 00134 hasPath = true; 00135 } 00136 00137 if (hasPath) { 00138 // the results inserter stands alone 00139 results_inserter_ = makeInserter(pset_, tns.getTriggerPSet(), 00140 processName_, 00141 preg, actions, actReg_, results_); 00142 addToAllWorkers(results_inserter_.get()); 00143 } 00144 00145 TrigResPtr epptr(new HLTGlobalStatus(end_path_name_list_.size())); 00146 endpath_results_ = epptr; 00147 00148 // fill normal endpaths 00149 vstring::iterator eib(end_path_name_list_.begin()),eie(end_path_name_list_.end()); 00150 for(int bitpos = 0; eib != eie; ++eib, ++bitpos) { 00151 fillEndPath(bitpos, *eib); 00152 } 00153 00154 //See if all modules were used 00155 std::set<std::string> usedWorkerLabels; 00156 for(AllWorkers::iterator itWorker=workersBegin(); 00157 itWorker != workersEnd(); 00158 ++itWorker) { 00159 usedWorkerLabels.insert((*itWorker)->description().moduleLabel_); 00160 } 00161 std::vector<std::string> modulesInConfig(proc_pset.getParameter<std::vector<std::string> >("@all_modules")); 00162 std::set<std::string> modulesInConfigSet(modulesInConfig.begin(),modulesInConfig.end()); 00163 std::vector<std::string> unusedLabels; 00164 set_difference(modulesInConfigSet.begin(),modulesInConfigSet.end(), 00165 usedWorkerLabels.begin(),usedWorkerLabels.end(), 00166 back_inserter(unusedLabels)); 00167 //does the configuration say we should allow on demand? 00168 bool allowUnscheduled = opts.getUntrackedParameter<bool>("allowUnscheduled", false); 00169 std::set<std::string> unscheduledLabels; 00170 if(!unusedLabels.empty()) { 00171 //Need to 00172 // 1) create worker 00173 // 2) if it is a WorkerT<EDProducer>, add it to our list 00174 // 3) hand list to our delayed reader 00175 std::vector<std::string> shouldBeUsedLabels; 00176 00177 for(std::vector<std::string>::iterator itLabel = unusedLabels.begin(), itLabelEnd = unusedLabels.end(); 00178 itLabel != itLabelEnd; 00179 ++itLabel) { 00180 if (allowUnscheduled) { 00181 //Need to hold onto the parameters long enough to make the call to getWorker 00182 ParameterSet workersParams(proc_pset.getParameter<ParameterSet>(*itLabel)); 00183 WorkerParams params(proc_pset, workersParams, 00184 *prod_reg_, *act_table_, 00185 processName_, getReleaseVersion(), getPassID()); 00186 Worker* newWorker(wreg.getWorker(params)); 00187 if (dynamic_cast<WorkerT<EDProducer>*>(newWorker) || 00188 dynamic_cast<WorkerT<EDFilter>*>(newWorker) ) { 00189 unscheduledLabels.insert(*itLabel); 00190 unscheduled_->addWorker(newWorker); 00191 //add to list so it gets reset each new event 00192 addToAllWorkers(newWorker); 00193 } else { 00194 //not a producer so should be marked as not used 00195 shouldBeUsedLabels.push_back(*itLabel); 00196 } 00197 } else { 00198 //everthing is marked are unused so no 'on demand' allowed 00199 shouldBeUsedLabels.push_back(*itLabel); 00200 } 00201 } 00202 if(!shouldBeUsedLabels.empty()) { 00203 std::ostringstream unusedStream; 00204 unusedStream << "'"<< shouldBeUsedLabels.front() <<"'"; 00205 for(std::vector<std::string>::iterator itLabel = shouldBeUsedLabels.begin() + 1, 00206 itLabelEnd = shouldBeUsedLabels.end(); 00207 itLabel != itLabelEnd; 00208 ++itLabel) { 00209 unusedStream <<",'" << *itLabel<<"'"; 00210 } 00211 LogInfo("path") 00212 << "The following module labels are not assigned to any path:\n" 00213 <<unusedStream.str() 00214 <<"\n"; 00215 } 00216 } 00217 00218 // All the workers should be in all_workers_ by this point. Thus 00219 // we can now fill all_output_workers_. We provide a little 00220 // sanity-check to make sure no code modifications alter the 00221 // number of workers at a later date... Much better would be to 00222 // refactor this huge constructor into a series of well-named 00223 // private functions. 00224 size_t all_workers_count = all_workers_.size(); 00225 for (AllWorkers::iterator i = all_workers_.begin(), e = all_workers_.end(); 00226 i != e; 00227 ++i) { 00228 OutputWorker* ow = dynamic_cast<OutputWorker*>(*i); 00229 if (ow) all_output_workers_.push_back(ow); 00230 } 00231 00232 // Now that the output workers are filled in, set any output limits. 00233 limitOutput(); 00234 00235 prod_reg_->setFrozen(); 00236 00237 //Now that these have been set, we can create the list of Branches we need for the 'on demand' 00238 ProductRegistry::ProductList const& prodsList = prod_reg_->productList(); 00239 for(ProductRegistry::ProductList::const_iterator itProdInfo = prodsList.begin(), 00240 itProdInfoEnd = prodsList.end(); 00241 itProdInfo != itProdInfoEnd; 00242 ++itProdInfo) { 00243 if(processName_ == itProdInfo->second.processName() && 00244 unscheduledLabels.end() != unscheduledLabels.find(itProdInfo->second.moduleLabel())) { 00245 boost::shared_ptr<ConstBranchDescription const> bd(new ConstBranchDescription(itProdInfo->second)); 00246 demandBranches_.push_back(bd); 00247 } 00248 } 00249 00250 // Sanity check: make sure nobody has added a worker after we've 00251 // already relied on all_workers_ being full. 00252 assert (all_workers_count == all_workers_.size()); 00253 00254 } // Schedule::Schedule
Definition at line 896 of file Schedule.cc.
References all_workers_, and edm::search_all().
Referenced by fillEndPath(), fillTrigPath(), and Schedule().
00896 { 00897 if (!search_all(all_workers_, w)) all_workers_.push_back(w); 00898 }
void edm::Schedule::beginJob | ( | EventSetup const & | es | ) |
Definition at line 790 of file Schedule.cc.
References all_workers_, edm::Worker::beginJob(), and edm::for_all().
00790 { 00791 for_all(all_workers_, boost::bind(&Worker::beginJob, _1, boost::cref(es))); 00792 }
void edm::Schedule::clearCounters | ( | ) |
Clear all the counters in the trigger report.
Definition at line 881 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_.
00881 { 00882 total_events_ = total_passed_ = 0; 00883 for_all(trig_paths_, boost::bind(&Path::clearCounters, _1)); 00884 for_all(end_paths_, boost::bind(&Path::clearCounters, _1)); 00885 for_all(all_workers_, boost::bind(&Worker::clearCounters, _1)); 00886 }
void edm::Schedule::closeOutputFiles | ( | ) |
Definition at line 747 of file Schedule.cc.
References all_output_workers_, edm::OutputWorker::closeFile(), and edm::for_all().
00747 { 00748 for_all(all_output_workers_, boost::bind(&OutputWorker::closeFile, _1)); 00749 }
Turn end_paths "off" if "active" is false; turn end_paths "on" if "active" is true.
Definition at line 810 of file Schedule.cc.
References endpathsAreActive_.
00810 { 00811 endpathsAreActive_ = active; 00812 }
Definition at line 392 of file Schedule.cc.
References e, end_paths_, exception, cms::Exception::explainSelf(), i, max, pi, timeCpuReal(), totalEvents(), totalEventsFailed(), totalEventsPassed(), trig_paths_, wantSummary_, cms::Exception::what(), workersBegin(), and workersEnd().
Referenced by edm::EventProcessor::endJob().
00392 { 00393 bool failure = false; 00394 cms::Exception accumulated("endJob"); 00395 AllWorkers::iterator ai(workersBegin()),ae(workersEnd()); 00396 for(; ai != ae; ++ai) { 00397 try { 00398 (*ai)->endJob(); 00399 } 00400 catch (cms::Exception& e) { 00401 accumulated << "cms::Exception caught in Schedule::endJob\n" 00402 << e.explainSelf(); 00403 failure = true; 00404 } 00405 catch (std::exception& e) { 00406 accumulated << "Standard library exception caught in Schedule::endJob\n" 00407 << e.what(); 00408 failure = true; 00409 } 00410 catch (...) { 00411 accumulated << "Unknown exception caught in Schedule::endJob\n"; 00412 failure = true; 00413 } 00414 } 00415 if (failure) { 00416 throw accumulated; 00417 } 00418 00419 00420 if(wantSummary_ == false) return; 00421 00422 TrigPaths::const_iterator pi,pe; 00423 00424 // The trigger report (pass/fail etc.): 00425 00426 LogVerbatim("FwkSummary") << ""; 00427 LogVerbatim("FwkSummary") << "TrigReport " << "---------- Event Summary ------------"; 00428 LogVerbatim("FwkSummary") << "TrigReport" 00429 << " Events total = " << totalEvents() 00430 << " passed = " << totalEventsPassed() 00431 << " failed = " << (totalEventsFailed()) 00432 << ""; 00433 00434 LogVerbatim("FwkSummary") << ""; 00435 LogVerbatim("FwkSummary") << "TrigReport " << "---------- Path Summary ------------"; 00436 LogVerbatim("FwkSummary") << "TrigReport " 00437 << std::right << std::setw(10) << "Trig Bit#" << " " 00438 << std::right << std::setw(10) << "Run" << " " 00439 << std::right << std::setw(10) << "Passed" << " " 00440 << std::right << std::setw(10) << "Failed" << " " 00441 << std::right << std::setw(10) << "Error" << " " 00442 << "Name" << ""; 00443 pi=trig_paths_.begin(); 00444 pe=trig_paths_.end(); 00445 for(; pi != pe; ++pi) { 00446 LogVerbatim("FwkSummary") << "TrigReport " 00447 << std::right << std::setw( 5) << 1 00448 << std::right << std::setw( 5) << pi->bitPosition() << " " 00449 << std::right << std::setw(10) << pi->timesRun() << " " 00450 << std::right << std::setw(10) << pi->timesPassed() << " " 00451 << std::right << std::setw(10) << pi->timesFailed() << " " 00452 << std::right << std::setw(10) << pi->timesExcept() << " " 00453 << pi->name() << ""; 00454 } 00455 00456 LogVerbatim("FwkSummary") << ""; 00457 LogVerbatim("FwkSummary") << "TrigReport " << "-------End-Path Summary ------------"; 00458 LogVerbatim("FwkSummary") << "TrigReport " 00459 << std::right << std::setw(10) << "Trig Bit#" << " " 00460 << std::right << std::setw(10) << "Run" << " " 00461 << std::right << std::setw(10) << "Passed" << " " 00462 << std::right << std::setw(10) << "Failed" << " " 00463 << std::right << std::setw(10) << "Error" << " " 00464 << "Name" << ""; 00465 pi=end_paths_.begin(); 00466 pe=end_paths_.end(); 00467 for(; pi != pe; ++pi) { 00468 LogVerbatim("FwkSummary") << "TrigReport " 00469 << std::right << std::setw( 5) << 0 00470 << std::right << std::setw( 5) << pi->bitPosition() << " " 00471 << std::right << std::setw(10) << pi->timesRun() << " " 00472 << std::right << std::setw(10) << pi->timesPassed() << " " 00473 << std::right << std::setw(10) << pi->timesFailed() << " " 00474 << std::right << std::setw(10) << pi->timesExcept() << " " 00475 << pi->name() << ""; 00476 } 00477 00478 pi=trig_paths_.begin(); 00479 pe=trig_paths_.end(); 00480 for(; pi != pe; ++pi) { 00481 LogVerbatim("FwkSummary") << ""; 00482 LogVerbatim("FwkSummary") << "TrigReport " << "---------- Modules in Path: " << pi->name() << " ------------"; 00483 LogVerbatim("FwkSummary") << "TrigReport " 00484 << std::right << std::setw(10) << "Trig Bit#" << " " 00485 << std::right << std::setw(10) << "Visited" << " " 00486 << std::right << std::setw(10) << "Passed" << " " 00487 << std::right << std::setw(10) << "Failed" << " " 00488 << std::right << std::setw(10) << "Error" << " " 00489 << "Name" << ""; 00490 00491 for (unsigned int i = 0; i < pi->size(); ++i) { 00492 LogVerbatim("FwkSummary") << "TrigReport " 00493 << std::right << std::setw( 5) << 1 00494 << std::right << std::setw( 5) << pi->bitPosition() << " " 00495 << std::right << std::setw(10) << pi->timesVisited(i) << " " 00496 << std::right << std::setw(10) << pi->timesPassed(i) << " " 00497 << std::right << std::setw(10) << pi->timesFailed(i) << " " 00498 << std::right << std::setw(10) << pi->timesExcept(i) << " " 00499 << pi->getWorker(i)->description().moduleLabel_ << ""; 00500 } 00501 } 00502 00503 pi=end_paths_.begin(); 00504 pe=end_paths_.end(); 00505 for(; pi != pe; ++pi) { 00506 LogVerbatim("FwkSummary") << ""; 00507 LogVerbatim("FwkSummary") << "TrigReport " << "------ Modules in End-Path: " << pi->name() << " ------------"; 00508 LogVerbatim("FwkSummary") << "TrigReport " 00509 << std::right << std::setw(10) << "Trig Bit#" << " " 00510 << std::right << std::setw(10) << "Visited" << " " 00511 << std::right << std::setw(10) << "Passed" << " " 00512 << std::right << std::setw(10) << "Failed" << " " 00513 << std::right << std::setw(10) << "Error" << " " 00514 << "Name" << ""; 00515 00516 for (unsigned int i = 0; i < pi->size(); ++i) { 00517 LogVerbatim("FwkSummary") << "TrigReport " 00518 << std::right << std::setw( 5) << 0 00519 << std::right << std::setw( 5) << pi->bitPosition() << " " 00520 << std::right << std::setw(10) << pi->timesVisited(i) << " " 00521 << std::right << std::setw(10) << pi->timesPassed(i) << " " 00522 << std::right << std::setw(10) << pi->timesFailed(i) << " " 00523 << std::right << std::setw(10) << pi->timesExcept(i) << " " 00524 << pi->getWorker(i)->description().moduleLabel_ << ""; 00525 } 00526 } 00527 00528 LogVerbatim("FwkSummary") << ""; 00529 LogVerbatim("FwkSummary") << "TrigReport " << "---------- Module Summary ------------"; 00530 LogVerbatim("FwkSummary") << "TrigReport " 00531 << std::right << std::setw(10) << "Visited" << " " 00532 << std::right << std::setw(10) << "Run" << " " 00533 << std::right << std::setw(10) << "Passed" << " " 00534 << std::right << std::setw(10) << "Failed" << " " 00535 << std::right << std::setw(10) << "Error" << " " 00536 << "Name" << ""; 00537 ai=workersBegin(); 00538 ae=workersEnd(); 00539 for(; ai != ae; ++ai) { 00540 LogVerbatim("FwkSummary") << "TrigReport " 00541 << std::right << std::setw(10) << (*ai)->timesVisited() << " " 00542 << std::right << std::setw(10) << (*ai)->timesRun() << " " 00543 << std::right << std::setw(10) << (*ai)->timesPassed() << " " 00544 << std::right << std::setw(10) << (*ai)->timesFailed() << " " 00545 << std::right << std::setw(10) << (*ai)->timesExcept() << " " 00546 << (*ai)->description().moduleLabel_ << ""; 00547 00548 } 00549 LogVerbatim("FwkSummary") << ""; 00550 00551 // The timing report (CPU and Real Time): 00552 00553 LogVerbatim("FwkSummary") << "TimeReport " << "---------- Event Summary ---[sec]----"; 00554 LogVerbatim("FwkSummary") << "TimeReport" 00555 << std::setprecision(6) << std::fixed 00556 << " CPU/event = " << timeCpuReal().first/std::max(1,totalEvents()) 00557 << " Real/event = " << timeCpuReal().second/std::max(1,totalEvents()) 00558 << ""; 00559 00560 LogVerbatim("FwkSummary") << ""; 00561 LogVerbatim("FwkSummary") << "TimeReport " << "---------- Path Summary ---[sec]----"; 00562 LogVerbatim("FwkSummary") << "TimeReport " 00563 << std::right << std::setw(22) << "per event " 00564 << std::right << std::setw(22) << "per path-run " 00565 << ""; 00566 LogVerbatim("FwkSummary") << "TimeReport " 00567 << std::right << std::setw(10) << "CPU" << " " 00568 << std::right << std::setw(10) << "Real" << " " 00569 << std::right << std::setw(10) << "CPU" << " " 00570 << std::right << std::setw(10) << "Real" << " " 00571 << "Name" << ""; 00572 pi=trig_paths_.begin(); 00573 pe=trig_paths_.end(); 00574 for(; pi != pe; ++pi) { 00575 LogVerbatim("FwkSummary") << "TimeReport " 00576 << std::setprecision(6) << std::fixed 00577 << std::right << std::setw(10) << pi->timeCpuReal().first/std::max(1,totalEvents()) << " " 00578 << std::right << std::setw(10) << pi->timeCpuReal().second/std::max(1,totalEvents()) << " " 00579 << std::right << std::setw(10) << pi->timeCpuReal().first/std::max(1,pi->timesRun()) << " " 00580 << std::right << std::setw(10) << pi->timeCpuReal().second/std::max(1,pi->timesRun()) << " " 00581 << pi->name() << ""; 00582 } 00583 LogVerbatim("FwkSummary") << "TimeReport " 00584 << std::right << std::setw(10) << "CPU" << " " 00585 << std::right << std::setw(10) << "Real" << " " 00586 << std::right << std::setw(10) << "CPU" << " " 00587 << std::right << std::setw(10) << "Real" << " " 00588 << "Name" << ""; 00589 LogVerbatim("FwkSummary") << "TimeReport " 00590 << std::right << std::setw(22) << "per event " 00591 << std::right << std::setw(22) << "per path-run " 00592 << ""; 00593 00594 LogVerbatim("FwkSummary") << ""; 00595 LogVerbatim("FwkSummary") << "TimeReport " << "-------End-Path Summary ---[sec]----"; 00596 LogVerbatim("FwkSummary") << "TimeReport " 00597 << std::right << std::setw(22) << "per event " 00598 << std::right << std::setw(22) << "per endpath-run " 00599 << ""; 00600 LogVerbatim("FwkSummary") << "TimeReport " 00601 << std::right << std::setw(10) << "CPU" << " " 00602 << std::right << std::setw(10) << "Real" << " " 00603 << std::right << std::setw(10) << "CPU" << " " 00604 << std::right << std::setw(10) << "Real" << " " 00605 << "Name" << ""; 00606 pi=end_paths_.begin(); 00607 pe=end_paths_.end(); 00608 for(; pi != pe; ++pi) { 00609 LogVerbatim("FwkSummary") << "TimeReport " 00610 << std::setprecision(6) << std::fixed 00611 << std::right << std::setw(10) << pi->timeCpuReal().first/std::max(1,totalEvents()) << " " 00612 << std::right << std::setw(10) << pi->timeCpuReal().second/std::max(1,totalEvents()) << " " 00613 << std::right << std::setw(10) << pi->timeCpuReal().first/std::max(1,pi->timesRun()) << " " 00614 << std::right << std::setw(10) << pi->timeCpuReal().second/std::max(1,pi->timesRun()) << " " 00615 << pi->name() << ""; 00616 } 00617 LogVerbatim("FwkSummary") << "TimeReport " 00618 << std::right << std::setw(10) << "CPU" << " " 00619 << std::right << std::setw(10) << "Real" << " " 00620 << std::right << std::setw(10) << "CPU" << " " 00621 << std::right << std::setw(10) << "Real" << " " 00622 << "Name" << ""; 00623 LogVerbatim("FwkSummary") << "TimeReport " 00624 << std::right << std::setw(22) << "per event " 00625 << std::right << std::setw(22) << "per endpath-run " 00626 << ""; 00627 00628 pi=trig_paths_.begin(); 00629 pe=trig_paths_.end(); 00630 for(; pi != pe; ++pi) { 00631 LogVerbatim("FwkSummary") << ""; 00632 LogVerbatim("FwkSummary") << "TimeReport " << "---------- Modules in Path: " << pi->name() << " ---[sec]----"; 00633 LogVerbatim("FwkSummary") << "TimeReport " 00634 << std::right << std::setw(22) << "per event " 00635 << std::right << std::setw(22) << "per module-visit " 00636 << ""; 00637 LogVerbatim("FwkSummary") << "TimeReport " 00638 << std::right << std::setw(10) << "CPU" << " " 00639 << std::right << std::setw(10) << "Real" << " " 00640 << std::right << std::setw(10) << "CPU" << " " 00641 << std::right << std::setw(10) << "Real" << " " 00642 << "Name" << ""; 00643 for (unsigned int i = 0; i < pi->size(); ++i) { 00644 LogVerbatim("FwkSummary") << "TimeReport " 00645 << std::setprecision(6) << std::fixed 00646 << std::right << std::setw(10) << pi->timeCpuReal(i).first/std::max(1,totalEvents()) << " " 00647 << std::right << std::setw(10) << pi->timeCpuReal(i).second/std::max(1,totalEvents()) << " " 00648 << std::right << std::setw(10) << pi->timeCpuReal(i).first/std::max(1,pi->timesVisited(i)) << " " 00649 << std::right << std::setw(10) << pi->timeCpuReal(i).second/std::max(1,pi->timesVisited(i)) << " " 00650 << pi->getWorker(i)->description().moduleLabel_ << ""; 00651 } 00652 } 00653 LogVerbatim("FwkSummary") << "TimeReport " 00654 << std::right << std::setw(10) << "CPU" << " " 00655 << std::right << std::setw(10) << "Real" << " " 00656 << std::right << std::setw(10) << "CPU" << " " 00657 << std::right << std::setw(10) << "Real" << " " 00658 << "Name" << ""; 00659 LogVerbatim("FwkSummary") << "TimeReport " 00660 << std::right << std::setw(22) << "per event " 00661 << std::right << std::setw(22) << "per module-visit " 00662 << ""; 00663 00664 pi=end_paths_.begin(); 00665 pe=end_paths_.end(); 00666 for(; pi != pe; ++pi) { 00667 LogVerbatim("FwkSummary") << ""; 00668 LogVerbatim("FwkSummary") << "TimeReport " << "------ Modules in End-Path: " << pi->name() << " ---[sec]----"; 00669 LogVerbatim("FwkSummary") << "TimeReport " 00670 << std::right << std::setw(22) << "per event " 00671 << std::right << std::setw(22) << "per module-visit " 00672 << ""; 00673 LogVerbatim("FwkSummary") << "TimeReport " 00674 << std::right << std::setw(10) << "CPU" << " " 00675 << std::right << std::setw(10) << "Real" << " " 00676 << std::right << std::setw(10) << "CPU" << " " 00677 << std::right << std::setw(10) << "Real" << " " 00678 << "Name" << ""; 00679 for (unsigned int i = 0; i < pi->size(); ++i) { 00680 LogVerbatim("FwkSummary") << "TimeReport " 00681 << std::setprecision(6) << std::fixed 00682 << std::right << std::setw(10) << pi->timeCpuReal(i).first/std::max(1,totalEvents()) << " " 00683 << std::right << std::setw(10) << pi->timeCpuReal(i).second/std::max(1,totalEvents()) << " " 00684 << std::right << std::setw(10) << pi->timeCpuReal(i).first/std::max(1,pi->timesVisited(i)) << " " 00685 << std::right << std::setw(10) << pi->timeCpuReal(i).second/std::max(1,pi->timesVisited(i)) << " " 00686 << pi->getWorker(i)->description().moduleLabel_ << ""; 00687 } 00688 } 00689 LogVerbatim("FwkSummary") << "TimeReport " 00690 << std::right << std::setw(10) << "CPU" << " " 00691 << std::right << std::setw(10) << "Real" << " " 00692 << std::right << std::setw(10) << "CPU" << " " 00693 << std::right << std::setw(10) << "Real" << " " 00694 << "Name" << ""; 00695 LogVerbatim("FwkSummary") << "TimeReport " 00696 << std::right << std::setw(22) << "per event " 00697 << std::right << std::setw(22) << "per module-visit " 00698 << ""; 00699 00700 LogVerbatim("FwkSummary") << ""; 00701 LogVerbatim("FwkSummary") << "TimeReport " << "---------- Module Summary ---[sec]----"; 00702 LogVerbatim("FwkSummary") << "TimeReport " 00703 << std::right << std::setw(22) << "per event " 00704 << std::right << std::setw(22) << "per module-run " 00705 << std::right << std::setw(22) << "per module-visit " 00706 << ""; 00707 LogVerbatim("FwkSummary") << "TimeReport " 00708 << std::right << std::setw(10) << "CPU" << " " 00709 << std::right << std::setw(10) << "Real" << " " 00710 << std::right << std::setw(10) << "CPU" << " " 00711 << std::right << std::setw(10) << "Real" << " " 00712 << std::right << std::setw(10) << "CPU" << " " 00713 << std::right << std::setw(10) << "Real" << " " 00714 << "Name" << ""; 00715 ai=workersBegin(); 00716 ae=workersEnd(); 00717 for(; ai != ae; ++ai) { 00718 LogVerbatim("FwkSummary") << "TimeReport " 00719 << std::setprecision(6) << std::fixed 00720 << std::right << std::setw(10) << (*ai)->timeCpuReal().first/std::max(1,totalEvents()) << " " 00721 << std::right << std::setw(10) << (*ai)->timeCpuReal().second/std::max(1,totalEvents()) << " " 00722 << std::right << std::setw(10) << (*ai)->timeCpuReal().first/std::max(1,(*ai)->timesRun()) << " " 00723 << std::right << std::setw(10) << (*ai)->timeCpuReal().second/std::max(1,(*ai)->timesRun()) << " " 00724 << std::right << std::setw(10) << (*ai)->timeCpuReal().first/std::max(1,(*ai)->timesVisited()) << " " 00725 << std::right << std::setw(10) << (*ai)->timeCpuReal().second/std::max(1,(*ai)->timesVisited()) << " " 00726 << (*ai)->description().moduleLabel_ << ""; 00727 } 00728 LogVerbatim("FwkSummary") << "TimeReport " 00729 << std::right << std::setw(10) << "CPU" << " " 00730 << std::right << std::setw(10) << "Real" << " " 00731 << std::right << std::setw(10) << "CPU" << " " 00732 << std::right << std::setw(10) << "Real" << " " 00733 << std::right << std::setw(10) << "CPU" << " " 00734 << std::right << std::setw(10) << "Real" << " " 00735 << "Name" << ""; 00736 LogVerbatim("FwkSummary") << "TimeReport " 00737 << std::right << std::setw(22) << "per event " 00738 << std::right << std::setw(22) << "per module-run " 00739 << std::right << std::setw(22) << "per module-visit " 00740 << ""; 00741 00742 LogVerbatim("FwkSummary") << ""; 00743 LogVerbatim("FwkSummary") << "T---Report end!" << ""; 00744 LogVerbatim("FwkSummary") << ""; 00745 }
bool edm::Schedule::endPathsEnabled | ( | ) | const |
Return true if end_paths are active, and false if they are inactive.
Definition at line 815 of file Schedule.cc.
References endpathsAreActive_.
00815 { 00816 return endpathsAreActive_; 00817 }
Definition at line 375 of file Schedule.cc.
References act_table_, actReg_, addToAllWorkers(), end_paths_, endpath_results_, fillWorkers(), edm::for_all(), edm::holder, p, and pset_.
Referenced by Schedule().
00375 { 00376 PathWorkers tmpworkers; 00377 fillWorkers(name,tmpworkers); 00378 Workers holder; 00379 00380 for(PathWorkers::iterator wi(tmpworkers.begin()), 00381 we(tmpworkers.end()); wi != we; ++wi) { 00382 holder.push_back(wi->getWorker()); 00383 } 00384 00385 if (!tmpworkers.empty()) { 00386 Path p(bitpos,name,tmpworkers,endpath_results_,pset_,*act_table_,actReg_,true); 00387 end_paths_.push_back(p); 00388 } 00389 for_all(holder, boost::bind(&edm::Schedule::addToAllWorkers, this, _1)); 00390 }
void edm::Schedule::fillTrigPath | ( | int | bitpos, | |
std::string const & | name, | |||
TrigResPtr | trptr | |||
) | [private] |
Definition at line 357 of file Schedule.cc.
References act_table_, actReg_, addToAllWorkers(), fillWorkers(), edm::for_all(), edm::holder, p, pset_, and trig_paths_.
Referenced by Schedule().
00357 { 00358 PathWorkers tmpworkers; 00359 Workers holder; 00360 fillWorkers(name,tmpworkers); 00361 00362 for(PathWorkers::iterator wi(tmpworkers.begin()), 00363 we(tmpworkers.end()); wi != we; ++wi) { 00364 holder.push_back(wi->getWorker()); 00365 } 00366 00367 // an empty path will cause an extra bit that is not used 00368 if(!tmpworkers.empty()) { 00369 Path p(bitpos,name,tmpworkers,trptr,pset_,*act_table_,actReg_,false); 00370 trig_paths_.push_back(p); 00371 } 00372 for_all(holder, boost::bind(&edm::Schedule::addToAllWorkers, this, _1)); 00373 }
void edm::Schedule::fillWorkers | ( | std::string const & | name, | |
PathWorkers & | out | |||
) | [private] |
Definition at line 321 of file Schedule.cc.
References act_table_, edm::errors::Configuration, end_path_name_list_, edm::ParameterSet::getParameter(), edm::getPassID(), edm::getReleaseVersion(), edm::WorkerRegistry::getWorker(), edm::WorkerInPath::Ignore, it, edm::WorkerInPath::Normal, params, processName_, prod_reg_, pset_, edm::search_all(), edm::WorkerInPath::Veto, w, and worker_reg_.
Referenced by fillEndPath(), and fillTrigPath().
00321 { 00322 vstring modnames = pset_.getParameter<vstring>(name); 00323 vstring::iterator it(modnames.begin()),ie(modnames.end()); 00324 PathWorkers tmpworkers; 00325 00326 for(; it != ie; ++it) { 00327 00328 WorkerInPath::FilterAction filterAction = WorkerInPath::Normal; 00329 if ((*it)[0] == '!') filterAction = WorkerInPath::Veto; 00330 else if ((*it)[0] == '-') filterAction = WorkerInPath::Ignore; 00331 00332 std::string realname = *it; 00333 if (filterAction != WorkerInPath::Normal) realname.erase(0,1); 00334 00335 ParameterSet modpset; 00336 try { 00337 modpset= pset_.getParameter<ParameterSet>(realname); 00338 } catch(cms::Exception&) { 00339 std::string pathType("endpath"); 00340 if(!search_all(end_path_name_list_, name)) { 00341 pathType = std::string("path"); 00342 } 00343 throw edm::Exception(edm::errors::Configuration) << 00344 "The unknown module label \"" << realname << 00345 "\" appears in " << pathType << " \"" << name << 00346 "\"\n please check spelling or remove that label from the path."; 00347 } 00348 WorkerParams params(pset_, modpset, *prod_reg_, *act_table_, 00349 processName_, getReleaseVersion(), getPassID()); 00350 WorkerInPath w(worker_reg_->getWorker(params), filterAction); 00351 tmpworkers.push_back(w); 00352 } 00353 00354 out.swap(tmpworkers); 00355 }
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 795 of file Schedule.cc.
References all_workers_, e, i, p, HLT_VtxMuL3::result, workersBegin(), and workersEnd().
00795 { 00796 AllWorkers::const_iterator i(workersBegin()); 00797 AllWorkers::const_iterator e(workersEnd()); 00798 00799 std::vector<ModuleDescription const*> result; 00800 result.reserve(all_workers_.size()); 00801 00802 for (; i!=e; ++i) { 00803 ModuleDescription const* p = (*i)->descPtr(); 00804 result.push_back(p); 00805 } 00806 return result; 00807 }
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 870 of file Schedule.cc.
References all_workers_, end_paths_, edm::TriggerReport::endPathSummaries, edm::TriggerReport::eventSummary, edm::fill_summary(), 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.
00870 { 00871 rep.eventSummary.totalEvents = totalEvents(); 00872 rep.eventSummary.totalEventsPassed = totalEventsPassed(); 00873 rep.eventSummary.totalEventsFailed = totalEventsFailed(); 00874 00875 fill_summary(trig_paths_, rep.trigPathSummaries, &fillPathSummary); 00876 fill_summary(end_paths_, rep.endPathSummaries, &fillPathSummary); 00877 fill_summary(all_workers_, rep.workerSummaries, &fillWorkerSummary); 00878 }
void edm::Schedule::limitOutput | ( | ) | [private] |
Definition at line 257 of file Schedule.cc.
References all_output_workers_, edm::errors::Configuration, edm::ParameterSet::empty(), edm::ParameterSet::getParameterNamesForType(), edm::ParameterSet::getParameterSetNames(), edm::ParameterSet::getUntrackedParameter(), it, edm::OutputModuleDescription::maxEvents_, moduleLabel(), output(), pset_, and edm::search_all().
Referenced by Schedule().
00257 { 00258 std::string const output("output"); 00259 00260 ParameterSet maxEventsPSet(pset_.getUntrackedParameter<ParameterSet>("maxEvents", ParameterSet())); 00261 int maxEventSpecs = 0; 00262 int maxEventsOut = -1; 00263 ParameterSet vMaxEventsOut; 00264 std::vector<std::string> intNamesE = maxEventsPSet.getParameterNamesForType<int>(false); 00265 if (search_all(intNamesE, output)) { 00266 maxEventsOut = maxEventsPSet.getUntrackedParameter<int>(output); 00267 ++maxEventSpecs; 00268 } 00269 std::vector<std::string> psetNamesE; 00270 maxEventsPSet.getParameterSetNames(psetNamesE, false); 00271 if (search_all(psetNamesE, output)) { 00272 vMaxEventsOut = maxEventsPSet.getUntrackedParameter<ParameterSet>(output); 00273 ++maxEventSpecs; 00274 } 00275 00276 if (maxEventSpecs > 1) { 00277 throw edm::Exception(edm::errors::Configuration) << 00278 "\nAt most, one form of 'output' may appear in the 'maxEvents' parameter set"; 00279 } 00280 00281 if (maxEventSpecs == 0) { 00282 return; 00283 } 00284 00285 for (AllOutputWorkers::const_iterator it = all_output_workers_.begin(), itEnd = all_output_workers_.end(); 00286 it != itEnd; ++it) { 00287 OutputModuleDescription desc(maxEventsOut); 00288 if (!vMaxEventsOut.empty()) { 00289 std::string moduleLabel = (*it)->description().moduleLabel_; 00290 if (!vMaxEventsOut.empty()) { 00291 try { 00292 desc.maxEvents_ = vMaxEventsOut.getUntrackedParameter<int>(moduleLabel); 00293 } catch (edm::Exception) { 00294 throw edm::Exception(edm::errors::Configuration) << 00295 "\nNo entry in 'maxEvents' for output module label '" << moduleLabel << "'.\n"; 00296 } 00297 } 00298 } 00299 (*it)->configure(desc); 00300 } 00301 }
void edm::Schedule::openNewOutputFilesIfNeeded | ( | ) |
Definition at line 751 of file Schedule.cc.
References all_output_workers_, edm::for_all(), and edm::OutputWorker::openNewFileIfNeeded().
00751 { 00752 for_all(all_output_workers_, boost::bind(&OutputWorker::openNewFileIfNeeded, _1)); 00753 }
Definition at line 755 of file Schedule.cc.
References all_output_workers_, edm::for_all(), and edm::OutputWorker::openFile().
00755 { 00756 for_all(all_output_workers_, boost::bind(&OutputWorker::openFile, _1, boost::cref(fb))); 00757 }
void edm::Schedule::processOneOccurrence | ( | typename T::MyPrincipal & | principal, | |
EventSetup const & | eventSetup | |||
) | [inline] |
Definition at line 355 of file Schedule.h.
References act_table_, cmsRelvalreport::action, actReg_, cms::Exception::category(), e, endpathsAreActive_, edm::errors::EventProcessorFailure, 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_, and cms::Exception::what().
00355 { 00356 this->resetAll(); 00357 state_ = Running; 00358 00359 // A RunStopwatch, but only if we are processing an event. 00360 std::auto_ptr<RunStopwatch> stopwatch(T::isEvent_ ? new RunStopwatch(stopwatch_) : 0); 00361 00362 if (T::isEvent_) { 00363 ++total_events_; 00364 setupOnDemandSystem(dynamic_cast<EventPrincipal &>(ep), es); 00365 } 00366 try { 00367 //If the ScheduleSignalSentry object is used, it must live for the entire time the event is 00368 // being processed 00369 std::auto_ptr<ScheduleSignalSentry<T> > sentry; 00370 try { 00371 sentry = std::auto_ptr<ScheduleSignalSentry<T> >(new ScheduleSignalSentry<T>(actReg_.get(), &ep, &es)); 00372 if (runTriggerPaths<T>(ep, es)) { 00373 if (T::isEvent_) ++total_passed_; 00374 } 00375 state_ = Latched; 00376 00377 if (results_inserter_.get()) results_inserter_->doWork<T>(ep, es, 0); 00378 } 00379 catch(cms::Exception& e) { 00380 actions::ActionCodes action = (T::isEvent_ ? act_table_->find(e.rootCause()) : actions::Rethrow); 00381 assert (action != actions::IgnoreCompletely); 00382 assert (action != actions::FailPath); 00383 assert (action != actions::FailModule); 00384 if (action == actions::SkipEvent) { 00385 LogWarning(e.category()) 00386 << "an exception occurred and all paths for the event are being skipped: \n" 00387 << e.what(); 00388 } else { 00389 throw; 00390 } 00391 } 00392 00393 if (endpathsAreActive_) runEndPaths<T>(ep, es); 00394 } 00395 catch(cms::Exception& ex) { 00396 actions::ActionCodes action = (T::isEvent_ ? act_table_->find(ex.rootCause()) : actions::Rethrow); 00397 assert (action != actions::SkipEvent); 00398 assert (action != actions::FailPath); 00399 assert (action != actions::FailModule); 00400 switch(action) { 00401 case actions::IgnoreCompletely: { 00402 LogWarning(ex.category()) 00403 << "exception being ignored for current event:\n" 00404 << ex.what(); 00405 break; 00406 } 00407 default: { 00408 state_ = Ready; 00409 throw edm::Exception(errors::EventProcessorFailure, 00410 "EventProcessingStopped",ex) 00411 << "an exception occurred during current event processing\n"; 00412 } 00413 } 00414 } 00415 catch(...) { 00416 LogError("PassingThrough") 00417 << "an exception occurred during current event processing\n"; 00418 state_ = Ready; 00419 throw; 00420 } 00421 00422 // next thing probably is not needed, the product insertion code clears it 00423 state_ = Ready; 00424 00425 }
void edm::Schedule::reportSkipped | ( | RunPrincipal const & | ) | const [inline, private] |
void edm::Schedule::reportSkipped | ( | LuminosityBlockPrincipal const & | ) | const [inline, private] |
void edm::Schedule::reportSkipped | ( | EventPrincipal const & | ep | ) | const [inline, private] |
Definition at line 348 of file Schedule.h.
References edm::EventID::event(), edm::EventPrincipal::id(), and edm::EventID::run().
00348 { 00349 Service<JobReport> reportSvc; 00350 reportSvc->reportSkippedEvent(ep.id().run(), ep.id().event()); 00351 }
void edm::Schedule::resetAll | ( | ) | [private] |
Definition at line 889 of file Schedule.cc.
References all_workers_, endpath_results_, edm::for_all(), edm::Worker::reset(), and results_.
Referenced by processOneOccurrence().
00889 { 00890 for_all(all_workers_, boost::bind(&Worker::reset, _1)); 00891 results_->reset(); 00892 endpath_results_->reset(); 00893 }
Definition at line 778 of file Schedule.cc.
References all_workers_, edm::for_all(), and edm::Worker::respondToCloseInputFile().
00778 { 00779 for_all(all_workers_, boost::bind(&Worker::respondToCloseInputFile, _1, boost::cref(fb))); 00780 }
Definition at line 786 of file Schedule.cc.
References all_workers_, edm::for_all(), and edm::Worker::respondToCloseOutputFiles().
00786 { 00787 for_all(all_workers_, boost::bind(&Worker::respondToCloseOutputFiles, _1, boost::cref(fb))); 00788 }
Definition at line 774 of file Schedule.cc.
References all_workers_, edm::for_all(), and edm::Worker::respondToOpenInputFile().
00774 { 00775 for_all(all_workers_, boost::bind(&Worker::respondToOpenInputFile, _1, boost::cref(fb))); 00776 }
Definition at line 782 of file Schedule.cc.
References all_workers_, edm::for_all(), and edm::Worker::respondToOpenOutputFiles().
00782 { 00783 for_all(all_workers_, boost::bind(&Worker::respondToOpenOutputFiles, _1, boost::cref(fb))); 00784 }
void edm::Schedule::runEndPaths | ( | typename T::MyPrincipal & | ep, | |
EventSetup const & | es | |||
) | [inline, private] |
Definition at line 436 of file Schedule.h.
References end_paths_, and edm::for_all().
00436 { 00437 // Note there is no state-checking safety controlling the 00438 // activation/deactivation of endpaths. 00439 for_all(end_paths_, ProcessOneOccurrence<T>(ep, es)); 00440 00441 // We could get rid of the functor ProcessOneOccurrence if we used 00442 // boost::lambda, but the use of lambda with member functions 00443 // which take multiple arguments, by both non-const and const 00444 // reference, seems much more obscure... 00445 // 00446 // using namespace boost::lambda; 00447 // for_all(end_paths_, 00448 // bind(&Path::processOneOccurrence, 00449 // boost::lambda::_1, // qualification to avoid ambiguity 00450 // var(ep), // pass by reference (not copy) 00451 // constant_ref(es))); // pass by const-reference (not copy) 00452 }
bool edm::Schedule::runTriggerPaths | ( | typename T::MyPrincipal & | ep, | |
EventSetup const & | es | |||
) | [inline, private] |
Definition at line 429 of file Schedule.h.
References edm::for_all(), results_, and trig_paths_.
00429 { 00430 for_all(trig_paths_, ProcessOneOccurrence<T>(ep, es)); 00431 return results_->accept(); 00432 }
void edm::Schedule::setupOnDemandSystem | ( | EventPrincipal & | principal, | |
EventSetup const & | es | |||
) | [private] |
Definition at line 901 of file Schedule.cc.
References edm::EventPrincipal::addOnDemandGroup(), demandBranches_, edm::EventPrincipal::setUnscheduledHandler(), and unscheduled_.
Referenced by processOneOccurrence().
00902 { 00903 // NOTE: who owns the productdescrption? Just copied by value 00904 unscheduled_->setEventSetup(es); 00905 ep.setUnscheduledHandler(unscheduled_); 00906 typedef std::vector<boost::shared_ptr<ConstBranchDescription const> > branches; 00907 for(branches::iterator itBranch = demandBranches_.begin(), itBranchEnd = demandBranches_.end(); 00908 itBranch != itBranchEnd; 00909 ++itBranch) { 00910 ep.addOnDemandGroup(**itBranch); 00911 } 00912 }
bool edm::Schedule::shouldWeCloseOutput | ( | ) | const |
Definition at line 767 of file Schedule.cc.
References all_output_workers_, and edm::OutputWorker::shouldWeCloseFile().
00767 { 00768 // Return true iff at least one output module returns true. 00769 return (std::find_if(all_output_workers_.begin(), all_output_workers_.end(), 00770 boost::bind(&OutputWorker::shouldWeCloseFile, _1)) 00771 != all_output_workers_.end()); 00772 }
Return whether a module has reached its maximum count.
Definition at line 303 of file Schedule.cc.
References all_output_workers_, and it.
00303 { 00304 if (all_output_workers_.empty()) { 00305 return false; 00306 } 00307 for (AllOutputWorkers::const_iterator it = all_output_workers_.begin(), 00308 itEnd = all_output_workers_.end(); 00309 it != itEnd; ++it) { 00310 if (!(*it)->limitReached()) { 00311 // Found an output module that has not reached output event count. 00312 return false; 00313 } 00314 } 00315 LogInfo("SuccessfulTermination") 00316 << "The job is terminating successfully because each output module\n" 00317 << "has reached its configured limit.\n"; 00318 return true; 00319 }
std::pair<double,double> edm::Schedule::timeCpuReal | ( | ) | const [inline] |
Definition at line 167 of file Schedule.h.
References stopwatch_.
Referenced by endJob().
00167 { 00168 return std::pair<double,double>(stopwatch_->cpuTime(),stopwatch_->realTime()); 00169 }
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 182 of file Schedule.h.
References total_events_.
Referenced by endJob(), getTriggerReport(), and totalEventsFailed().
00182 { 00183 return total_events_; 00184 }
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 194 of file Schedule.h.
References totalEvents(), and totalEventsPassed().
Referenced by endJob(), and getTriggerReport().
00194 { 00195 return totalEvents() - totalEventsPassed(); 00196 }
int edm::Schedule::totalEventsPassed | ( | ) | const [inline] |
Return the number of events which have been passed by one or more trigger paths.
Definition at line 188 of file Schedule.h.
References total_passed_.
Referenced by endJob(), getTriggerReport(), and totalEventsFailed().
00188 { 00189 return total_passed_; 00190 }
AllWorkers::iterator edm::Schedule::workersBegin | ( | ) | [inline, private] |
Definition at line 223 of file Schedule.h.
References all_workers_.
00224 { 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().
00218 { return all_workers_.begin(); }
AllWorkers::iterator edm::Schedule::workersEnd | ( | ) | [inline, private] |
Definition at line 226 of file Schedule.h.
References all_workers_.
00227 { return all_workers_.end(); }
AllWorkers::const_iterator edm::Schedule::workersEnd | ( | ) | const [inline, private] |
Definition at line 220 of file Schedule.h.
References all_workers_.
Referenced by endJob(), getAllModuleDescriptions(), and Schedule().
00221 { return all_workers_.end(); }
void edm::Schedule::writeLumi | ( | LuminosityBlockPrincipal const & | lbp | ) |
Definition at line 763 of file Schedule.cc.
References all_output_workers_, edm::for_all(), and edm::OutputWorker::writeLumi().
00763 { 00764 for_all(all_output_workers_, boost::bind(&OutputWorker::writeLumi, _1, boost::cref(lbp))); 00765 }
void edm::Schedule::writeRun | ( | RunPrincipal const & | rp | ) |
Definition at line 759 of file Schedule.cc.
References all_output_workers_, edm::for_all(), and edm::OutputWorker::writeRun().
00759 { 00760 for_all(all_output_workers_, boost::bind(&OutputWorker::writeRun, _1, boost::cref(rp))); 00761 }
ActionTable* edm::Schedule::act_table_ [private] |
Definition at line 254 of file Schedule.h.
Referenced by fillEndPath(), fillTrigPath(), fillWorkers(), processOneOccurrence(), and Schedule().
boost::shared_ptr<ActivityRegistry> edm::Schedule::actReg_ [private] |
Definition at line 256 of file Schedule.h.
Referenced by fillEndPath(), fillTrigPath(), processOneOccurrence(), and Schedule().
Definition at line 267 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 266 of file Schedule.h.
Referenced by addToAllWorkers(), beginJob(), clearCounters(), getAllModuleDescriptions(), getTriggerReport(), resetAll(), respondToCloseInputFile(), respondToCloseOutputFiles(), respondToOpenInputFile(), respondToOpenOutputFiles(), Schedule(), workersBegin(), and workersEnd().
std::vector<boost::shared_ptr<ConstBranchDescription const> > edm::Schedule::demandBranches_ [private] |
vstring edm::Schedule::end_path_name_list_ [private] |
TrigPaths edm::Schedule::end_paths_ [private] |
Definition at line 269 of file Schedule.h.
Referenced by clearCounters(), endJob(), fillEndPath(), getTriggerReport(), and runEndPaths().
TrigResPtr edm::Schedule::endpath_results_ [private] |
volatile bool edm::Schedule::endpathsAreActive_ [private] |
Definition at line 279 of file Schedule.h.
Referenced by enableEndPaths(), endPathsEnabled(), and processOneOccurrence().
std::string edm::Schedule::processName_ [private] |
ProductRegistry* edm::Schedule::prod_reg_ [private] |
ParameterSet edm::Schedule::pset_ [private] |
Definition at line 251 of file Schedule.h.
Referenced by fillEndPath(), fillTrigPath(), fillWorkers(), limitOutput(), and Schedule().
TrigResPtr edm::Schedule::results_ [private] |
Definition at line 262 of file Schedule.h.
Referenced by resetAll(), runTriggerPaths(), and Schedule().
WorkerPtr edm::Schedule::results_inserter_ [private] |
State edm::Schedule::state_ [private] |
int edm::Schedule::total_events_ [private] |
Definition at line 272 of file Schedule.h.
Referenced by clearCounters(), processOneOccurrence(), and totalEvents().
int edm::Schedule::total_passed_ [private] |
Definition at line 273 of file Schedule.h.
Referenced by clearCounters(), processOneOccurrence(), and totalEventsPassed().
vstring edm::Schedule::trig_name_list_ [private] |
TrigPaths edm::Schedule::trig_paths_ [private] |
Definition at line 268 of file Schedule.h.
Referenced by clearCounters(), endJob(), fillTrigPath(), getTriggerReport(), and runTriggerPaths().
boost::shared_ptr<UnscheduledCallProducer> edm::Schedule::unscheduled_ [private] |
bool edm::Schedule::wantSummary_ [private] |
WorkerRegistry* edm::Schedule::worker_reg_ [private] |