51 using std::placeholders::_1;
53 bool binary_search_string(std::vector<std::string>
const&
v,
std::string const&
s) {
54 return std::binary_search(v.begin(), v.end(),
s);
60 std::shared_ptr<TriggerResultInserter>
62 PreallocationConfiguration
const& iPrealloc,
63 ProductRegistry& preg,
64 ExceptionToActionTable
const&
actions,
65 std::shared_ptr<ActivityRegistry> areg,
66 std::shared_ptr<ProcessConfiguration> processConfiguration) {
68 ParameterSet* trig_pset = proc_pset.getPSetForUpdate(
"@trigger_paths");
69 trig_pset->registerIt();
71 WorkerParams work_args(trig_pset, preg, &iPrealloc, processConfiguration, actions);
72 ModuleDescription md(trig_pset->id(),
73 "TriggerResultInserter",
75 processConfiguration.get(),
78 areg->preModuleConstructionSignal_(md);
79 bool postCalled =
false;
80 std::shared_ptr<TriggerResultInserter> returnValue;
82 maker::ModuleHolderT<TriggerResultInserter> holder(std::make_shared<TriggerResultInserter>(*trig_pset, iPrealloc.numberOfStreams()),static_cast<Maker const*>(
nullptr));
83 holder.setModuleDescription(md);
84 holder.registerProductsAndCallbacks(&preg);
85 returnValue =holder.module();
88 areg->postModuleConstructionSignal_(md);
93 areg->postModuleConstructionSignal_(md);
104 template <
typename T>
106 makePathStatusInserters(std::vector<
edm::propagate_const<std::shared_ptr<T>>>& pathStatusInserters,
107 std::vector<std::string>
const& pathNames,
108 PreallocationConfiguration
const& iPrealloc,
109 ProductRegistry& preg,
110 std::shared_ptr<ActivityRegistry> areg,
111 std::shared_ptr<ProcessConfiguration> processConfiguration,
115 pset.addParameter<
std::string>(
"@module_type", moduleTypeName);
116 pset.addParameter<
std::string>(
"@module_edm_type",
"EDProducer");
119 pathStatusInserters.reserve(pathNames.size());
121 for (
auto const& pathName : pathNames) {
123 ModuleDescription md(pset.id(),
126 processConfiguration.get(),
129 areg->preModuleConstructionSignal_(md);
130 bool postCalled =
false;
133 maker::ModuleHolderT<T> holder(std::make_shared<T>(iPrealloc.numberOfStreams()),
134 static_cast<Maker const*>(
nullptr));
135 holder.setModuleDescription(md);
136 holder.registerProductsAndCallbacks(&preg);
137 pathStatusInserters.emplace_back(holder.module());
140 areg->postModuleConstructionSignal_(md);
145 areg->postModuleConstructionSignal_(md);
157 checkAndInsertAlias(
std::string const& friendlyClassName,
163 ProductRegistry
const& preg,
164 std::multimap<BranchKey, BranchKey>& aliasMap,
165 std::map<BranchKey, BranchKey>& aliasKeys) {
168 BranchKey
key(friendlyClassName, moduleLabel, productInstanceName, processName);
169 if(preg.productList().find(
key) == preg.productList().end()) {
172 for(
auto const& product : preg.productList()) {
173 if(moduleLabel == product.first.moduleLabel() && processName == product.first.processName()) {
175 <<
"There are no products of type '" << friendlyClassName <<
"'\n" 176 <<
"with module label '" << moduleLabel <<
"' and instance name '" << productInstanceName <<
"'.\n";
181 std::string const& theInstanceAlias(instanceAlias == star ? productInstanceName : instanceAlias);
182 BranchKey aliasKey(friendlyClassName, alias, theInstanceAlias, processName);
183 if(preg.productList().find(aliasKey) != preg.productList().end()) {
185 <<
"A product of type '" << friendlyClassName <<
"'\n" 186 <<
"with module label '" << alias <<
"' and instance name '" << theInstanceAlias <<
"'\n" 187 <<
"already exists.\n";
189 auto iter = aliasKeys.find(aliasKey);
190 if(iter != aliasKeys.end()) {
192 if(iter->second !=
key) {
194 <<
"The module label alias '" << alias <<
"' and product instance alias '" << theInstanceAlias <<
"'\n" 195 <<
"are used for multiple products of type '" << friendlyClassName <<
"'\n" 196 <<
"One has module label '" << moduleLabel <<
"' and product instance name '" << productInstanceName <<
"',\n" 197 <<
"the other has module label '" << iter->second.moduleLabel() <<
"' and product instance name '" << iter->second.productInstanceName() <<
"'.\n";
200 auto prodIter = preg.productList().find(
key);
201 if(prodIter != preg.productList().end()) {
202 if (!prodIter->second.produced()) {
204 <<
"The module label alias '" << alias <<
"' and product instance alias '" << theInstanceAlias <<
"'\n" 205 <<
"are used for a product of type '" << friendlyClassName <<
"'\n" 206 <<
"with module label '" << moduleLabel <<
"' and product instance name '" << productInstanceName <<
"',\n" 207 <<
"An EDAlias can only be used for products produced in the current process. This one is not.\n";
209 aliasMap.insert(std::make_pair(
key, aliasKey));
210 aliasKeys.insert(std::make_pair(aliasKey,
key));
217 std::vector<std::string> aliases = proc_pset.getParameter<std::vector<std::string> >(
"@all_aliases");
218 if(aliases.empty()) {
225 desc.add<
std::string>(
"fromProductInstance", star);
228 std::multimap<BranchKey, BranchKey> aliasMap;
230 std::map<BranchKey, BranchKey> aliasKeys;
234 ParameterSet const& aliasPSet = proc_pset.getParameterSet(alias);
235 std::vector<std::string> vPSetNames = aliasPSet.getParameterNamesForType<
VParameterSet>();
243 if(productInstanceName == star) {
245 BranchKey lowerBound(friendlyClassName, moduleLabel,
empty,
empty);
246 for(ProductRegistry::ProductList::const_iterator it = preg.productList().lower_bound(lowerBound);
247 it != preg.productList().end() && it->first.friendlyClassName() == friendlyClassName && it->first.moduleLabel() == moduleLabel;
254 checkAndInsertAlias(friendlyClassName, moduleLabel, it->first.productInstanceName(),
processName,
alias, instanceAlias, preg, aliasMap, aliasKeys);
259 for(
auto const& product : preg.productList()) {
260 if(moduleLabel == product.first.moduleLabel() && processName == product.first.processName()) {
262 <<
"There are no products of type '" << friendlyClassName <<
"'\n" 263 <<
"with module label '" << moduleLabel <<
"'.\n";
268 checkAndInsertAlias(friendlyClassName, moduleLabel, productInstanceName, processName, alias, instanceAlias, preg, aliasMap, aliasKeys);
276 for(
auto const& aliasEntry : aliasMap) {
277 ProductRegistry::ProductList::const_iterator it = preg.productList().find(aliasEntry.first);
278 assert(it != preg.productList().end());
279 preg.addLabelAlias(it->second, aliasEntry.second.moduleLabel(), aliasEntry.second.productInstanceName());
284 typedef std::vector<std::string>
vstring;
287 vstring
const& end_path_name_list,
288 vstring& modulesInConfig,
289 std::set<std::string>
const& usedModuleLabels,
290 std::map<
std::string, std::vector<std::pair<std::string, int> > >& outputModulePathPositions) {
302 vstring outputModuleLabels;
304 std::string const moduleEdmType(
"@module_edm_type");
310 std::set<std::string> modulesInConfigSet(modulesInConfig.begin(), modulesInConfig.end());
314 vstring scheduledPaths = proc_pset.getParameter<vstring>(
"@paths");
315 std::set<std::string> modulesOnPaths;
317 std::set<std::string> noEndPaths(scheduledPaths.begin(),scheduledPaths.end());
318 for(
auto const& endPath: end_path_name_list) {
319 noEndPaths.erase(endPath);
323 for(
auto const&
path: noEndPaths) {
324 labels = proc_pset.getParameter<vstring>(
path);
325 modulesOnPaths.insert(labels.begin(),labels.end());
331 std::vector<std::string> labelsToBeDropped;
332 labelsToBeDropped.reserve(modulesInConfigSet.size());
333 std::set_difference(modulesInConfigSet.begin(),modulesInConfigSet.end(),
334 usedModuleLabels.begin(),usedModuleLabels.end(),
335 std::back_inserter(labelsToBeDropped));
337 const unsigned int sizeBeforeOutputModules = labelsToBeDropped.size();
338 for (
auto const& modLabel: usedModuleLabels) {
342 edmType = proc_pset.getParameterSet(modLabel).getParameter<
std::string>(moduleEdmType);
343 if (edmType == outputModule) {
344 outputModuleLabels.push_back(modLabel);
345 labelsToBeDropped.push_back(modLabel);
347 if(edmType == edAnalyzer) {
348 if(modulesOnPaths.end()==modulesOnPaths.find(modLabel)) {
349 labelsToBeDropped.push_back(modLabel);
355 std::inplace_merge(labelsToBeDropped.begin(),
356 labelsToBeDropped.begin()+sizeBeforeOutputModules,
357 labelsToBeDropped.end());
363 vstring::iterator endAfterRemove = std::remove_if(modulesInConfig.begin(), modulesInConfig.end(), std::bind(binary_search_string, std::ref(labelsToBeDropped), _1));
364 modulesInConfig.erase(endAfterRemove, modulesInConfig.end());
365 proc_pset.addParameter<vstring>(
std::string(
"@all_modules"), modulesInConfig);
368 vstring endPathsToBeDropped;
370 for (vstring::const_iterator iEndPath = end_path_name_list.begin(), endEndPath = end_path_name_list.end();
371 iEndPath != endEndPath;
373 labels = proc_pset.getParameter<vstring>(*iEndPath);
374 vstring::iterator iSave = labels.begin();
375 vstring::iterator iBegin = labels.begin();
377 for (vstring::iterator iLabel = labels.begin(), iEnd = labels.end();
378 iLabel != iEnd; ++iLabel) {
379 if (binary_search_string(labelsToBeDropped, *iLabel)) {
380 if (binary_search_string(outputModuleLabels, *iLabel)) {
381 outputModulePathPositions[*iLabel].emplace_back(*iEndPath, iSave - iBegin);
384 if (iSave != iLabel) {
385 iSave->swap(*iLabel);
390 labels.erase(iSave, labels.end());
391 if (labels.empty()) {
393 proc_pset.eraseSimpleParameter(*iEndPath);
394 endPathsToBeDropped.push_back(*iEndPath);
396 proc_pset.addParameter<vstring>(*iEndPath,
labels);
402 endAfterRemove = std::remove_if(scheduledPaths.begin(), scheduledPaths.end(), std::bind(binary_search_string, std::ref(endPathsToBeDropped), _1));
403 scheduledPaths.erase(endAfterRemove, scheduledPaths.end());
404 proc_pset.addParameter<vstring>(
std::string(
"@paths"), scheduledPaths);
407 vstring scheduledEndPaths = proc_pset.getParameter<vstring>(
"@end_paths");
408 endAfterRemove = std::remove_if(scheduledEndPaths.begin(), scheduledEndPaths.end(), std::bind(binary_search_string, std::ref(endPathsToBeDropped), _1));
409 scheduledEndPaths.erase(endAfterRemove, scheduledEndPaths.end());
410 proc_pset.addParameter<vstring>(
std::string(
"@end_paths"), scheduledEndPaths);
414 class RngEDConsumer :
public EDConsumerBase {
416 explicit RngEDConsumer(std::set<TypeID>& typesConsumed) {
418 if(rng.isAvailable()) {
419 rng->consumes(consumesCollector());
420 for (
auto const& consumesInfo : this->consumesInfo()) {
421 typesConsumed.emplace(consumesInfo.type());
440 std::shared_ptr<ActivityRegistry> areg,
441 std::shared_ptr<ProcessConfiguration> processConfiguration,
442 bool hasSubprocesses,
446 resultsInserter_{tns.
getTrigPaths().empty()? std::shared_ptr<TriggerResultInserter>{} :makeInserter(proc_pset,prealloc,preg,actions,areg,processConfiguration)},
460 processConfiguration,
468 processConfiguration,
471 assert(0<prealloc.numberOfStreams());
473 for(
unsigned int i=0;
i<prealloc.numberOfStreams();++
i) {
479 proc_pset,tns,prealloc,preg,
480 branchIDListHelper,actions,
481 areg,processConfiguration,
489 const std::string kTriggerResults(
"TriggerResults");
490 std::vector<std::string> modulesToUse;
493 if(worker->description().moduleLabel() != kTriggerResults) {
494 modulesToUse.push_back(worker->description().moduleLabel());
500 std::vector<std::string>
temp;
501 temp.reserve(modulesToUse.size());
502 auto itBeginUnscheduled = modulesToUse.begin()+modulesToUse.size()-
n;
503 std::copy(itBeginUnscheduled,modulesToUse.end(),
504 std::back_inserter(temp));
505 std::copy(modulesToUse.begin(),itBeginUnscheduled,std::back_inserter(temp));
506 temp.swap(modulesToUse);
516 proc_pset, preg, prealloc,
517 actions,areg,processConfiguration,processContext);
521 std::set<std::string> usedModuleLabels;
523 if(worker->description().moduleLabel() != kTriggerResults) {
524 usedModuleLabels.insert(worker->description().moduleLabel());
527 std::vector<std::string> modulesInConfig(proc_pset.getParameter<std::vector<std::string> >(
"@all_modules"));
528 std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions;
529 reduceParameterSet(proc_pset, tns.getEndPaths(), modulesInConfig, usedModuleLabels,
530 outputModulePathPositions);
531 processEDAliases(proc_pset, processConfiguration->processName(), preg);
532 proc_pset.registerIt();
533 processConfiguration->setParameterSetID(proc_pset.id());
534 processConfiguration->setProcessConfigurationID();
538 size_t all_workers_count =
allWorkers().size();
547 limitOutput(proc_pset, branchIDListHelper.branchIDLists(), subProcessParentageHelper);
553 branchIDListHelper.updateFromRegistry(preg);
556 worker->registerThinnedAssociations(preg, thinnedAssociationsHelper);
558 thinnedAssociationsHelper.sort();
563 c->selectProducts(preg, thinnedAssociationsHelper);
568 std::set<TypeID> productTypesConsumed;
569 std::set<TypeID> elementTypesConsumed;
572 for (
auto const& consumesInfo : worker->consumesInfo()) {
574 productTypesConsumed.emplace(consumesInfo.type());
576 elementTypesConsumed.emplace(consumesInfo.type());
581 if(hasSubprocesses) {
586 RngEDConsumer rngConsumer = RngEDConsumer(productTypesConsumed);
588 preg.setFrozen(productTypesConsumed, elementTypesConsumed, processConfiguration->processName());
591 for (
auto&
c : all_output_communicators_) {
592 c->setEventSelectionInfo(outputModulePathPositions, preg.anyProductProduced());
596 std::vector<const ModuleDescription*> modDesc;
598 modDesc.reserve(workers.size());
601 std::back_inserter(modDesc),
603 return iWorker->descPtr();
608 prealloc.numberOfStreams(),
612 auto timeKeeperPtr = summaryTimeKeeper_.get();
642 int maxEventSpecs = 0;
643 int maxEventsOut = -1;
650 std::vector<std::string> psetNamesE;
657 if (maxEventSpecs > 1) {
659 "\nAt most, one form of 'output' may appear in the 'maxEvents' parameter set";
664 if (vMaxEventsOut != 0 && !vMaxEventsOut->
empty()) {
665 std::string const& moduleLabel =
c->description().moduleLabel();
670 "\nNo entry in 'maxEvents' for output module label '" << moduleLabel <<
"'.\n";
682 if (!
c->limitReached()) {
687 LogInfo(
"SuccessfulTermination")
688 <<
"The job is terminating successfully because each output module\n" 689 <<
"has reached its configured limit.\n";
710 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Event Summary ------------";
725 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Path Summary ------------";
727 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 728 << std::right << std::setw(10) <<
"Executed" <<
" " 729 << std::right << std::setw(10) <<
"Passed" <<
" " 730 << std::right << std::setw(10) <<
"Failed" <<
" " 731 << std::right << std::setw(10) <<
"Error" <<
" " 735 << std::right << std::setw(5) << 1
736 << std::right << std::setw(5) <<
p.bitPosition <<
" " 737 << std::right << std::setw(10) <<
p.timesRun <<
" " 738 << std::right << std::setw(10) <<
p.timesPassed <<
" " 739 << std::right << std::setw(10) <<
p.timesFailed <<
" " 740 << std::right << std::setw(10) <<
p.timesExcept <<
" " 762 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"-------End-Path Summary ------------";
764 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 765 << std::right << std::setw(10) <<
"Executed" <<
" " 766 << std::right << std::setw(10) <<
"Passed" <<
" " 767 << std::right << std::setw(10) <<
"Failed" <<
" " 768 << std::right << std::setw(10) <<
"Error" <<
" " 772 << std::right << std::setw(5) << 0
773 << std::right << std::setw(5) <<
p.bitPosition <<
" " 774 << std::right << std::setw(10) <<
p.timesRun <<
" " 775 << std::right << std::setw(10) <<
p.timesPassed <<
" " 776 << std::right << std::setw(10) <<
p.timesFailed <<
" " 777 << std::right << std::setw(10) <<
p.timesExcept <<
" " 783 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Modules in Path: " <<
p.name <<
" ------------";
785 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 786 << std::right << std::setw(10) <<
"Visited" <<
" " 787 << std::right << std::setw(10) <<
"Passed" <<
" " 788 << std::right << std::setw(10) <<
"Failed" <<
" " 789 << std::right << std::setw(10) <<
"Error" <<
" " 792 unsigned int bitpos = 0;
793 for (
auto const&
mod:
p.moduleInPathSummaries) {
795 << std::right << std::setw(5) << 1
796 << std::right << std::setw(5) << bitpos <<
" " 797 << std::right << std::setw(10) <<
mod.timesVisited <<
" " 798 << std::right << std::setw(10) <<
mod.timesPassed <<
" " 799 << std::right << std::setw(10) <<
mod.timesFailed <<
" " 800 << std::right << std::setw(10) <<
mod.timesExcept <<
" " 801 <<
mod.moduleLabel <<
"";
808 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"------ Modules in End-Path: " <<
p.name <<
" ------------";
810 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 811 << std::right << std::setw(10) <<
"Visited" <<
" " 812 << std::right << std::setw(10) <<
"Passed" <<
" " 813 << std::right << std::setw(10) <<
"Failed" <<
" " 814 << std::right << std::setw(10) <<
"Error" <<
" " 817 unsigned int bitpos=0;
818 for (
auto const&
mod:
p.moduleInPathSummaries) {
820 << std::right << std::setw(5) << 0
821 << std::right << std::setw(5) << bitpos <<
" " 822 << std::right << std::setw(10) <<
mod.timesVisited <<
" " 823 << std::right << std::setw(10) <<
mod.timesPassed <<
" " 824 << std::right << std::setw(10) <<
mod.timesFailed <<
" " 825 << std::right << std::setw(10) <<
mod.timesExcept <<
" " 826 <<
mod.moduleLabel <<
"";
832 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Module Summary ------------";
834 << std::right << std::setw(10) <<
"Visited" <<
" " 835 << std::right << std::setw(10) <<
"Executed" <<
" " 836 << std::right << std::setw(10) <<
"Passed" <<
" " 837 << std::right << std::setw(10) <<
"Failed" <<
" " 838 << std::right << std::setw(10) <<
"Error" <<
" " 842 << std::right << std::setw(10) << worker.timesVisited <<
" " 843 << std::right << std::setw(10) << worker.timesRun <<
" " 844 << std::right << std::setw(10) << worker.timesPassed <<
" " 845 << std::right << std::setw(10) << worker.timesFailed <<
" " 846 << std::right << std::setw(10) << worker.timesExcept <<
" " 847 << worker.moduleLabel <<
"";
857 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Event Summary ---[sec]----";
875 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Path Summary ---[Real sec]----";
877 << std::right << std::setw(kColumn1Size) <<
"per event"<<
" " 878 << std::right << std::setw(kColumn2Size) <<
"per exec" 881 const int timesRun =
std::max(1,
p.timesRun);
884 << std::right << std::setw(kColumn1Size) <<
p.realTime/totalEvents <<
" " 885 << std::right << std::setw(kColumn2Size) <<
p.realTime/timesRun <<
" " 889 << std::right << std::setw(kColumn1Size) <<
"per event"<<
" " 890 << std::right << std::setw(kColumn2Size) <<
"per exec" 894 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"-------End-Path Summary ---[Real sec]----";
896 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 897 << std::right << std::setw(kColumn2Size) <<
"per exec" 900 const int timesRun =
std::max(1,
p.timesRun);
904 << std::right << std::setw(kColumn1Size) <<
p.realTime/totalEvents <<
" " 905 << std::right << std::setw(kColumn2Size) <<
p.realTime/timesRun <<
" " 909 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 910 << std::right << std::setw(kColumn2Size) <<
"per exec" 915 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Modules in Path: " <<
p.name <<
" ---[Real sec]----";
917 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 918 << std::right << std::setw(kColumn2Size) <<
"per visit" 920 for (
auto const&
mod:
p.moduleInPathSummaries) {
923 << std::right << std::setw(kColumn1Size) <<
mod.realTime/totalEvents <<
" " 924 << std::right << std::setw(kColumn2Size) <<
mod.realTime/
std::max(1,
mod.timesVisited) <<
" " 925 <<
mod.moduleLabel <<
"";
930 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 931 << std::right << std::setw(kColumn2Size) <<
"per visit" 936 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"------ Modules in End-Path: " <<
p.name <<
" ---[Real sec]----";
938 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 939 << std::right << std::setw(kColumn2Size) <<
"per visit" 941 for (
auto const&
mod:
p.moduleInPathSummaries) {
944 << std::right << std::setw(kColumn1Size) <<
mod.realTime/totalEvents <<
" " 945 << std::right << std::setw(kColumn2Size) <<
mod.realTime/
std::max(1,
mod.timesVisited) <<
" " 946 <<
mod.moduleLabel <<
"";
951 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 952 << std::right << std::setw(kColumn2Size) <<
"per visit" 956 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Module Summary ---[Real sec]----";
958 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 959 << std::right << std::setw(kColumn2Size) <<
"per exec" <<
" " 960 << std::right << std::setw(kColumn3Size) <<
"per visit" 965 << std::right << std::setw(kColumn1Size) << worker.realTime/totalEvents <<
" " 966 << std::right << std::setw(kColumn2Size) << worker.realTime/
std::max(1, worker.timesRun) <<
" " 967 << std::right << std::setw(kColumn3Size) << worker.realTime/
std::max(1, worker.timesVisited) <<
" " 968 << worker.moduleLabel <<
"";
971 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 972 << std::right << std::setw(kColumn2Size) <<
"per exec" <<
" " 973 << std::right << std::setw(kColumn3Size) <<
"per visit" 977 LogVerbatim(
"FwkSummary") <<
"T---Report end!" <<
"";
982 using std::placeholders::_1;
987 using std::placeholders::_1;
992 using std::placeholders::_1;
997 using std::placeholders::_1;
1002 using std::placeholders::_1;
1010 using std::placeholders::_1;
1015 using std::placeholders::_1;
1034 unsigned int iStreamID,
1046 if (worker->description().moduleLabel() == iLabel) {
1051 if (
nullptr == found) {
1060 s->replaceModule(newMod,iLabel);
1076 std::vector<ModuleDescription const*>
1078 std::vector<ModuleDescription const*>
result;
1083 result.push_back(p);
1095 worker->convertCurrentProcessAlias(processName);
1117 std::vector<std::string>& oLabelsToFill)
const {
1123 std::vector<ModuleDescription const*>& descriptions,
1124 unsigned int hint)
const {
1125 streamSchedules_[0]->moduleDescriptionsInPath(iPathLabel, descriptions, hint);
1130 std::vector<ModuleDescription const*>& descriptions,
1131 unsigned int hint)
const {
1132 streamSchedules_[0]->moduleDescriptionsInEndPath(iEndPathLabel, descriptions, hint);
1137 std::vector<std::pair<unsigned int, unsigned int> >& moduleIDToIndex,
1138 std::vector<std::vector<ModuleDescription const*> >& modulesWhoseProductsAreConsumedBy,
1140 allModuleDescriptions.clear();
1141 moduleIDToIndex.clear();
1142 modulesWhoseProductsAreConsumedBy.clear();
1148 std::map<std::string, ModuleDescription const*> labelToDesc;
1152 allModuleDescriptions.push_back(p);
1153 moduleIDToIndex.push_back(std::pair<unsigned int, unsigned int>(p->
id(),
i));
1161 std::vector<ModuleDescription const*>&
modules = modulesWhoseProductsAreConsumedBy.at(i);
1162 worker->modulesWhoseProductsAreConsumed(modules, preg, labelToDesc);
1171 s->enableEndPaths(active);
1186 s->getTriggerReport(rep);
1201 int returnValue = 0;
1203 returnValue += s->totalEvents();
1210 int returnValue = 0;
1212 returnValue += s->totalEventsPassed();
1219 int returnValue = 0;
1221 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
std::vector< std::string > const * pathNames_
void convertCurrentProcessAlias(std::string const &processName)
Convert "@currentProcess" in InputTag process names to the actual current process name...
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
std::vector< edm::propagate_const< std::shared_ptr< PathStatusInserter > > > pathStatusInserters_
EventTimingSummary eventSummary
void clearCounters()
Clear all the counters in the trigger report.
Schedule(ParameterSet &proc_pset, service::TriggerNamesService const &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)
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 getTriggerReport(TriggerReport &rep) const
PreallocationConfiguration preallocConfig_
std::vector< edm::propagate_const< std::shared_ptr< StreamSchedule > > > streamSchedules_
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)
std::vector< edm::propagate_const< std::shared_ptr< EndPathStatusInserter > > > endPathStatusInserters_
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)
std::vector< std::string > const * endPathNames_
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
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
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)