CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Schedule.cc
Go to the documentation of this file.
2 
24 
25 #include "boost/bind.hpp"
26 #include "boost/ref.hpp"
27 
28 #include <algorithm>
29 #include <cassert>
30 #include <cstdlib>
31 #include <functional>
32 #include <iomanip>
33 #include <list>
34 #include <map>
35 #include <exception>
36 
37 namespace edm {
38  namespace {
39  bool binary_search_string(std::vector<std::string> const& v, std::string const& s) {
40  return std::binary_search(v.begin(), v.end(), s);
41  }
42 
43  // Here we make the trigger results inserter directly. This should
44  // probably be a utility in the WorkerRegistry or elsewhere.
45 
46  std::shared_ptr<TriggerResultInserter>
47  makeInserter(ParameterSet& proc_pset,
48  PreallocationConfiguration const& iPrealloc,
49  ProductRegistry& preg,
50  ExceptionToActionTable const& actions,
51  boost::shared_ptr<ActivityRegistry> areg,
52  boost::shared_ptr<ProcessConfiguration> processConfiguration) {
53 
54  ParameterSet* trig_pset = proc_pset.getPSetForUpdate("@trigger_paths");
55  trig_pset->registerIt();
56 
57  WorkerParams work_args(trig_pset, preg, &iPrealloc, processConfiguration, actions);
58  ModuleDescription md(trig_pset->id(),
59  "TriggerResultInserter",
60  "TriggerResults",
61  processConfiguration.get(),
63 
64  areg->preModuleConstructionSignal_(md);
65  bool postCalled = false;
66  std::shared_ptr<TriggerResultInserter> returnValue;
67  try {
68  maker::ModuleHolderT<TriggerResultInserter> holder(new TriggerResultInserter(*trig_pset, iPrealloc.numberOfStreams()),static_cast<Maker const*>(nullptr));
69  holder.setModuleDescription(md);
70  holder.registerProductsAndCallbacks(&preg);
71  returnValue.reset(holder.release());
72  postCalled = true;
73  // if exception then post will be called in the catch block
74  areg->postModuleConstructionSignal_(md);
75  }
76  catch (...) {
77  if(!postCalled) {
78  try {
79  areg->postModuleConstructionSignal_(md);
80  }
81  catch (...) {
82  // If post throws an exception ignore it because we are already handling another exception
83  }
84  }
85  throw;
86  }
87  return returnValue;
88  }
89 
90 
91  void
92  checkAndInsertAlias(std::string const& friendlyClassName,
93  std::string const& moduleLabel,
94  std::string const& productInstanceName,
95  std::string const& processName,
96  std::string const& alias,
97  std::string const& instanceAlias,
98  ProductRegistry const& preg,
99  std::multimap<BranchKey, BranchKey>& aliasMap,
100  std::map<BranchKey, BranchKey>& aliasKeys) {
101  std::string const star("*");
102 
103  BranchKey key(friendlyClassName, moduleLabel, productInstanceName, processName);
104  if(preg.productList().find(key) == preg.productList().end()) {
105  // No product was found matching the alias.
106  // We throw an exception only if a module with the specified module label was created in this process.
107  for(auto const& product : preg.productList()) {
108  if(moduleLabel == product.first.moduleLabel() && processName == product.first.processName()) {
109  throw Exception(errors::Configuration, "EDAlias does not match data\n")
110  << "There are no products of type '" << friendlyClassName << "'\n"
111  << "with module label '" << moduleLabel << "' and instance name '" << productInstanceName << "'.\n";
112  }
113  }
114  }
115 
116  std::string const& theInstanceAlias(instanceAlias == star ? productInstanceName : instanceAlias);
117  BranchKey aliasKey(friendlyClassName, alias, theInstanceAlias, processName);
118  if(preg.productList().find(aliasKey) != preg.productList().end()) {
119  throw Exception(errors::Configuration, "EDAlias conflicts with data\n")
120  << "A product of type '" << friendlyClassName << "'\n"
121  << "with module label '" << alias << "' and instance name '" << theInstanceAlias << "'\n"
122  << "already exists.\n";
123  }
124  auto iter = aliasKeys.find(aliasKey);
125  if(iter != aliasKeys.end()) {
126  // The alias matches a previous one. If the same alias is used for different product, throw.
127  if(iter->second != key) {
128  throw Exception(errors::Configuration, "EDAlias conflict\n")
129  << "The module label alias '" << alias << "' and product instance alias '" << theInstanceAlias << "'\n"
130  << "are used for multiple products of type '" << friendlyClassName << "'\n"
131  << "One has module label '" << moduleLabel << "' and product instance name '" << productInstanceName << "',\n"
132  << "the other has module label '" << iter->second.moduleLabel() << "' and product instance name '" << iter->second.productInstanceName() << "'.\n";
133  }
134  } else {
135  auto prodIter = preg.productList().find(key);
136  if(prodIter != preg.productList().end()) {
137  if (!prodIter->second.produced()) {
138  throw Exception(errors::Configuration, "EDAlias\n")
139  << "The module label alias '" << alias << "' and product instance alias '" << theInstanceAlias << "'\n"
140  << "are used for a product of type '" << friendlyClassName << "'\n"
141  << "with module label '" << moduleLabel << "' and product instance name '" << productInstanceName << "',\n"
142  << "An EDAlias can only be used for products produced in the current process. This one is not.\n";
143  }
144  aliasMap.insert(std::make_pair(key, aliasKey));
145  aliasKeys.insert(std::make_pair(aliasKey, key));
146  }
147  }
148  }
149 
150  void
151  processEDAliases(ParameterSet const& proc_pset, std::string const& processName, ProductRegistry& preg) {
152  std::vector<std::string> aliases = proc_pset.getParameter<std::vector<std::string> >("@all_aliases");
153  if(aliases.empty()) {
154  return;
155  }
156  std::string const star("*");
157  std::string const empty("");
159  desc.add<std::string>("type");
160  desc.add<std::string>("fromProductInstance", star);
161  desc.add<std::string>("toProductInstance", star);
162 
163  std::multimap<BranchKey, BranchKey> aliasMap;
164 
165  std::map<BranchKey, BranchKey> aliasKeys; // Used to search for duplicates or clashes.
166 
167  // Now, loop over the alias information and store it in aliasMap.
168  for(std::string const& alias : aliases) {
169  ParameterSet const& aliasPSet = proc_pset.getParameterSet(alias);
170  std::vector<std::string> vPSetNames = aliasPSet.getParameterNamesForType<VParameterSet>();
171  for(std::string const& moduleLabel : vPSetNames) {
172  VParameterSet vPSet = aliasPSet.getParameter<VParameterSet>(moduleLabel);
173  for(ParameterSet& pset : vPSet) {
174  desc.validate(pset);
175  std::string friendlyClassName = pset.getParameter<std::string>("type");
176  std::string productInstanceName = pset.getParameter<std::string>("fromProductInstance");
177  std::string instanceAlias = pset.getParameter<std::string>("toProductInstance");
178  if(productInstanceName == star) {
179  bool match = false;
180  BranchKey lowerBound(friendlyClassName, moduleLabel, empty, empty);
181  for(ProductRegistry::ProductList::const_iterator it = preg.productList().lower_bound(lowerBound);
182  it != preg.productList().end() && it->first.friendlyClassName() == friendlyClassName && it->first.moduleLabel() == moduleLabel;
183  ++it) {
184  if(it->first.processName() != processName) {
185  continue;
186  }
187  match = true;
188 
189  checkAndInsertAlias(friendlyClassName, moduleLabel, it->first.productInstanceName(), processName, alias, instanceAlias, preg, aliasMap, aliasKeys);
190  }
191  if(!match) {
192  // No product was found matching the alias.
193  // We throw an exception only if a module with the specified module label was created in this process.
194  for(auto const& product : preg.productList()) {
195  if(moduleLabel == product.first.moduleLabel() && processName == product.first.processName()) {
196  throw Exception(errors::Configuration, "EDAlias parameter set mismatch\n")
197  << "There are no products of type '" << friendlyClassName << "'\n"
198  << "with module label '" << moduleLabel << "'.\n";
199  }
200  }
201  }
202  } else {
203  checkAndInsertAlias(friendlyClassName, moduleLabel, productInstanceName, processName, alias, instanceAlias, preg, aliasMap, aliasKeys);
204  }
205  }
206  }
207  }
208 
209 
210  // Now add the new alias entries to the product registry.
211  for(auto const& aliasEntry : aliasMap) {
212  ProductRegistry::ProductList::const_iterator it = preg.productList().find(aliasEntry.first);
213  assert(it != preg.productList().end());
214  preg.addLabelAlias(it->second, aliasEntry.second.moduleLabel(), aliasEntry.second.productInstanceName());
215  }
216 
217  }
218 
219  typedef std::vector<std::string> vstring;
220 
221  void reduceParameterSet(ParameterSet& proc_pset,
222  vstring const& end_path_name_list,
223  vstring& modulesInConfig,
224  std::set<std::string> const& usedModuleLabels,
225  std::map<std::string, std::vector<std::pair<std::string, int> > >& outputModulePathPositions) {
226  // Before calculating the ParameterSetID of the top level ParameterSet or
227  // saving it in the registry drop from the top level ParameterSet all
228  // OutputModules and EDAnalyzers not on trigger paths. If unscheduled
229  // production is not enabled also drop all the EDFilters and EDProducers
230  // that are not scheduled. Drop the ParameterSet used to configure the module
231  // itself. Also drop the other traces of these labels in the top level
232  // ParameterSet: Remove that labels from @all_modules and from all the
233  // end paths. If this makes any end paths empty, then remove the end path
234  // name from @end_paths, and @paths.
235 
236  // First make a list of labels to drop
237  vstring outputModuleLabels;
238  std::string edmType;
239  std::string const moduleEdmType("@module_edm_type");
240  std::string const outputModule("OutputModule");
241  std::string const edAnalyzer("EDAnalyzer");
242  std::string const edFilter("EDFilter");
243  std::string const edProducer("EDProducer");
244 
245  std::set<std::string> modulesInConfigSet(modulesInConfig.begin(), modulesInConfig.end());
246 
247  //need a list of all modules on paths in order to determine
248  // if an EDAnalyzer only appears on an end path
249  vstring scheduledPaths = proc_pset.getParameter<vstring>("@paths");
250  std::set<std::string> modulesOnPaths;
251  {
252  std::set<std::string> noEndPaths(scheduledPaths.begin(),scheduledPaths.end());
253  for(auto const& endPath: end_path_name_list) {
254  noEndPaths.erase(endPath);
255  }
256  {
257  vstring labels;
258  for(auto const& path: noEndPaths) {
259  labels = proc_pset.getParameter<vstring>(path);
260  modulesOnPaths.insert(labels.begin(),labels.end());
261  }
262  }
263  }
264  //Initially fill labelsToBeDropped with all module mentioned in
265  // the configuration but which are not being used by the system
266  std::vector<std::string> labelsToBeDropped;
267  labelsToBeDropped.reserve(modulesInConfigSet.size());
268  std::set_difference(modulesInConfigSet.begin(),modulesInConfigSet.end(),
269  usedModuleLabels.begin(),usedModuleLabels.end(),
270  std::back_inserter(labelsToBeDropped));
271 
272  const unsigned int sizeBeforeOutputModules = labelsToBeDropped.size();
273  for (auto const& modLabel: usedModuleLabels) {
274  edmType = proc_pset.getParameterSet(modLabel).getParameter<std::string>(moduleEdmType);
275  if (edmType == outputModule) {
276  outputModuleLabels.push_back(modLabel);
277  labelsToBeDropped.push_back(modLabel);
278  }
279  if(edmType == edAnalyzer) {
280  if(modulesOnPaths.end()==modulesOnPaths.find(modLabel)) {
281  labelsToBeDropped.push_back(modLabel);
282  }
283  }
284  }
285  //labelsToBeDropped must be sorted
286  std::inplace_merge(labelsToBeDropped.begin(),
287  labelsToBeDropped.begin()+sizeBeforeOutputModules,
288  labelsToBeDropped.end());
289 
290  // drop the parameter sets used to configure the modules
291  for_all(labelsToBeDropped, boost::bind(&ParameterSet::eraseOrSetUntrackedParameterSet, boost::ref(proc_pset), _1));
292 
293  // drop the labels from @all_modules
294  vstring::iterator endAfterRemove = std::remove_if(modulesInConfig.begin(), modulesInConfig.end(), boost::bind(binary_search_string, boost::ref(labelsToBeDropped), _1));
295  modulesInConfig.erase(endAfterRemove, modulesInConfig.end());
296  proc_pset.addParameter<vstring>(std::string("@all_modules"), modulesInConfig);
297 
298  // drop the labels from all end paths
299  vstring endPathsToBeDropped;
300  vstring labels;
301  for (vstring::const_iterator iEndPath = end_path_name_list.begin(), endEndPath = end_path_name_list.end();
302  iEndPath != endEndPath;
303  ++iEndPath) {
304  labels = proc_pset.getParameter<vstring>(*iEndPath);
305  vstring::iterator iSave = labels.begin();
306  vstring::iterator iBegin = labels.begin();
307 
308  for (vstring::iterator iLabel = labels.begin(), iEnd = labels.end();
309  iLabel != iEnd; ++iLabel) {
310  if (binary_search_string(labelsToBeDropped, *iLabel)) {
311  if (binary_search_string(outputModuleLabels, *iLabel)) {
312  outputModulePathPositions[*iLabel].emplace_back(*iEndPath, iSave - iBegin);
313  }
314  } else {
315  if (iSave != iLabel) {
316  iSave->swap(*iLabel);
317  }
318  ++iSave;
319  }
320  }
321  labels.erase(iSave, labels.end());
322  if (labels.empty()) {
323  // remove empty end paths and save their names
324  proc_pset.eraseSimpleParameter(*iEndPath);
325  endPathsToBeDropped.push_back(*iEndPath);
326  } else {
327  proc_pset.addParameter<vstring>(*iEndPath, labels);
328  }
329  }
330  sort_all(endPathsToBeDropped);
331 
332  // remove empty end paths from @paths
333  endAfterRemove = std::remove_if(scheduledPaths.begin(), scheduledPaths.end(), boost::bind(binary_search_string, boost::ref(endPathsToBeDropped), _1));
334  scheduledPaths.erase(endAfterRemove, scheduledPaths.end());
335  proc_pset.addParameter<vstring>(std::string("@paths"), scheduledPaths);
336 
337  // remove empty end paths from @end_paths
338  vstring scheduledEndPaths = proc_pset.getParameter<vstring>("@end_paths");
339  endAfterRemove = std::remove_if(scheduledEndPaths.begin(), scheduledEndPaths.end(), boost::bind(binary_search_string, boost::ref(endPathsToBeDropped), _1));
340  scheduledEndPaths.erase(endAfterRemove, scheduledEndPaths.end());
341  proc_pset.addParameter<vstring>(std::string("@end_paths"), scheduledEndPaths);
342 
343  }
344  }
345  // -----------------------------
346 
347  typedef std::vector<std::string> vstring;
348 
349  // -----------------------------
350 
353  ProductRegistry& preg,
354  BranchIDListHelper& branchIDListHelper,
355  ExceptionToActionTable const& actions,
356  boost::shared_ptr<ActivityRegistry> areg,
357  boost::shared_ptr<ProcessConfiguration> processConfiguration,
358  const ParameterSet* subProcPSet,
360  ProcessContext const* processContext) :
361  //Only create a resultsInserter if there is a trigger path
362  resultsInserter_{tns.getTrigPaths().empty()? std::shared_ptr<TriggerResultInserter>{} :makeInserter(proc_pset,prealloc,preg,actions,areg,processConfiguration)},
363  moduleRegistry_(new ModuleRegistry()),
366  wantSummary_(tns.wantSummary()),
368  {
369  assert(0<prealloc.numberOfStreams());
370  streamSchedules_.reserve(prealloc.numberOfStreams());
371  for(unsigned int i=0; i<prealloc.numberOfStreams();++i) {
372  streamSchedules_.emplace_back(std::shared_ptr<StreamSchedule>{new StreamSchedule{resultsInserter_.get(),moduleRegistry_,proc_pset,tns,prealloc, preg,branchIDListHelper,actions,areg,processConfiguration,nullptr==subProcPSet,StreamID{i},processContext}});
373  }
374 
375  //TriggerResults are injected automatically by StreamSchedules and are
376  // unknown to the ModuleRegistry
377  const std::string kTriggerResults("TriggerResults");
378  std::vector<std::string> modulesToUse;
379  modulesToUse.reserve(streamSchedules_[0]->allWorkers().size());
380  for(auto const& worker : streamSchedules_[0]->allWorkers()) {
381  if(worker->description().moduleLabel() != kTriggerResults) {
382  modulesToUse.push_back(worker->description().moduleLabel());
383  }
384  }
385  //The unscheduled modules are at the end of the list, but we want them at the front
386  unsigned int n = streamSchedules_[0]->numberOfUnscheduledModules();
387  if(n>0) {
388  std::vector<std::string> temp;
389  temp.reserve(modulesToUse.size());
390  auto itBeginUnscheduled = modulesToUse.begin()+modulesToUse.size()-n;
391  std::copy(itBeginUnscheduled,modulesToUse.end(),
392  std::back_inserter(temp));
393  std::copy(modulesToUse.begin(),itBeginUnscheduled,std::back_inserter(temp));
394  temp.swap(modulesToUse);
395  }
396  globalSchedule_.reset( new GlobalSchedule{ resultsInserter_.get(),
398  modulesToUse,
399  proc_pset, preg, prealloc,
400  actions,areg,processConfiguration,processContext });
401 
402  //TriggerResults is not in the top level ParameterSet so the call to
403  // reduceParameterSet would fail to find it. Just remove it up front.
404  std::set<std::string> usedModuleLabels;
405  for( auto const worker: allWorkers()) {
406  if(worker->description().moduleLabel() != kTriggerResults) {
407  usedModuleLabels.insert(worker->description().moduleLabel());
408  }
409  }
410  std::vector<std::string> modulesInConfig(proc_pset.getParameter<std::vector<std::string> >("@all_modules"));
411  std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions;
412  reduceParameterSet(proc_pset, tns.getEndPaths(), modulesInConfig, usedModuleLabels,
413  outputModulePathPositions);
414  processEDAliases(proc_pset, processConfiguration->processName(), preg);
415  proc_pset.registerIt();
416  pset::setProcessParameterSetID(proc_pset.id());
417  processConfiguration->setParameterSetID(proc_pset.id());
418  processConfiguration->setProcessConfigurationID();
419 
420  // This is used for a little sanity-check to make sure no code
421  // modifications alter the number of workers at a later date.
422  size_t all_workers_count = allWorkers().size();
423 
424  moduleRegistry_->forAllModuleHolders([this](maker::ModuleHolder* iHolder){
425  auto comm = iHolder->createOutputModuleCommunicator();
426  if (comm) {
427  all_output_communicators_.emplace_back(boost::shared_ptr<OutputModuleCommunicator>{comm.release()});
428  }
429  });
430  // Now that the output workers are filled in, set any output limits or information.
431  limitOutput(proc_pset, branchIDListHelper.branchIDLists());
432 
434 
435  // Sanity check: make sure nobody has added a worker after we've
436  // already relied on the WorkerManager being full.
437  assert (all_workers_count == allWorkers().size());
438 
439  branchIDListHelper.updateFromRegistry(preg);
440 
441  preg.setFrozen();
442 
443  for (auto c : all_output_communicators_) {
444  c->setEventSelectionInfo(outputModulePathPositions, preg.anyProductProduced());
445  c->selectProducts(preg);
446  }
447 
448  } // Schedule::Schedule
449 
450 
451  void
452  Schedule::limitOutput(ParameterSet const& proc_pset, BranchIDLists const& branchIDLists) {
453  std::string const output("output");
454 
455  ParameterSet const& maxEventsPSet = proc_pset.getUntrackedParameterSet("maxEvents", ParameterSet());
456  int maxEventSpecs = 0;
457  int maxEventsOut = -1;
458  ParameterSet const* vMaxEventsOut = 0;
459  std::vector<std::string> intNamesE = maxEventsPSet.getParameterNamesForType<int>(false);
460  if (search_all(intNamesE, output)) {
461  maxEventsOut = maxEventsPSet.getUntrackedParameter<int>(output);
462  ++maxEventSpecs;
463  }
464  std::vector<std::string> psetNamesE;
465  maxEventsPSet.getParameterSetNames(psetNamesE, false);
466  if (search_all(psetNamesE, output)) {
467  vMaxEventsOut = &maxEventsPSet.getUntrackedParameterSet(output);
468  ++maxEventSpecs;
469  }
470 
471  if (maxEventSpecs > 1) {
473  "\nAt most, one form of 'output' may appear in the 'maxEvents' parameter set";
474  }
475 
476  for (auto c : all_output_communicators_) {
477  OutputModuleDescription desc(branchIDLists, maxEventsOut);
478  if (vMaxEventsOut != 0 && !vMaxEventsOut->empty()) {
479  std::string const& moduleLabel = c->description().moduleLabel();
480  try {
481  desc.maxEvents_ = vMaxEventsOut->getUntrackedParameter<int>(moduleLabel);
482  } catch (Exception const&) {
484  "\nNo entry in 'maxEvents' for output module label '" << moduleLabel << "'.\n";
485  }
486  }
487  c->configure(desc);
488  }
489  }
490 
491  bool Schedule::terminate() const {
492  if (all_output_communicators_.empty()) {
493  return false;
494  }
495  for (auto c : all_output_communicators_) {
496  if (!c->limitReached()) {
497  // Found an output module that has not reached output event count.
498  return false;
499  }
500  }
501  LogInfo("SuccessfulTermination")
502  << "The job is terminating successfully because each output module\n"
503  << "has reached its configured limit.\n";
504  return true;
505  }
506 
508  globalSchedule_->endJob(collector);
509  if (collector.hasThrown()) {
510  return;
511  }
512 
513  if (wantSummary_ == false) return;
514  {
515  TriggerReport tr;
516  getTriggerReport(tr);
517 
518  // The trigger report (pass/fail etc.):
519 
520  LogVerbatim("FwkSummary") << "";
521  LogVerbatim("FwkSummary") << "TrigReport " << "---------- Event Summary ------------";
522  if(!tr.trigPathSummaries.empty()) {
523  LogVerbatim("FwkSummary") << "TrigReport"
524  << " Events total = " << tr.eventSummary.totalEvents
525  << " passed = " << tr.eventSummary.totalEventsPassed
526  << " failed = " << tr.eventSummary.totalEventsFailed
527  << "";
528  } else {
529  LogVerbatim("FwkSummary") << "TrigReport"
530  << " Events total = " << tr.eventSummary.totalEvents
531  << " passed = " << tr.eventSummary.totalEvents
532  << " failed = 0";
533  }
534 
535  LogVerbatim("FwkSummary") << "";
536  LogVerbatim("FwkSummary") << "TrigReport " << "---------- Path Summary ------------";
537  LogVerbatim("FwkSummary") << "TrigReport "
538  << std::right << std::setw(10) << "Trig Bit#" << " "
539  << std::right << std::setw(10) << "Run" << " "
540  << std::right << std::setw(10) << "Passed" << " "
541  << std::right << std::setw(10) << "Failed" << " "
542  << std::right << std::setw(10) << "Error" << " "
543  << "Name" << "";
544  for (auto const& p: tr.trigPathSummaries) {
545  LogVerbatim("FwkSummary") << "TrigReport "
546  << std::right << std::setw(5) << 1
547  << std::right << std::setw(5) << p.bitPosition << " "
548  << std::right << std::setw(10) << p.timesRun << " "
549  << std::right << std::setw(10) << p.timesPassed << " "
550  << std::right << std::setw(10) << p.timesFailed << " "
551  << std::right << std::setw(10) << p.timesExcept << " "
552  << p.name << "";
553  }
554 
555  /*
556  std::vector<int>::const_iterator epi = empty_trig_paths_.begin();
557  std::vector<int>::const_iterator epe = empty_trig_paths_.end();
558  std::vector<std::string>::const_iterator epn = empty_trig_path_names_.begin();
559  for (; epi != epe; ++epi, ++epn) {
560 
561  LogVerbatim("FwkSummary") << "TrigReport "
562  << std::right << std::setw(5) << 1
563  << std::right << std::setw(5) << *epi << " "
564  << std::right << std::setw(10) << totalEvents() << " "
565  << std::right << std::setw(10) << totalEvents() << " "
566  << std::right << std::setw(10) << 0 << " "
567  << std::right << std::setw(10) << 0 << " "
568  << *epn << "";
569  }
570  */
571 
572  LogVerbatim("FwkSummary") << "";
573  LogVerbatim("FwkSummary") << "TrigReport " << "-------End-Path Summary ------------";
574  LogVerbatim("FwkSummary") << "TrigReport "
575  << std::right << std::setw(10) << "Trig Bit#" << " "
576  << std::right << std::setw(10) << "Run" << " "
577  << std::right << std::setw(10) << "Passed" << " "
578  << std::right << std::setw(10) << "Failed" << " "
579  << std::right << std::setw(10) << "Error" << " "
580  << "Name" << "";
581  for (auto const& p: tr.endPathSummaries) {
582  LogVerbatim("FwkSummary") << "TrigReport "
583  << std::right << std::setw(5) << 0
584  << std::right << std::setw(5) << p.bitPosition << " "
585  << std::right << std::setw(10) << p.timesRun << " "
586  << std::right << std::setw(10) << p.timesPassed << " "
587  << std::right << std::setw(10) << p.timesFailed << " "
588  << std::right << std::setw(10) << p.timesExcept << " "
589  << p.name << "";
590  }
591 
592  for (auto const& p: tr.trigPathSummaries) {
593  LogVerbatim("FwkSummary") << "";
594  LogVerbatim("FwkSummary") << "TrigReport " << "---------- Modules in Path: " << p.name << " ------------";
595  LogVerbatim("FwkSummary") << "TrigReport "
596  << std::right << std::setw(10) << "Trig Bit#" << " "
597  << std::right << std::setw(10) << "Visited" << " "
598  << std::right << std::setw(10) << "Passed" << " "
599  << std::right << std::setw(10) << "Failed" << " "
600  << std::right << std::setw(10) << "Error" << " "
601  << "Name" << "";
602 
603  unsigned int bitpos = 0;
604  for (auto const& mod: p.moduleInPathSummaries) {
605  LogVerbatim("FwkSummary") << "TrigReport "
606  << std::right << std::setw(5) << 1
607  << std::right << std::setw(5) << bitpos << " "
608  << std::right << std::setw(10) << mod.timesVisited << " "
609  << std::right << std::setw(10) << mod.timesPassed << " "
610  << std::right << std::setw(10) << mod.timesFailed << " "
611  << std::right << std::setw(10) << mod.timesExcept << " "
612  << mod.moduleLabel << "";
613  ++bitpos;
614  }
615  }
616 
617  for (auto const& p: tr.endPathSummaries) {
618  LogVerbatim("FwkSummary") << "";
619  LogVerbatim("FwkSummary") << "TrigReport " << "------ Modules in End-Path: " << p.name << " ------------";
620  LogVerbatim("FwkSummary") << "TrigReport "
621  << std::right << std::setw(10) << "Trig Bit#" << " "
622  << std::right << std::setw(10) << "Visited" << " "
623  << std::right << std::setw(10) << "Passed" << " "
624  << std::right << std::setw(10) << "Failed" << " "
625  << std::right << std::setw(10) << "Error" << " "
626  << "Name" << "";
627 
628  unsigned int bitpos=0;
629  for (auto const& mod: p.moduleInPathSummaries) {
630  LogVerbatim("FwkSummary") << "TrigReport "
631  << std::right << std::setw(5) << 0
632  << std::right << std::setw(5) << bitpos << " "
633  << std::right << std::setw(10) << mod.timesVisited << " "
634  << std::right << std::setw(10) << mod.timesPassed << " "
635  << std::right << std::setw(10) << mod.timesFailed << " "
636  << std::right << std::setw(10) << mod.timesExcept << " "
637  << mod.moduleLabel << "";
638  ++bitpos;
639  }
640  }
641 
642  LogVerbatim("FwkSummary") << "";
643  LogVerbatim("FwkSummary") << "TrigReport " << "---------- Module Summary ------------";
644  LogVerbatim("FwkSummary") << "TrigReport "
645  << std::right << std::setw(10) << "Visited" << " "
646  << std::right << std::setw(10) << "Run" << " "
647  << std::right << std::setw(10) << "Passed" << " "
648  << std::right << std::setw(10) << "Failed" << " "
649  << std::right << std::setw(10) << "Error" << " "
650  << "Name" << "";
651  for (auto const& worker : tr.workerSummaries) {
652  LogVerbatim("FwkSummary") << "TrigReport "
653  << std::right << std::setw(10) << worker.timesVisited << " "
654  << std::right << std::setw(10) << worker.timesRun << " "
655  << std::right << std::setw(10) << worker.timesPassed << " "
656  << std::right << std::setw(10) << worker.timesFailed << " "
657  << std::right << std::setw(10) << worker.timesExcept << " "
658  << worker.moduleLabel << "";
659  }
660  LogVerbatim("FwkSummary") << "";
661  }
662  // The timing report (CPU and Real Time):
665 
666  const int totalEvents = std::max(1, tr.eventSummary.totalEvents);
667 
668  LogVerbatim("FwkSummary") << "TimeReport " << "---------- Event Summary ---[sec]----";
669  LogVerbatim("FwkSummary") << "TimeReport"
670  << std::setprecision(6) << std::fixed
671  << " CPU/event = " << tr.eventSummary.cpuTime/totalEvents
672  << " Real/event = " << tr.eventSummary.realTime/totalEvents
673  << "";
674 
675  LogVerbatim("FwkSummary") << "";
676  LogVerbatim("FwkSummary") << "TimeReport " << "---------- Path Summary ---[sec]----";
677  LogVerbatim("FwkSummary") << "TimeReport "
678  << std::right << std::setw(22) << "per event "
679  << std::right << std::setw(22) << "per path-run "
680  << "";
681  LogVerbatim("FwkSummary") << "TimeReport "
682  << std::right << std::setw(10) << "CPU" << " "
683  << std::right << std::setw(10) << "Real" << " "
684  << std::right << std::setw(10) << "CPU" << " "
685  << std::right << std::setw(10) << "Real" << " "
686  << "Name" << "";
687  for (auto const& p: tr.trigPathSummaries) {
688  const int timesRun = std::max(1, p.timesRun);
689  LogVerbatim("FwkSummary") << "TimeReport "
690  << std::setprecision(6) << std::fixed
691  << std::right << std::setw(10) << p.cpuTime/totalEvents << " "
692  << std::right << std::setw(10) << p.realTime/totalEvents << " "
693  << std::right << std::setw(10) << p.cpuTime/timesRun << " "
694  << std::right << std::setw(10) << p.realTime/timesRun << " "
695  << p.name << "";
696  }
697  LogVerbatim("FwkSummary") << "TimeReport "
698  << std::right << std::setw(10) << "CPU" << " "
699  << std::right << std::setw(10) << "Real" << " "
700  << std::right << std::setw(10) << "CPU" << " "
701  << std::right << std::setw(10) << "Real" << " "
702  << "Name" << "";
703  LogVerbatim("FwkSummary") << "TimeReport "
704  << std::right << std::setw(22) << "per event "
705  << std::right << std::setw(22) << "per path-run "
706  << "";
707 
708  LogVerbatim("FwkSummary") << "";
709  LogVerbatim("FwkSummary") << "TimeReport " << "-------End-Path Summary ---[sec]----";
710  LogVerbatim("FwkSummary") << "TimeReport "
711  << std::right << std::setw(22) << "per event "
712  << std::right << std::setw(22) << "per endpath-run "
713  << "";
714  LogVerbatim("FwkSummary") << "TimeReport "
715  << std::right << std::setw(10) << "CPU" << " "
716  << std::right << std::setw(10) << "Real" << " "
717  << std::right << std::setw(10) << "CPU" << " "
718  << std::right << std::setw(10) << "Real" << " "
719  << "Name" << "";
720  for (auto const& p: tr.endPathSummaries) {
721  const int timesRun = std::max(1, p.timesRun);
722 
723  LogVerbatim("FwkSummary") << "TimeReport "
724  << std::setprecision(6) << std::fixed
725  << std::right << std::setw(10) << p.cpuTime/totalEvents << " "
726  << std::right << std::setw(10) << p.realTime/totalEvents << " "
727  << std::right << std::setw(10) << p.cpuTime/timesRun << " "
728  << std::right << std::setw(10) << p.realTime/timesRun << " "
729  << p.name << "";
730  }
731  LogVerbatim("FwkSummary") << "TimeReport "
732  << std::right << std::setw(10) << "CPU" << " "
733  << std::right << std::setw(10) << "Real" << " "
734  << std::right << std::setw(10) << "CPU" << " "
735  << std::right << std::setw(10) << "Real" << " "
736  << "Name" << "";
737  LogVerbatim("FwkSummary") << "TimeReport "
738  << std::right << std::setw(22) << "per event "
739  << std::right << std::setw(22) << "per endpath-run "
740  << "";
741 
742  for (auto const& p: tr.trigPathSummaries) {
743  LogVerbatim("FwkSummary") << "";
744  LogVerbatim("FwkSummary") << "TimeReport " << "---------- Modules in Path: " << p.name << " ---[sec]----";
745  LogVerbatim("FwkSummary") << "TimeReport "
746  << std::right << std::setw(22) << "per event "
747  << std::right << std::setw(22) << "per module-visit "
748  << "";
749  LogVerbatim("FwkSummary") << "TimeReport "
750  << std::right << std::setw(10) << "CPU" << " "
751  << std::right << std::setw(10) << "Real" << " "
752  << std::right << std::setw(10) << "CPU" << " "
753  << std::right << std::setw(10) << "Real" << " "
754  << "Name" << "";
755  for (auto const& mod: p.moduleInPathSummaries) {
756  LogVerbatim("FwkSummary") << "TimeReport "
757  << std::setprecision(6) << std::fixed
758  << std::right << std::setw(10) << mod.cpuTime/totalEvents << " "
759  << std::right << std::setw(10) << mod.realTime/totalEvents << " "
760  << std::right << std::setw(10) << mod.cpuTime/std::max(1, mod.timesVisited) << " "
761  << std::right << std::setw(10) << mod.realTime/std::max(1, mod.timesVisited) << " "
762  << mod.moduleLabel << "";
763  }
764  }
765  LogVerbatim("FwkSummary") << "TimeReport "
766  << std::right << std::setw(10) << "CPU" << " "
767  << std::right << std::setw(10) << "Real" << " "
768  << std::right << std::setw(10) << "CPU" << " "
769  << std::right << std::setw(10) << "Real" << " "
770  << "Name" << "";
771  LogVerbatim("FwkSummary") << "TimeReport "
772  << std::right << std::setw(22) << "per event "
773  << std::right << std::setw(22) << "per module-visit "
774  << "";
775 
776  for (auto const& p: tr.endPathSummaries) {
777  LogVerbatim("FwkSummary") << "";
778  LogVerbatim("FwkSummary") << "TimeReport " << "------ Modules in End-Path: " << p.name << " ---[sec]----";
779  LogVerbatim("FwkSummary") << "TimeReport "
780  << std::right << std::setw(22) << "per event "
781  << std::right << std::setw(22) << "per module-visit "
782  << "";
783  LogVerbatim("FwkSummary") << "TimeReport "
784  << std::right << std::setw(10) << "CPU" << " "
785  << std::right << std::setw(10) << "Real" << " "
786  << std::right << std::setw(10) << "CPU" << " "
787  << std::right << std::setw(10) << "Real" << " "
788  << "Name" << "";
789  for (auto const& mod: p.moduleInPathSummaries) {
790  LogVerbatim("FwkSummary") << "TimeReport "
791  << std::setprecision(6) << std::fixed
792  << std::right << std::setw(10) << mod.cpuTime/totalEvents << " "
793  << std::right << std::setw(10) << mod.realTime/totalEvents << " "
794  << std::right << std::setw(10) << mod.cpuTime/std::max(1, mod.timesVisited) << " "
795  << std::right << std::setw(10) << mod.realTime/std::max(1, mod.timesVisited) << " "
796  << mod.moduleLabel << "";
797  }
798  }
799  LogVerbatim("FwkSummary") << "TimeReport "
800  << std::right << std::setw(10) << "CPU" << " "
801  << std::right << std::setw(10) << "Real" << " "
802  << std::right << std::setw(10) << "CPU" << " "
803  << std::right << std::setw(10) << "Real" << " "
804  << "Name" << "";
805  LogVerbatim("FwkSummary") << "TimeReport "
806  << std::right << std::setw(22) << "per event "
807  << std::right << std::setw(22) << "per module-visit "
808  << "";
809 
810  LogVerbatim("FwkSummary") << "";
811  LogVerbatim("FwkSummary") << "TimeReport " << "---------- Module Summary ---[sec]----";
812  LogVerbatim("FwkSummary") << "TimeReport "
813  << std::right << std::setw(22) << "per event "
814  << std::right << std::setw(22) << "per module-run "
815  << std::right << std::setw(22) << "per module-visit "
816  << "";
817  LogVerbatim("FwkSummary") << "TimeReport "
818  << std::right << std::setw(10) << "CPU" << " "
819  << std::right << std::setw(10) << "Real" << " "
820  << std::right << std::setw(10) << "CPU" << " "
821  << std::right << std::setw(10) << "Real" << " "
822  << std::right << std::setw(10) << "CPU" << " "
823  << std::right << std::setw(10) << "Real" << " "
824  << "Name" << "";
825  for (auto const& worker : tr.workerSummaries) {
826  LogVerbatim("FwkSummary") << "TimeReport "
827  << std::setprecision(6) << std::fixed
828  << std::right << std::setw(10) << worker.cpuTime/totalEvents << " "
829  << std::right << std::setw(10) << worker.realTime/totalEvents << " "
830  << std::right << std::setw(10) << worker.cpuTime/std::max(1, worker.timesRun) << " "
831  << std::right << std::setw(10) << worker.realTime/std::max(1, worker.timesRun) << " "
832  << std::right << std::setw(10) << worker.cpuTime/std::max(1, worker.timesVisited) << " "
833  << std::right << std::setw(10) << worker.realTime/std::max(1, worker.timesVisited) << " "
834  << worker.moduleLabel << "";
835  }
836  LogVerbatim("FwkSummary") << "TimeReport "
837  << std::right << std::setw(10) << "CPU" << " "
838  << std::right << std::setw(10) << "Real" << " "
839  << std::right << std::setw(10) << "CPU" << " "
840  << std::right << std::setw(10) << "Real" << " "
841  << std::right << std::setw(10) << "CPU" << " "
842  << std::right << std::setw(10) << "Real" << " "
843  << "Name" << "";
844  LogVerbatim("FwkSummary") << "TimeReport "
845  << std::right << std::setw(22) << "per event "
846  << std::right << std::setw(22) << "per module-run "
847  << std::right << std::setw(22) << "per module-visit "
848  << "";
849 
850  LogVerbatim("FwkSummary") << "";
851  LogVerbatim("FwkSummary") << "T---Report end!" << "";
852  LogVerbatim("FwkSummary") << "";
853  }
854 
857  }
858 
861  }
862 
864  for_all(all_output_communicators_, boost::bind(&OutputModuleCommunicator::openFile, _1, boost::cref(fb)));
865  }
866 
867  void Schedule::writeRun(RunPrincipal const& rp, ProcessContext const* processContext) {
868  for_all(all_output_communicators_, boost::bind(&OutputModuleCommunicator::writeRun, _1, boost::cref(rp), processContext));
869  }
870 
871  void Schedule::writeLumi(LuminosityBlockPrincipal const& lbp, ProcessContext const* processContext) {
872  for_all(all_output_communicators_, boost::bind(&OutputModuleCommunicator::writeLumi, _1, boost::cref(lbp), processContext));
873  }
874 
876  // Return true iff at least one output module returns true.
877  return (std::find_if (all_output_communicators_.begin(), all_output_communicators_.end(),
879  != all_output_communicators_.end());
880  }
881 
883  for_all(allWorkers(), boost::bind(&Worker::respondToOpenInputFile, _1, boost::cref(fb)));
884  }
885 
887  for_all(allWorkers(), boost::bind(&Worker::respondToCloseInputFile, _1, boost::cref(fb)));
888  }
889 
890  void Schedule::beginJob(ProductRegistry const& iRegistry) {
891  globalSchedule_->beginJob(iRegistry);
892  }
893 
894  void Schedule::beginStream(unsigned int iStreamID) {
895  assert(iStreamID<streamSchedules_.size());
896  streamSchedules_[iStreamID]->beginStream();
897  }
898 
899  void Schedule::endStream(unsigned int iStreamID) {
900  assert(iStreamID<streamSchedules_.size());
901  streamSchedules_[iStreamID]->endStream();
902  }
903 
905  for_all(allWorkers(), boost::bind(&Worker::preForkReleaseResources, _1));
906  }
907  void Schedule::postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren) {
908  for_all(allWorkers(), boost::bind(&Worker::postForkReacquireResources, _1, iChildIndex, iNumberOfChildren));
909  }
910 
912  ParameterSet const& iPSet) {
913  Worker* found = nullptr;
914  for (auto const& worker : allWorkers()) {
915  if (worker->description().moduleLabel() == iLabel) {
916  found = worker;
917  break;
918  }
919  }
920  if (nullptr == found) {
921  return false;
922  }
923 
924  auto newMod = moduleRegistry_->replaceModule(iLabel,iPSet,preallocConfig_);
925 
926  globalSchedule_->replaceModule(newMod,iLabel);
927 
928  for(auto s: streamSchedules_) {
929  s->replaceModule(newMod,iLabel);
930  }
931  return true;
932  }
933 
934  std::vector<ModuleDescription const*>
936  std::vector<ModuleDescription const*> result;
937  result.reserve(allWorkers().size());
938 
939  for (auto const& worker : allWorkers()) {
940  ModuleDescription const* p = worker->descPtr();
941  result.push_back(p);
942  }
943  return result;
944  }
945 
946  Schedule::AllWorkers const&
948  return globalSchedule_->allWorkers();
949  }
950 
951  void
952  Schedule::availablePaths(std::vector<std::string>& oLabelsToFill) const {
953  streamSchedules_[0]->availablePaths(oLabelsToFill);
954  }
955 
956  void
958  std::vector<std::string>& oLabelsToFill) const {
959  streamSchedules_[0]->modulesInPath(iPathLabel,oLabelsToFill);
960  }
961 
962  void
964  endpathsAreActive_ = active;
965  for(auto const & s : streamSchedules_) {
966  s->enableEndPaths(active);
967  }
968  }
969 
970  bool
972  return endpathsAreActive_;
973  }
974 
975  void
977  rep.eventSummary.totalEvents = 0;
980  for(auto& s: streamSchedules_) {
981  s->getTriggerReport(rep);
982  }
983  }
984 
985  void
987  rep.eventSummary.totalEvents = 0;
988  rep.eventSummary.cpuTime = 0.;
989  rep.eventSummary.realTime = 0.;
990  for(auto& s: streamSchedules_) {
991  s->getTriggerTimingReport(rep);
992  }
993  }
994 
995  int
997  int returnValue = 0;
998  for(auto& s: streamSchedules_) {
999  returnValue += s->totalEvents();
1000  }
1001  return returnValue;
1002  }
1003 
1004  int
1006  int returnValue = 0;
1007  for(auto& s: streamSchedules_) {
1008  returnValue += s->totalEventsPassed();
1009  }
1010  return returnValue;
1011  }
1012 
1013  int
1015  int returnValue = 0;
1016  for(auto& s: streamSchedules_) {
1017  returnValue += s->totalEventsFailed();
1018  }
1019  return returnValue;
1020  }
1021 
1022 
1023  void
1025  for(auto const& s: streamSchedules_) {
1026  s->clearCounters();
1027  }
1028  }
1029 }
bool empty() const
Definition: ParameterSet.h:216
std::vector< PathSummary > endPathSummaries
Definition: TriggerReport.h:64
T getUntrackedParameter(std::string const &, T const &) const
std::vector< PathTimingSummary > endPathSummaries
dictionary aliases
Definition: autoCond.py:23
int i
Definition: DBlmapReader.cc:9
string rep
Definition: cuy.py:1188
std::vector< BranchIDList > BranchIDLists
Definition: BranchIDList.h:19
virtual void openFile(FileBlock const &fb)=0
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:947
void availablePaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all paths in the process
Definition: Schedule.cc:952
virtual void writeRun(RunPrincipal const &rp, ProcessContext const *)=0
preallocConfig_(prealloc)
bool endPathsEnabled() const
Definition: Schedule.cc:971
all_output_communicators_()
void respondToCloseInputFile(FileBlock const &fb)
Definition: Schedule.cc:886
bool changeModule(std::string const &iLabel, ParameterSet const &iPSet)
Definition: Schedule.cc:911
std::vector< Worker * > AllWorkers
Definition: Schedule.h:113
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
void writeRun(RunPrincipal const &rp, ProcessContext const *)
Definition: Schedule.cc:867
void endStream(unsigned int)
Definition: Schedule.cc:899
void writeLumi(LuminosityBlockPrincipal const &lbp, ProcessContext const *)
Definition: Schedule.cc:871
void enableEndPaths(bool active)
Definition: Schedule.cc:963
processConfiguration
Definition: Schedule.cc:362
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
endpathsAreActive_(true)
Definition: Schedule.cc:367
std::vector< WorkerSummary > workerSummaries
Definition: TriggerReport.h:65
actions
Definition: Schedule.cc:362
static unsigned int getUniqueID()
Returns a unique id each time called. Intended to be passed to ModuleDescription&#39;s constructor&#39;s modI...
int totalEventsFailed() const
Definition: Schedule.cc:1014
void eraseOrSetUntrackedParameterSet(std::string const &name)
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
Definition: ParameterSet.h:192
int totalEventsPassed() const
Definition: Schedule.cc:1005
std::vector< PathSummary > trigPathSummaries
Definition: TriggerReport.h:63
EventSummary eventSummary
Definition: TriggerReport.h:62
void limitOutput(ParameterSet const &proc_pset, BranchIDLists const &branchIDLists)
Definition: Schedule.cc:452
const T & max(const T &a, const T &b)
wantSummary_(tns.wantSummary())
int totalEvents() const
Definition: Schedule.cc:996
virtual void openNewFileIfNeeded()=0
EventTimingSummary eventSummary
void clearCounters()
Clear all the counters in the trigger report.
Definition: Schedule.cc:1024
tuple result
Definition: query.py:137
boost::shared_ptr< ModuleRegistry > moduleRegistry_
Definition: Schedule.h:241
std::vector< PathTimingSummary > trigPathSummaries
std::vector< std::shared_ptr< StreamSchedule > > streamSchedules_
Definition: Schedule.h:242
void setProcessParameterSetID(ParameterSetID const &id)
Associated free functions.
Definition: Registry.cc:76
bool terminate() const
Return whether each output module has reached its maximum count.
Definition: Schedule.cc:491
void respondToOpenInputFile(FileBlock const &fb)
Definition: Schedule.cc:882
virtual void writeLumi(LuminosityBlockPrincipal const &lbp, ProcessContext const *)=0
areg
Definition: Schedule.cc:362
void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
Definition: Worker.h:90
void getTriggerReport(TriggerReport &rep) const
Definition: Schedule.cc:976
virtual bool shouldWeCloseFile() const =0
PreallocationConfiguration preallocConfig_
Definition: Schedule.h:247
moduleRegistry_(new ModuleRegistry())
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:120
volatile bool endpathsAreActive_
Definition: Schedule.h:252
void respondToOpenInputFile(FileBlock const &fb)
Definition: Worker.h:86
bool search_all(ForwardSequence const &s, Datum const &d)
Definition: Algorithms.h:46
AllOutputModuleCommunicators all_output_communicators_
Definition: Schedule.h:246
void loadMissingDictionaries()
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 ...
Definition: Schedule.cc:957
Schedule(ParameterSet &proc_pset, service::TriggerNamesService &tns, ProductRegistry &pregistry, BranchIDListHelper &branchIDListHelper, ExceptionToActionTable const &actions, boost::shared_ptr< ActivityRegistry > areg, boost::shared_ptr< ProcessConfiguration > processConfiguration, const ParameterSet *subProcPSet, PreallocationConfiguration const &config, ProcessContext const *processContext)
Definition: Schedule.cc:351
void beginStream(unsigned int)
Definition: Schedule.cc:894
void respondToCloseInputFile(FileBlock const &fb)
Definition: Worker.h:87
void preForkReleaseResources()
Definition: Worker.h:89
bool wantSummary_
Definition: Schedule.h:250
void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
Definition: Schedule.cc:907
list key
Definition: combine.py:13
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
Definition: Schedule.cc:935
Strings const & getTrigPaths() const
std::unique_ptr< GlobalSchedule > globalSchedule_
Definition: Schedule.h:244
void beginJob(ProductRegistry const &)
Definition: Schedule.cc:890
void openNewOutputFilesIfNeeded()
Definition: Schedule.cc:859
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
void preForkReleaseResources()
Definition: Schedule.cc:904
void openOutputFiles(FileBlock &fb)
Definition: Schedule.cc:863
preg
Definition: Schedule.cc:362
std::vector< WorkerTimingSummary > workerSummaries
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
void endJob(ExceptionCollector &collector)
Definition: Schedule.cc:507
void getTriggerTimingReport(TriggerTimingReport &rep) const
Definition: Schedule.cc:986
bool shouldWeCloseOutput() const
Definition: Schedule.cc:875
std::vector< std::string > vstring
Definition: Schedule.cc:347
tuple size
Write out results.
void closeOutputFiles()
Definition: Schedule.cc:855
prealloc
Definition: Schedule.cc:362
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)