45 using std::placeholders::_1;
47 bool binary_search_string(std::vector<std::string>
const&
v,
std::string const&
s) {
48 return std::binary_search(v.begin(), v.end(),
s);
54 std::shared_ptr<TriggerResultInserter>
56 PreallocationConfiguration
const& iPrealloc,
57 ProductRegistry& preg,
58 ExceptionToActionTable
const&
actions,
59 std::shared_ptr<ActivityRegistry> areg,
60 std::shared_ptr<ProcessConfiguration> processConfiguration) {
62 ParameterSet* trig_pset = proc_pset.getPSetForUpdate(
"@trigger_paths");
63 trig_pset->registerIt();
65 WorkerParams work_args(trig_pset, preg, &iPrealloc, processConfiguration, actions);
66 ModuleDescription md(trig_pset->id(),
67 "TriggerResultInserter",
69 processConfiguration.get(),
72 areg->preModuleConstructionSignal_(md);
73 bool postCalled =
false;
74 std::shared_ptr<TriggerResultInserter> returnValue;
76 maker::ModuleHolderT<TriggerResultInserter> holder(std::shared_ptr<TriggerResultInserter>(
new TriggerResultInserter(*trig_pset, iPrealloc.numberOfStreams())),
static_cast<Maker const*
>(
nullptr));
77 holder.setModuleDescription(md);
78 holder.registerProductsAndCallbacks(&preg);
79 returnValue =holder.module();
82 areg->postModuleConstructionSignal_(md);
87 areg->postModuleConstructionSignal_(md);
100 checkAndInsertAlias(
std::string const& friendlyClassName,
106 ProductRegistry
const& preg,
107 std::multimap<BranchKey, BranchKey>& aliasMap,
108 std::map<BranchKey, BranchKey>& aliasKeys) {
111 BranchKey
key(friendlyClassName, moduleLabel, productInstanceName, processName);
112 if(preg.productList().find(
key) == preg.productList().end()) {
115 for(
auto const& product : preg.productList()) {
116 if(moduleLabel == product.first.moduleLabel() && processName == product.first.processName()) {
118 <<
"There are no products of type '" << friendlyClassName <<
"'\n" 119 <<
"with module label '" << moduleLabel <<
"' and instance name '" << productInstanceName <<
"'.\n";
124 std::string const& theInstanceAlias(instanceAlias == star ? productInstanceName : instanceAlias);
125 BranchKey aliasKey(friendlyClassName, alias, theInstanceAlias, processName);
126 if(preg.productList().find(aliasKey) != preg.productList().end()) {
128 <<
"A product of type '" << friendlyClassName <<
"'\n" 129 <<
"with module label '" << alias <<
"' and instance name '" << theInstanceAlias <<
"'\n" 130 <<
"already exists.\n";
132 auto iter = aliasKeys.find(aliasKey);
133 if(iter != aliasKeys.end()) {
135 if(iter->second !=
key) {
137 <<
"The module label alias '" << alias <<
"' and product instance alias '" << theInstanceAlias <<
"'\n" 138 <<
"are used for multiple products of type '" << friendlyClassName <<
"'\n" 139 <<
"One has module label '" << moduleLabel <<
"' and product instance name '" << productInstanceName <<
"',\n" 140 <<
"the other has module label '" << iter->second.moduleLabel() <<
"' and product instance name '" << iter->second.productInstanceName() <<
"'.\n";
143 auto prodIter = preg.productList().find(
key);
144 if(prodIter != preg.productList().end()) {
145 if (!prodIter->second.produced()) {
147 <<
"The module label alias '" << alias <<
"' and product instance alias '" << theInstanceAlias <<
"'\n" 148 <<
"are used for a product of type '" << friendlyClassName <<
"'\n" 149 <<
"with module label '" << moduleLabel <<
"' and product instance name '" << productInstanceName <<
"',\n" 150 <<
"An EDAlias can only be used for products produced in the current process. This one is not.\n";
152 aliasMap.insert(std::make_pair(
key, aliasKey));
153 aliasKeys.insert(std::make_pair(aliasKey,
key));
160 std::vector<std::string> aliases = proc_pset.getParameter<std::vector<std::string> >(
"@all_aliases");
161 if(aliases.empty()) {
168 desc.add<
std::string>(
"fromProductInstance", star);
171 std::multimap<BranchKey, BranchKey> aliasMap;
173 std::map<BranchKey, BranchKey> aliasKeys;
177 ParameterSet const& aliasPSet = proc_pset.getParameterSet(alias);
178 std::vector<std::string> vPSetNames = aliasPSet.getParameterNamesForType<
VParameterSet>();
186 if(productInstanceName == star) {
188 BranchKey lowerBound(friendlyClassName, moduleLabel,
empty,
empty);
189 for(ProductRegistry::ProductList::const_iterator it = preg.productList().lower_bound(lowerBound);
190 it != preg.productList().end() && it->first.friendlyClassName() == friendlyClassName && it->first.moduleLabel() == moduleLabel;
197 checkAndInsertAlias(friendlyClassName, moduleLabel, it->first.productInstanceName(),
processName,
alias, instanceAlias, preg, aliasMap, aliasKeys);
202 for(
auto const& product : preg.productList()) {
203 if(moduleLabel == product.first.moduleLabel() && processName == product.first.processName()) {
205 <<
"There are no products of type '" << friendlyClassName <<
"'\n" 206 <<
"with module label '" << moduleLabel <<
"'.\n";
211 checkAndInsertAlias(friendlyClassName, moduleLabel, productInstanceName, processName, alias, instanceAlias, preg, aliasMap, aliasKeys);
219 for(
auto const& aliasEntry : aliasMap) {
220 ProductRegistry::ProductList::const_iterator it = preg.productList().find(aliasEntry.first);
221 assert(it != preg.productList().end());
222 preg.addLabelAlias(it->second, aliasEntry.second.moduleLabel(), aliasEntry.second.productInstanceName());
227 typedef std::vector<std::string>
vstring;
230 vstring
const& end_path_name_list,
231 vstring& modulesInConfig,
232 std::set<std::string>
const& usedModuleLabels,
233 std::map<
std::string, std::vector<std::pair<std::string, int> > >& outputModulePathPositions) {
245 vstring outputModuleLabels;
247 std::string const moduleEdmType(
"@module_edm_type");
253 std::set<std::string> modulesInConfigSet(modulesInConfig.begin(), modulesInConfig.end());
257 vstring scheduledPaths = proc_pset.getParameter<vstring>(
"@paths");
258 std::set<std::string> modulesOnPaths;
260 std::set<std::string> noEndPaths(scheduledPaths.begin(),scheduledPaths.end());
261 for(
auto const& endPath: end_path_name_list) {
262 noEndPaths.erase(endPath);
266 for(
auto const&
path: noEndPaths) {
267 labels = proc_pset.getParameter<vstring>(
path);
268 modulesOnPaths.insert(labels.begin(),labels.end());
274 std::vector<std::string> labelsToBeDropped;
275 labelsToBeDropped.reserve(modulesInConfigSet.size());
276 std::set_difference(modulesInConfigSet.begin(),modulesInConfigSet.end(),
277 usedModuleLabels.begin(),usedModuleLabels.end(),
278 std::back_inserter(labelsToBeDropped));
280 const unsigned int sizeBeforeOutputModules = labelsToBeDropped.size();
281 for (
auto const& modLabel: usedModuleLabels) {
282 edmType = proc_pset.getParameterSet(modLabel).getParameter<
std::string>(moduleEdmType);
283 if (edmType == outputModule) {
284 outputModuleLabels.push_back(modLabel);
285 labelsToBeDropped.push_back(modLabel);
287 if(edmType == edAnalyzer) {
288 if(modulesOnPaths.end()==modulesOnPaths.find(modLabel)) {
289 labelsToBeDropped.push_back(modLabel);
294 std::inplace_merge(labelsToBeDropped.begin(),
295 labelsToBeDropped.begin()+sizeBeforeOutputModules,
296 labelsToBeDropped.end());
302 vstring::iterator endAfterRemove = std::remove_if(modulesInConfig.begin(), modulesInConfig.end(), std::bind(binary_search_string, std::ref(labelsToBeDropped), _1));
303 modulesInConfig.erase(endAfterRemove, modulesInConfig.end());
304 proc_pset.addParameter<vstring>(
std::string(
"@all_modules"), modulesInConfig);
307 vstring endPathsToBeDropped;
309 for (vstring::const_iterator iEndPath = end_path_name_list.begin(), endEndPath = end_path_name_list.end();
310 iEndPath != endEndPath;
312 labels = proc_pset.getParameter<vstring>(*iEndPath);
313 vstring::iterator iSave = labels.begin();
314 vstring::iterator iBegin = labels.begin();
316 for (vstring::iterator iLabel = labels.begin(), iEnd = labels.end();
317 iLabel != iEnd; ++iLabel) {
318 if (binary_search_string(labelsToBeDropped, *iLabel)) {
319 if (binary_search_string(outputModuleLabels, *iLabel)) {
320 outputModulePathPositions[*iLabel].emplace_back(*iEndPath, iSave - iBegin);
323 if (iSave != iLabel) {
324 iSave->swap(*iLabel);
329 labels.erase(iSave, labels.end());
330 if (labels.empty()) {
332 proc_pset.eraseSimpleParameter(*iEndPath);
333 endPathsToBeDropped.push_back(*iEndPath);
335 proc_pset.addParameter<vstring>(*iEndPath,
labels);
341 endAfterRemove = std::remove_if(scheduledPaths.begin(), scheduledPaths.end(), std::bind(binary_search_string, std::ref(endPathsToBeDropped), _1));
342 scheduledPaths.erase(endAfterRemove, scheduledPaths.end());
343 proc_pset.addParameter<vstring>(
std::string(
"@paths"), scheduledPaths);
346 vstring scheduledEndPaths = proc_pset.getParameter<vstring>(
"@end_paths");
347 endAfterRemove = std::remove_if(scheduledEndPaths.begin(), scheduledEndPaths.end(), std::bind(binary_search_string, std::ref(endPathsToBeDropped), _1));
348 scheduledEndPaths.erase(endAfterRemove, scheduledEndPaths.end());
349 proc_pset.addParameter<vstring>(
std::string(
"@end_paths"), scheduledEndPaths);
353 class RngEDConsumer :
public EDConsumerBase {
355 explicit RngEDConsumer(std::set<TypeID>& typesConsumed) {
357 if(rng.isAvailable()) {
358 rng->consumes(consumesCollector());
359 for (
auto const& consumesInfo : this->consumesInfo()) {
360 typesConsumed.emplace(consumesInfo.type());
379 std::shared_ptr<ActivityRegistry> areg,
380 std::shared_ptr<ProcessConfiguration> processConfiguration,
381 bool hasSubprocesses,
385 resultsInserter_{tns.
getTrigPaths().empty()? std::shared_ptr<TriggerResultInserter>{} :makeInserter(proc_pset,prealloc,preg,actions,areg,processConfiguration)},
392 assert(0<prealloc.numberOfStreams());
394 for(
unsigned int i=0;
i<prealloc.numberOfStreams();++
i) {
398 proc_pset,tns,prealloc,preg,
399 branchIDListHelper,actions,
400 areg,processConfiguration,
408 const std::string kTriggerResults(
"TriggerResults");
409 std::vector<std::string> modulesToUse;
412 if(worker->description().moduleLabel() != kTriggerResults) {
413 modulesToUse.push_back(worker->description().moduleLabel());
419 std::vector<std::string>
temp;
420 temp.reserve(modulesToUse.size());
421 auto itBeginUnscheduled = modulesToUse.begin()+modulesToUse.size()-
n;
422 std::copy(itBeginUnscheduled,modulesToUse.end(),
423 std::back_inserter(temp));
424 std::copy(modulesToUse.begin(),itBeginUnscheduled,std::back_inserter(temp));
425 temp.swap(modulesToUse);
433 proc_pset, preg, prealloc,
434 actions,areg,processConfiguration,processContext);
438 std::set<std::string> usedModuleLabels;
440 if(worker->description().moduleLabel() != kTriggerResults) {
441 usedModuleLabels.insert(worker->description().moduleLabel());
444 std::vector<std::string> modulesInConfig(proc_pset.getParameter<std::vector<std::string> >(
"@all_modules"));
445 std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions;
446 reduceParameterSet(proc_pset, tns.getEndPaths(), modulesInConfig, usedModuleLabels,
447 outputModulePathPositions);
448 processEDAliases(proc_pset, processConfiguration->processName(), preg);
449 proc_pset.registerIt();
450 processConfiguration->setParameterSetID(proc_pset.id());
451 processConfiguration->setProcessConfigurationID();
455 size_t all_workers_count =
allWorkers().size();
464 limitOutput(proc_pset, branchIDListHelper.branchIDLists(), subProcessParentageHelper);
470 branchIDListHelper.updateFromRegistry(preg);
473 worker->registerThinnedAssociations(preg, thinnedAssociationsHelper);
475 thinnedAssociationsHelper.sort();
480 c->selectProducts(preg, thinnedAssociationsHelper);
485 std::set<TypeID> productTypesConsumed;
486 std::set<TypeID> elementTypesConsumed;
489 for (
auto const& consumesInfo : worker->consumesInfo()) {
491 productTypesConsumed.emplace(consumesInfo.type());
493 elementTypesConsumed.emplace(consumesInfo.type());
498 if(hasSubprocesses) {
503 RngEDConsumer rngConsumer = RngEDConsumer(productTypesConsumed);
505 preg.setFrozen(productTypesConsumed, elementTypesConsumed, processConfiguration->processName());
508 for (
auto&
c : all_output_communicators_) {
509 c->setEventSelectionInfo(outputModulePathPositions, preg.anyProductProduced());
513 std::vector<const ModuleDescription*> modDesc;
515 modDesc.reserve(workers.size());
518 std::back_inserter(modDesc),
520 return iWorker->descPtr();
525 prealloc.numberOfStreams(),
529 auto timeKeeperPtr = summaryTimeKeeper_.get();
559 int maxEventSpecs = 0;
560 int maxEventsOut = -1;
567 std::vector<std::string> psetNamesE;
574 if (maxEventSpecs > 1) {
576 "\nAt most, one form of 'output' may appear in the 'maxEvents' parameter set";
581 if (vMaxEventsOut != 0 && !vMaxEventsOut->
empty()) {
582 std::string const& moduleLabel =
c->description().moduleLabel();
587 "\nNo entry in 'maxEvents' for output module label '" << moduleLabel <<
"'.\n";
599 if (!
c->limitReached()) {
604 LogInfo(
"SuccessfulTermination")
605 <<
"The job is terminating successfully because each output module\n" 606 <<
"has reached its configured limit.\n";
627 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Event Summary ------------";
642 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Path Summary ------------";
644 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 645 << std::right << std::setw(10) <<
"Executed" <<
" " 646 << std::right << std::setw(10) <<
"Passed" <<
" " 647 << std::right << std::setw(10) <<
"Failed" <<
" " 648 << std::right << std::setw(10) <<
"Error" <<
" " 652 << std::right << std::setw(5) << 1
653 << std::right << std::setw(5) <<
p.bitPosition <<
" " 654 << std::right << std::setw(10) <<
p.timesRun <<
" " 655 << std::right << std::setw(10) <<
p.timesPassed <<
" " 656 << std::right << std::setw(10) <<
p.timesFailed <<
" " 657 << std::right << std::setw(10) <<
p.timesExcept <<
" " 679 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"-------End-Path Summary ------------";
681 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 682 << std::right << std::setw(10) <<
"Executed" <<
" " 683 << std::right << std::setw(10) <<
"Passed" <<
" " 684 << std::right << std::setw(10) <<
"Failed" <<
" " 685 << std::right << std::setw(10) <<
"Error" <<
" " 689 << std::right << std::setw(5) << 0
690 << std::right << std::setw(5) <<
p.bitPosition <<
" " 691 << std::right << std::setw(10) <<
p.timesRun <<
" " 692 << std::right << std::setw(10) <<
p.timesPassed <<
" " 693 << std::right << std::setw(10) <<
p.timesFailed <<
" " 694 << std::right << std::setw(10) <<
p.timesExcept <<
" " 700 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Modules in Path: " <<
p.name <<
" ------------";
702 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 703 << std::right << std::setw(10) <<
"Visited" <<
" " 704 << std::right << std::setw(10) <<
"Passed" <<
" " 705 << std::right << std::setw(10) <<
"Failed" <<
" " 706 << std::right << std::setw(10) <<
"Error" <<
" " 709 unsigned int bitpos = 0;
710 for (
auto const&
mod:
p.moduleInPathSummaries) {
712 << std::right << std::setw(5) << 1
713 << std::right << std::setw(5) << bitpos <<
" " 714 << std::right << std::setw(10) <<
mod.timesVisited <<
" " 715 << std::right << std::setw(10) <<
mod.timesPassed <<
" " 716 << std::right << std::setw(10) <<
mod.timesFailed <<
" " 717 << std::right << std::setw(10) <<
mod.timesExcept <<
" " 718 <<
mod.moduleLabel <<
"";
725 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"------ Modules in End-Path: " <<
p.name <<
" ------------";
727 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 728 << std::right << std::setw(10) <<
"Visited" <<
" " 729 << std::right << std::setw(10) <<
"Passed" <<
" " 730 << std::right << std::setw(10) <<
"Failed" <<
" " 731 << std::right << std::setw(10) <<
"Error" <<
" " 734 unsigned int bitpos=0;
735 for (
auto const&
mod:
p.moduleInPathSummaries) {
737 << std::right << std::setw(5) << 0
738 << std::right << std::setw(5) << bitpos <<
" " 739 << std::right << std::setw(10) <<
mod.timesVisited <<
" " 740 << std::right << std::setw(10) <<
mod.timesPassed <<
" " 741 << std::right << std::setw(10) <<
mod.timesFailed <<
" " 742 << std::right << std::setw(10) <<
mod.timesExcept <<
" " 743 <<
mod.moduleLabel <<
"";
749 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Module Summary ------------";
751 << std::right << std::setw(10) <<
"Visited" <<
" " 752 << std::right << std::setw(10) <<
"Executed" <<
" " 753 << std::right << std::setw(10) <<
"Passed" <<
" " 754 << std::right << std::setw(10) <<
"Failed" <<
" " 755 << std::right << std::setw(10) <<
"Error" <<
" " 759 << std::right << std::setw(10) << worker.timesVisited <<
" " 760 << std::right << std::setw(10) << worker.timesRun <<
" " 761 << std::right << std::setw(10) << worker.timesPassed <<
" " 762 << std::right << std::setw(10) << worker.timesFailed <<
" " 763 << std::right << std::setw(10) << worker.timesExcept <<
" " 764 << worker.moduleLabel <<
"";
774 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Event Summary ---[sec]----";
792 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Path Summary ---[Real sec]----";
794 << std::right << std::setw(kColumn1Size) <<
"per event"<<
" " 795 << std::right << std::setw(kColumn2Size) <<
"per exec" 798 const int timesRun =
std::max(1,
p.timesRun);
801 << std::right << std::setw(kColumn1Size) <<
p.realTime/totalEvents <<
" " 802 << std::right << std::setw(kColumn2Size) <<
p.realTime/timesRun <<
" " 806 << std::right << std::setw(kColumn1Size) <<
"per event"<<
" " 807 << std::right << std::setw(kColumn2Size) <<
"per exec" 811 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"-------End-Path Summary ---[Real sec]----";
813 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 814 << std::right << std::setw(kColumn2Size) <<
"per exec" 817 const int timesRun =
std::max(1,
p.timesRun);
821 << std::right << std::setw(kColumn1Size) <<
p.realTime/totalEvents <<
" " 822 << std::right << std::setw(kColumn2Size) <<
p.realTime/timesRun <<
" " 826 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 827 << std::right << std::setw(kColumn2Size) <<
"per exec" 832 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Modules in Path: " <<
p.name <<
" ---[Real sec]----";
834 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 835 << std::right << std::setw(kColumn2Size) <<
"per visit" 837 for (
auto const&
mod:
p.moduleInPathSummaries) {
840 << std::right << std::setw(kColumn1Size) <<
mod.realTime/totalEvents <<
" " 841 << std::right << std::setw(kColumn2Size) <<
mod.realTime/
std::max(1,
mod.timesVisited) <<
" " 842 <<
mod.moduleLabel <<
"";
847 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 848 << std::right << std::setw(kColumn2Size) <<
"per visit" 853 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"------ Modules in End-Path: " <<
p.name <<
" ---[Real sec]----";
855 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 856 << std::right << std::setw(kColumn2Size) <<
"per visit" 858 for (
auto const&
mod:
p.moduleInPathSummaries) {
861 << std::right << std::setw(kColumn1Size) <<
mod.realTime/totalEvents <<
" " 862 << std::right << std::setw(kColumn2Size) <<
mod.realTime/
std::max(1,
mod.timesVisited) <<
" " 863 <<
mod.moduleLabel <<
"";
868 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 869 << std::right << std::setw(kColumn2Size) <<
"per visit" 873 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Module Summary ---[Real sec]----";
875 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 876 << std::right << std::setw(kColumn2Size) <<
"per exec" <<
" " 877 << std::right << std::setw(kColumn3Size) <<
"per visit" 882 << std::right << std::setw(kColumn1Size) << worker.realTime/totalEvents <<
" " 883 << std::right << std::setw(kColumn2Size) << worker.realTime/
std::max(1, worker.timesRun) <<
" " 884 << std::right << std::setw(kColumn3Size) << worker.realTime/
std::max(1, worker.timesVisited) <<
" " 885 << worker.moduleLabel <<
"";
888 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 889 << std::right << std::setw(kColumn2Size) <<
"per exec" <<
" " 890 << std::right << std::setw(kColumn3Size) <<
"per visit" 894 LogVerbatim(
"FwkSummary") <<
"T---Report end!" <<
"";
899 using std::placeholders::_1;
904 using std::placeholders::_1;
909 using std::placeholders::_1;
914 using std::placeholders::_1;
919 using std::placeholders::_1;
924 using std::placeholders::_1;
932 using std::placeholders::_1;
937 using std::placeholders::_1;
956 unsigned int iStreamID,
964 using std::placeholders::_1;
968 using std::placeholders::_1;
977 if (worker->description().moduleLabel() == iLabel) {
982 if (
nullptr == found) {
991 s->replaceModule(newMod,iLabel);
1007 std::vector<ModuleDescription const*>
1009 std::vector<ModuleDescription const*>
result;
1014 result.push_back(p);
1041 std::vector<std::string>& oLabelsToFill)
const {
1047 std::vector<ModuleDescription const*>& descriptions,
1048 unsigned int hint)
const {
1049 streamSchedules_[0]->moduleDescriptionsInPath(iPathLabel, descriptions, hint);
1054 std::vector<ModuleDescription const*>& descriptions,
1055 unsigned int hint)
const {
1056 streamSchedules_[0]->moduleDescriptionsInEndPath(iEndPathLabel, descriptions, hint);
1061 std::vector<std::pair<unsigned int, unsigned int> >& moduleIDToIndex,
1062 std::vector<std::vector<ModuleDescription const*> >& modulesWhoseProductsAreConsumedBy,
1064 allModuleDescriptions.clear();
1065 moduleIDToIndex.clear();
1066 modulesWhoseProductsAreConsumedBy.clear();
1072 std::map<std::string, ModuleDescription const*> labelToDesc;
1076 allModuleDescriptions.push_back(p);
1077 moduleIDToIndex.push_back(std::pair<unsigned int, unsigned int>(p->
id(),
i));
1085 std::vector<ModuleDescription const*>&
modules = modulesWhoseProductsAreConsumedBy.at(i);
1086 worker->modulesWhoseProductsAreConsumed(modules, preg, labelToDesc);
1095 s->enableEndPaths(active);
1110 s->getTriggerReport(rep);
1125 int returnValue = 0;
1127 returnValue += s->totalEvents();
1134 int returnValue = 0;
1136 returnValue += s->totalEventsPassed();
1143 int returnValue = 0;
1145 returnValue += s->totalEventsFailed();
std::vector< PathSummary > endPathSummaries
T getUntrackedParameter(std::string const &, T const &) const
std::vector< PathTimingSummary > endPathSummaries
void stopEvent(StreamContext const &)
void startProcessingLoop()
std::vector< BranchIDList > BranchIDLists
void fillModuleAndConsumesInfo(std::vector< ModuleDescription const * > &allModuleDescriptions, std::vector< std::pair< unsigned int, unsigned int > > &moduleIDToIndex, std::vector< std::vector< ModuleDescription const * > > &modulesWhoseProductsAreConsumedBy, ProductRegistry const &preg) const
virtual void openFile(FileBlock const &fb)=0
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
roAction_t actions[nactions]
void availablePaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all paths in the process
virtual void writeRun(RunPrincipal const &rp, ProcessContext const *)=0
void restartModuleEvent(StreamContext const &, ModuleCallingContext const &)
bool endPathsEnabled() const
void respondToCloseInputFile(FileBlock const &fb)
void startModuleEvent(StreamContext const &, ModuleCallingContext const &)
std::shared_ptr< ModuleRegistry const > moduleRegistry() const
std::vector< Worker * > AllWorkers
std::vector< ParameterSet > VParameterSet
virtual bool shouldWeCloseFile() const =0
void writeRun(RunPrincipal const &rp, ProcessContext const *)
void endStream(unsigned int)
void writeLumi(LuminosityBlockPrincipal const &lbp, ProcessContext const *)
void enableEndPaths(bool active)
unsigned int numberOfThreads() const
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
virtual void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &)=0
void moduleDescriptionsInEndPath(std::string const &iEndPathLabel, std::vector< ModuleDescription const * > &descriptions, unsigned int hint) const
std::vector< WorkerSummary > workerSummaries
edm::propagate_const< std::unique_ptr< SystemTimeKeeper > > summaryTimeKeeper_
std::string const & moduleLabel() const
void stopProcessingLoop()
void startEvent(StreamID)
static unsigned int getUniqueID()
Returns a unique id each time called. Intended to be passed to ModuleDescription's constructor's modI...
int totalEventsFailed() const
edm::propagate_const< std::unique_ptr< GlobalSchedule > > globalSchedule_
bool changeModule(std::string const &iLabel, ParameterSet const &iPSet, const ProductRegistry &iRegistry)
void eraseOrSetUntrackedParameterSet(std::string const &name)
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
int totalEventsPassed() const
void triggerPaths(std::vector< std::string > &oLabelsToFill) const
std::vector< PathSummary > trigPathSummaries
EventSummary eventSummary
virtual void openNewFileIfNeeded()=0
EventTimingSummary eventSummary
void clearCounters()
Clear all the counters in the trigger report.
std::vector< PathTimingSummary > trigPathSummaries
void limitOutput(ParameterSet const &proc_pset, BranchIDLists const &branchIDLists, SubProcessParentageHelper const *subProcessParentageHelper)
bool terminate() const
Return whether each output module has reached its maximum count.
void respondToOpenInputFile(FileBlock const &fb)
edm::propagate_const< std::shared_ptr< ModuleRegistry > > moduleRegistry_
virtual void writeLumi(LuminosityBlockPrincipal const &lbp, ProcessContext const *)=0
void stopPath(StreamContext const &, PathContext const &, HLTPathStatus const &)
void stopModuleEvent(StreamContext const &, ModuleCallingContext const &)
void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
void getTriggerReport(TriggerReport &rep) const
PreallocationConfiguration preallocConfig_
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
Schedule(ParameterSet &proc_pset, service::TriggerNamesService &tns, ProductRegistry &pregistry, BranchIDListHelper &branchIDListHelper, ThinnedAssociationsHelper &thinnedAssociationsHelper, SubProcessParentageHelper const *subProcessParentageHelper, ExceptionToActionTable const &actions, std::shared_ptr< ActivityRegistry > areg, std::shared_ptr< ProcessConfiguration > processConfiguration, bool hasSubprocesses, PreallocationConfiguration const &config, ProcessContext const *processContext)
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
volatile bool endpathsAreActive_
void respondToOpenInputFile(FileBlock const &fb)
std::shared_ptr< TriggerResultInserter const > resultsInserter() const
void startPath(StreamContext const &, PathContext const &)
bool search_all(ForwardSequence const &s, Datum const &d)
virtual std::unique_ptr< OutputModuleCommunicator > createOutputModuleCommunicator()=0
AllOutputModuleCommunicators all_output_communicators_
void modulesInPath(std::string const &iPathLabel, std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill in execution order the labels of all modules in path iPathLabel ...
void pauseModuleEvent(StreamContext const &, ModuleCallingContext const &)
std::shared_ptr< ProductResolverIndexHelper const > productLookup(BranchType branchType) const
void beginStream(unsigned int)
void respondToCloseInputFile(FileBlock const &fb)
void preForkReleaseResources()
void postForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
Strings const & getTrigPaths() const
void processOneEventAsync(WaitingTaskHolder iTask, unsigned int iStreamID, EventPrincipal &principal, EventSetup const &eventSetup)
void beginJob(ProductRegistry const &)
virtual void closeFile()=0
void openNewOutputFilesIfNeeded()
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
void preForkReleaseResources()
void openOutputFiles(FileBlock &fb)
std::vector< WorkerTimingSummary > workerSummaries
T mod(const T &a, const T &b)
void endJob(ExceptionCollector &collector)
void getTriggerTimingReport(TriggerTimingReport &rep) const
bool shouldWeCloseOutput() const
std::vector< std::string > vstring
void endPaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all end paths in the process
void moduleDescriptionsInPath(std::string const &iPathLabel, std::vector< ModuleDescription const * > &descriptions, unsigned int hint) const
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)