52 using std::placeholders::_1;
54 bool binary_search_string(std::vector<std::string>
const&
v,
std::string const&
s) {
55 return std::binary_search(v.begin(), v.end(),
s);
61 std::shared_ptr<TriggerResultInserter>
63 PreallocationConfiguration
const& iPrealloc,
64 ProductRegistry& preg,
65 ExceptionToActionTable
const&
actions,
66 std::shared_ptr<ActivityRegistry> areg,
67 std::shared_ptr<ProcessConfiguration> processConfiguration) {
69 ParameterSet* trig_pset = proc_pset.getPSetForUpdate(
"@trigger_paths");
70 trig_pset->registerIt();
72 WorkerParams work_args(trig_pset, preg, &iPrealloc, processConfiguration, actions);
73 ModuleDescription md(trig_pset->id(),
74 "TriggerResultInserter",
76 processConfiguration.get(),
79 areg->preModuleConstructionSignal_(md);
80 bool postCalled =
false;
81 std::shared_ptr<TriggerResultInserter> returnValue;
83 maker::ModuleHolderT<TriggerResultInserter> holder(std::make_shared<TriggerResultInserter>(*trig_pset, iPrealloc.numberOfStreams()),static_cast<Maker const*>(
nullptr));
84 holder.setModuleDescription(md);
85 holder.registerProductsAndCallbacks(&preg);
86 returnValue =holder.module();
89 areg->postModuleConstructionSignal_(md);
94 areg->postModuleConstructionSignal_(md);
105 template <
typename T>
107 makePathStatusInserters(std::vector<
edm::propagate_const<std::shared_ptr<T>>>& pathStatusInserters,
108 std::vector<std::string>
const& pathNames,
109 PreallocationConfiguration
const& iPrealloc,
110 ProductRegistry& preg,
111 std::shared_ptr<ActivityRegistry> areg,
112 std::shared_ptr<ProcessConfiguration> processConfiguration,
116 pset.addParameter<
std::string>(
"@module_type", moduleTypeName);
117 pset.addParameter<
std::string>(
"@module_edm_type",
"EDProducer");
120 pathStatusInserters.reserve(pathNames.size());
122 for (
auto const& pathName : pathNames) {
124 ModuleDescription md(pset.id(),
127 processConfiguration.get(),
130 areg->preModuleConstructionSignal_(md);
131 bool postCalled =
false;
134 maker::ModuleHolderT<T> holder(std::make_shared<T>(iPrealloc.numberOfStreams()),
135 static_cast<Maker const*>(
nullptr));
136 holder.setModuleDescription(md);
137 holder.registerProductsAndCallbacks(&preg);
138 pathStatusInserters.emplace_back(holder.module());
141 areg->postModuleConstructionSignal_(md);
146 areg->postModuleConstructionSignal_(md);
158 checkAndInsertAlias(
std::string const& friendlyClassName,
164 ProductRegistry
const& preg,
165 std::multimap<BranchKey, BranchKey>& aliasMap,
166 std::map<BranchKey, BranchKey>& aliasKeys) {
169 BranchKey
key(friendlyClassName, moduleLabel, productInstanceName, processName);
170 if(preg.productList().find(
key) == preg.productList().end()) {
173 for(
auto const& product : preg.productList()) {
174 if(moduleLabel == product.first.moduleLabel() && processName == product.first.processName()) {
176 <<
"There are no products of type '" << friendlyClassName <<
"'\n" 177 <<
"with module label '" << moduleLabel <<
"' and instance name '" << productInstanceName <<
"'.\n";
182 std::string const& theInstanceAlias(instanceAlias == star ? productInstanceName : instanceAlias);
183 BranchKey aliasKey(friendlyClassName, alias, theInstanceAlias, processName);
184 if(preg.productList().find(aliasKey) != preg.productList().end()) {
186 <<
"A product of type '" << friendlyClassName <<
"'\n" 187 <<
"with module label '" << alias <<
"' and instance name '" << theInstanceAlias <<
"'\n" 188 <<
"already exists.\n";
190 auto iter = aliasKeys.find(aliasKey);
191 if(iter != aliasKeys.end()) {
193 if(iter->second !=
key) {
195 <<
"The module label alias '" << alias <<
"' and product instance alias '" << theInstanceAlias <<
"'\n" 196 <<
"are used for multiple products of type '" << friendlyClassName <<
"'\n" 197 <<
"One has module label '" << moduleLabel <<
"' and product instance name '" << productInstanceName <<
"',\n" 198 <<
"the other has module label '" << iter->second.moduleLabel() <<
"' and product instance name '" << iter->second.productInstanceName() <<
"'.\n";
201 auto prodIter = preg.productList().find(
key);
202 if(prodIter != preg.productList().end()) {
203 if (!prodIter->second.produced()) {
205 <<
"The module label alias '" << alias <<
"' and product instance alias '" << theInstanceAlias <<
"'\n" 206 <<
"are used for a product of type '" << friendlyClassName <<
"'\n" 207 <<
"with module label '" << moduleLabel <<
"' and product instance name '" << productInstanceName <<
"',\n" 208 <<
"An EDAlias can only be used for products produced in the current process. This one is not.\n";
210 aliasMap.insert(std::make_pair(
key, aliasKey));
211 aliasKeys.insert(std::make_pair(aliasKey,
key));
218 std::vector<std::string> aliases = proc_pset.getParameter<std::vector<std::string> >(
"@all_aliases");
219 if(aliases.empty()) {
226 desc.add<
std::string>(
"fromProductInstance", star);
229 std::multimap<BranchKey, BranchKey> aliasMap;
231 std::map<BranchKey, BranchKey> aliasKeys;
235 ParameterSet const& aliasPSet = proc_pset.getParameterSet(alias);
236 std::vector<std::string> vPSetNames = aliasPSet.getParameterNamesForType<
VParameterSet>();
244 if(productInstanceName == star) {
246 BranchKey lowerBound(friendlyClassName, moduleLabel,
empty,
empty);
247 for(ProductRegistry::ProductList::const_iterator it = preg.productList().lower_bound(lowerBound);
248 it != preg.productList().end() && it->first.friendlyClassName() == friendlyClassName && it->first.moduleLabel() == moduleLabel;
255 checkAndInsertAlias(friendlyClassName, moduleLabel, it->first.productInstanceName(),
processName,
alias, instanceAlias, preg, aliasMap, aliasKeys);
260 for(
auto const& product : preg.productList()) {
261 if(moduleLabel == product.first.moduleLabel() && processName == product.first.processName()) {
263 <<
"There are no products of type '" << friendlyClassName <<
"'\n" 264 <<
"with module label '" << moduleLabel <<
"'.\n";
269 checkAndInsertAlias(friendlyClassName, moduleLabel, productInstanceName, processName, alias, instanceAlias, preg, aliasMap, aliasKeys);
277 for(
auto const& aliasEntry : aliasMap) {
278 ProductRegistry::ProductList::const_iterator it = preg.productList().find(aliasEntry.first);
279 assert(it != preg.productList().end());
280 preg.addLabelAlias(it->second, aliasEntry.second.moduleLabel(), aliasEntry.second.productInstanceName());
285 typedef std::vector<std::string>
vstring;
288 vstring
const& end_path_name_list,
289 vstring& modulesInConfig,
290 std::set<std::string>
const& usedModuleLabels,
291 std::map<
std::string, std::vector<std::pair<std::string, int> > >& outputModulePathPositions) {
303 vstring outputModuleLabels;
305 std::string const moduleEdmType(
"@module_edm_type");
311 std::set<std::string> modulesInConfigSet(modulesInConfig.begin(), modulesInConfig.end());
315 vstring scheduledPaths = proc_pset.getParameter<vstring>(
"@paths");
316 std::set<std::string> modulesOnPaths;
318 std::set<std::string> noEndPaths(scheduledPaths.begin(),scheduledPaths.end());
319 for(
auto const& endPath: end_path_name_list) {
320 noEndPaths.erase(endPath);
324 for(
auto const&
path: noEndPaths) {
325 labels = proc_pset.getParameter<vstring>(
path);
326 modulesOnPaths.insert(labels.begin(),labels.end());
332 std::vector<std::string> labelsToBeDropped;
333 labelsToBeDropped.reserve(modulesInConfigSet.size());
334 std::set_difference(modulesInConfigSet.begin(),modulesInConfigSet.end(),
335 usedModuleLabels.begin(),usedModuleLabels.end(),
336 std::back_inserter(labelsToBeDropped));
338 const unsigned int sizeBeforeOutputModules = labelsToBeDropped.size();
339 for (
auto const& modLabel: usedModuleLabels) {
343 edmType = proc_pset.getParameterSet(modLabel).getParameter<
std::string>(moduleEdmType);
344 if (edmType == outputModule) {
345 outputModuleLabels.push_back(modLabel);
346 labelsToBeDropped.push_back(modLabel);
348 if(edmType == edAnalyzer) {
349 if(modulesOnPaths.end()==modulesOnPaths.find(modLabel)) {
350 labelsToBeDropped.push_back(modLabel);
356 std::inplace_merge(labelsToBeDropped.begin(),
357 labelsToBeDropped.begin()+sizeBeforeOutputModules,
358 labelsToBeDropped.end());
364 vstring::iterator endAfterRemove = std::remove_if(modulesInConfig.begin(), modulesInConfig.end(), std::bind(binary_search_string, std::ref(labelsToBeDropped), _1));
365 modulesInConfig.erase(endAfterRemove, modulesInConfig.end());
366 proc_pset.addParameter<vstring>(
std::string(
"@all_modules"), modulesInConfig);
369 vstring endPathsToBeDropped;
371 for (vstring::const_iterator iEndPath = end_path_name_list.begin(), endEndPath = end_path_name_list.end();
372 iEndPath != endEndPath;
374 labels = proc_pset.getParameter<vstring>(*iEndPath);
375 vstring::iterator iSave = labels.begin();
376 vstring::iterator iBegin = labels.begin();
378 for (vstring::iterator iLabel = labels.begin(), iEnd = labels.end();
379 iLabel != iEnd; ++iLabel) {
380 if (binary_search_string(labelsToBeDropped, *iLabel)) {
381 if (binary_search_string(outputModuleLabels, *iLabel)) {
382 outputModulePathPositions[*iLabel].emplace_back(*iEndPath, iSave - iBegin);
385 if (iSave != iLabel) {
386 iSave->swap(*iLabel);
391 labels.erase(iSave, labels.end());
392 if (labels.empty()) {
394 proc_pset.eraseSimpleParameter(*iEndPath);
395 endPathsToBeDropped.push_back(*iEndPath);
397 proc_pset.addParameter<vstring>(*iEndPath,
labels);
403 endAfterRemove = std::remove_if(scheduledPaths.begin(), scheduledPaths.end(), std::bind(binary_search_string, std::ref(endPathsToBeDropped), _1));
404 scheduledPaths.erase(endAfterRemove, scheduledPaths.end());
405 proc_pset.addParameter<vstring>(
std::string(
"@paths"), scheduledPaths);
408 vstring scheduledEndPaths = proc_pset.getParameter<vstring>(
"@end_paths");
409 endAfterRemove = std::remove_if(scheduledEndPaths.begin(), scheduledEndPaths.end(), std::bind(binary_search_string, std::ref(endPathsToBeDropped), _1));
410 scheduledEndPaths.erase(endAfterRemove, scheduledEndPaths.end());
411 proc_pset.addParameter<vstring>(
std::string(
"@end_paths"), scheduledEndPaths);
415 class RngEDConsumer :
public EDConsumerBase {
417 explicit RngEDConsumer(std::set<TypeID>& typesConsumed) {
419 if(rng.isAvailable()) {
420 rng->consumes(consumesCollector());
421 for (
auto const& consumesInfo : this->consumesInfo()) {
422 typesConsumed.emplace(consumesInfo.type());
441 std::shared_ptr<ActivityRegistry> areg,
442 std::shared_ptr<ProcessConfiguration> processConfiguration,
443 bool hasSubprocesses,
447 resultsInserter_{tns.
getTrigPaths().empty()? std::shared_ptr<TriggerResultInserter>{} :makeInserter(proc_pset,prealloc,preg,actions,areg,processConfiguration)},
461 processConfiguration,
469 processConfiguration,
472 assert(0<prealloc.numberOfStreams());
474 for(
unsigned int i=0;
i<prealloc.numberOfStreams();++
i) {
480 proc_pset,tns,prealloc,preg,
481 branchIDListHelper,actions,
482 areg,processConfiguration,
490 const std::string kTriggerResults(
"TriggerResults");
491 std::vector<std::string> modulesToUse;
494 if(worker->description().moduleLabel() != kTriggerResults) {
495 modulesToUse.push_back(worker->description().moduleLabel());
501 std::vector<std::string>
temp;
502 temp.reserve(modulesToUse.size());
503 auto itBeginUnscheduled = modulesToUse.begin()+modulesToUse.size()-
n;
504 std::copy(itBeginUnscheduled,modulesToUse.end(),
505 std::back_inserter(temp));
506 std::copy(modulesToUse.begin(),itBeginUnscheduled,std::back_inserter(temp));
507 temp.swap(modulesToUse);
517 proc_pset, preg, prealloc,
518 actions,areg,processConfiguration,processContext);
522 std::set<std::string> usedModuleLabels;
524 if(worker->description().moduleLabel() != kTriggerResults) {
525 usedModuleLabels.insert(worker->description().moduleLabel());
528 std::vector<std::string> modulesInConfig(proc_pset.getParameter<std::vector<std::string> >(
"@all_modules"));
529 std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions;
530 reduceParameterSet(proc_pset, tns.getEndPaths(), modulesInConfig, usedModuleLabels,
531 outputModulePathPositions);
532 processEDAliases(proc_pset, processConfiguration->processName(), preg);
533 proc_pset.registerIt();
534 processConfiguration->setParameterSetID(proc_pset.id());
535 processConfiguration->setProcessConfigurationID();
539 size_t all_workers_count =
allWorkers().size();
548 limitOutput(proc_pset, branchIDListHelper.branchIDLists(), subProcessParentageHelper);
554 branchIDListHelper.updateFromRegistry(preg);
557 worker->registerThinnedAssociations(preg, thinnedAssociationsHelper);
559 thinnedAssociationsHelper.sort();
564 c->selectProducts(preg, thinnedAssociationsHelper);
569 std::set<TypeID> productTypesConsumed;
570 std::set<TypeID> elementTypesConsumed;
573 for (
auto const& consumesInfo : worker->consumesInfo()) {
575 productTypesConsumed.emplace(consumesInfo.type());
577 elementTypesConsumed.emplace(consumesInfo.type());
582 if(hasSubprocesses) {
587 RngEDConsumer rngConsumer = RngEDConsumer(productTypesConsumed);
589 preg.setFrozen(productTypesConsumed, elementTypesConsumed, processConfiguration->processName());
592 for (
auto&
c : all_output_communicators_) {
593 c->setEventSelectionInfo(outputModulePathPositions, preg.anyProductProduced());
597 std::vector<const ModuleDescription*> modDesc;
599 modDesc.reserve(workers.size());
602 std::back_inserter(modDesc),
604 return iWorker->descPtr();
609 prealloc.numberOfStreams(),
613 auto timeKeeperPtr = summaryTimeKeeper_.get();
645 int maxEventSpecs = 0;
646 int maxEventsOut = -1;
653 std::vector<std::string> psetNamesE;
660 if (maxEventSpecs > 1) {
662 "\nAt most, one form of 'output' may appear in the 'maxEvents' parameter set";
667 if (vMaxEventsOut !=
nullptr && !vMaxEventsOut->
empty()) {
668 std::string const& moduleLabel =
c->description().moduleLabel();
673 "\nNo entry in 'maxEvents' for output module label '" << moduleLabel <<
"'.\n";
685 if (!
c->limitReached()) {
690 LogInfo(
"SuccessfulTermination")
691 <<
"The job is terminating successfully because each output module\n" 692 <<
"has reached its configured limit.\n";
713 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Event Summary ------------";
728 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Path Summary ------------";
730 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 731 << std::right << std::setw(10) <<
"Executed" <<
" " 732 << std::right << std::setw(10) <<
"Passed" <<
" " 733 << std::right << std::setw(10) <<
"Failed" <<
" " 734 << std::right << std::setw(10) <<
"Error" <<
" " 738 << std::right << std::setw(5) << 1
739 << std::right << std::setw(5) <<
p.bitPosition <<
" " 740 << std::right << std::setw(10) <<
p.timesRun <<
" " 741 << std::right << std::setw(10) <<
p.timesPassed <<
" " 742 << std::right << std::setw(10) <<
p.timesFailed <<
" " 743 << std::right << std::setw(10) <<
p.timesExcept <<
" " 765 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"-------End-Path Summary ------------";
767 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 768 << std::right << std::setw(10) <<
"Executed" <<
" " 769 << std::right << std::setw(10) <<
"Passed" <<
" " 770 << std::right << std::setw(10) <<
"Failed" <<
" " 771 << std::right << std::setw(10) <<
"Error" <<
" " 775 << std::right << std::setw(5) << 0
776 << std::right << std::setw(5) <<
p.bitPosition <<
" " 777 << std::right << std::setw(10) <<
p.timesRun <<
" " 778 << std::right << std::setw(10) <<
p.timesPassed <<
" " 779 << std::right << std::setw(10) <<
p.timesFailed <<
" " 780 << std::right << std::setw(10) <<
p.timesExcept <<
" " 786 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Modules in Path: " <<
p.name <<
" ------------";
788 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 789 << std::right << std::setw(10) <<
"Visited" <<
" " 790 << std::right << std::setw(10) <<
"Passed" <<
" " 791 << std::right << std::setw(10) <<
"Failed" <<
" " 792 << std::right << std::setw(10) <<
"Error" <<
" " 795 unsigned int bitpos = 0;
796 for (
auto const&
mod:
p.moduleInPathSummaries) {
798 << std::right << std::setw(5) << 1
799 << std::right << std::setw(5) << bitpos <<
" " 800 << std::right << std::setw(10) <<
mod.timesVisited <<
" " 801 << std::right << std::setw(10) <<
mod.timesPassed <<
" " 802 << std::right << std::setw(10) <<
mod.timesFailed <<
" " 803 << std::right << std::setw(10) <<
mod.timesExcept <<
" " 804 <<
mod.moduleLabel <<
"";
811 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"------ Modules in End-Path: " <<
p.name <<
" ------------";
813 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 814 << std::right << std::setw(10) <<
"Visited" <<
" " 815 << std::right << std::setw(10) <<
"Passed" <<
" " 816 << std::right << std::setw(10) <<
"Failed" <<
" " 817 << std::right << std::setw(10) <<
"Error" <<
" " 820 unsigned int bitpos=0;
821 for (
auto const&
mod:
p.moduleInPathSummaries) {
823 << std::right << std::setw(5) << 0
824 << std::right << std::setw(5) << bitpos <<
" " 825 << std::right << std::setw(10) <<
mod.timesVisited <<
" " 826 << std::right << std::setw(10) <<
mod.timesPassed <<
" " 827 << std::right << std::setw(10) <<
mod.timesFailed <<
" " 828 << std::right << std::setw(10) <<
mod.timesExcept <<
" " 829 <<
mod.moduleLabel <<
"";
835 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Module Summary ------------";
837 << std::right << std::setw(10) <<
"Visited" <<
" " 838 << std::right << std::setw(10) <<
"Executed" <<
" " 839 << std::right << std::setw(10) <<
"Passed" <<
" " 840 << std::right << std::setw(10) <<
"Failed" <<
" " 841 << std::right << std::setw(10) <<
"Error" <<
" " 845 << std::right << std::setw(10) << worker.timesVisited <<
" " 846 << std::right << std::setw(10) << worker.timesRun <<
" " 847 << std::right << std::setw(10) << worker.timesPassed <<
" " 848 << std::right << std::setw(10) << worker.timesFailed <<
" " 849 << std::right << std::setw(10) << worker.timesExcept <<
" " 850 << worker.moduleLabel <<
"";
860 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Event Summary ---[sec]----";
878 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Path Summary ---[Real sec]----";
880 << std::right << std::setw(kColumn1Size) <<
"per event"<<
" " 881 << std::right << std::setw(kColumn2Size) <<
"per exec" 884 const int timesRun =
std::max(1,
p.timesRun);
887 << std::right << std::setw(kColumn1Size) <<
p.realTime/totalEvents <<
" " 888 << std::right << std::setw(kColumn2Size) <<
p.realTime/timesRun <<
" " 892 << std::right << std::setw(kColumn1Size) <<
"per event"<<
" " 893 << std::right << std::setw(kColumn2Size) <<
"per exec" 897 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"-------End-Path Summary ---[Real sec]----";
899 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 900 << std::right << std::setw(kColumn2Size) <<
"per exec" 903 const int timesRun =
std::max(1,
p.timesRun);
907 << std::right << std::setw(kColumn1Size) <<
p.realTime/totalEvents <<
" " 908 << std::right << std::setw(kColumn2Size) <<
p.realTime/timesRun <<
" " 912 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 913 << std::right << std::setw(kColumn2Size) <<
"per exec" 918 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Modules in Path: " <<
p.name <<
" ---[Real sec]----";
920 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 921 << std::right << std::setw(kColumn2Size) <<
"per visit" 923 for (
auto const&
mod:
p.moduleInPathSummaries) {
926 << std::right << std::setw(kColumn1Size) <<
mod.realTime/totalEvents <<
" " 927 << std::right << std::setw(kColumn2Size) <<
mod.realTime/
std::max(1,
mod.timesVisited) <<
" " 928 <<
mod.moduleLabel <<
"";
933 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 934 << std::right << std::setw(kColumn2Size) <<
"per visit" 939 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"------ Modules in End-Path: " <<
p.name <<
" ---[Real sec]----";
941 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 942 << std::right << std::setw(kColumn2Size) <<
"per visit" 944 for (
auto const&
mod:
p.moduleInPathSummaries) {
947 << std::right << std::setw(kColumn1Size) <<
mod.realTime/totalEvents <<
" " 948 << std::right << std::setw(kColumn2Size) <<
mod.realTime/
std::max(1,
mod.timesVisited) <<
" " 949 <<
mod.moduleLabel <<
"";
954 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 955 << std::right << std::setw(kColumn2Size) <<
"per visit" 959 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Module Summary ---[Real sec]----";
961 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 962 << std::right << std::setw(kColumn2Size) <<
"per exec" <<
" " 963 << std::right << std::setw(kColumn3Size) <<
"per visit" 968 << std::right << std::setw(kColumn1Size) << worker.realTime/totalEvents <<
" " 969 << std::right << std::setw(kColumn2Size) << worker.realTime/
std::max(1, worker.timesRun) <<
" " 970 << std::right << std::setw(kColumn3Size) << worker.realTime/
std::max(1, worker.timesVisited) <<
" " 971 << worker.moduleLabel <<
"";
974 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 975 << std::right << std::setw(kColumn2Size) <<
"per exec" <<
" " 976 << std::right << std::setw(kColumn3Size) <<
"per visit" 980 LogVerbatim(
"FwkSummary") <<
"T---Report end!" <<
"";
985 using std::placeholders::_1;
990 using std::placeholders::_1;
999 c->writeRunAsync(task, rp, processContext, activityRegistry);
1008 c->writeLumiAsync(task, lbp, processContext, activityRegistry);
1013 using std::placeholders::_1;
1021 using std::placeholders::_1;
1026 using std::placeholders::_1;
1045 unsigned int iStreamID,
1058 if (worker->description().moduleLabel() == iLabel) {
1063 if (
nullptr == found) {
1072 s->replaceModule(newMod,iLabel);
1084 auto const& processName = newMod->moduleDescription().processName();
1085 auto const& runModuleToIndicies = runLookup->indiciesForModulesInProcess(processName);
1086 auto const& lumiModuleToIndicies = lumiLookup->indiciesForModulesInProcess(processName);
1087 auto const& eventModuleToIndicies = eventLookup->indiciesForModulesInProcess(processName);
1098 std::vector<ModuleDescription const*>
1100 std::vector<ModuleDescription const*>
result;
1105 result.push_back(p);
1117 worker->convertCurrentProcessAlias(processName);
1139 std::vector<std::string>& oLabelsToFill)
const {
1145 std::vector<ModuleDescription const*>& descriptions,
1146 unsigned int hint)
const {
1147 streamSchedules_[0]->moduleDescriptionsInPath(iPathLabel, descriptions, hint);
1152 std::vector<ModuleDescription const*>& descriptions,
1153 unsigned int hint)
const {
1154 streamSchedules_[0]->moduleDescriptionsInEndPath(iEndPathLabel, descriptions, hint);
1159 std::vector<std::pair<unsigned int, unsigned int> >& moduleIDToIndex,
1160 std::vector<std::vector<ModuleDescription const*> >& modulesWhoseProductsAreConsumedBy,
1162 allModuleDescriptions.clear();
1163 moduleIDToIndex.clear();
1164 modulesWhoseProductsAreConsumedBy.clear();
1170 std::map<std::string, ModuleDescription const*> labelToDesc;
1174 allModuleDescriptions.push_back(p);
1175 moduleIDToIndex.push_back(std::pair<unsigned int, unsigned int>(p->
id(),
i));
1183 std::vector<ModuleDescription const*>&
modules = modulesWhoseProductsAreConsumedBy.at(i);
1184 worker->modulesWhoseProductsAreConsumed(modules, preg, labelToDesc);
1193 s->enableEndPaths(active);
1208 s->getTriggerReport(rep);
1223 int returnValue = 0;
1225 returnValue += s->totalEvents();
1232 int returnValue = 0;
1234 returnValue += s->totalEventsPassed();
1241 int returnValue = 0;
1243 returnValue += s->totalEventsFailed();
void writeRunAsync(WaitingTaskHolder iTask, RunPrincipal const &rp, ProcessContext const *, ActivityRegistry *)
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
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 endStream(unsigned int)
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 processOneEventAsync(WaitingTaskHolder iTask, unsigned int iStreamID, EventPrincipal &principal, EventSetup const &eventSetup, ServiceToken const &token)
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_
virtual void resolvePutIndicies(BranchType iBranchType, std::unordered_multimap< std::string, std::tuple< TypeID const *, const char *, edm::ProductResolverIndex >> const &iIndicies)=0
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_
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 beginJob(ProductRegistry const &)
virtual void closeFile()=0
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
void openOutputFiles(FileBlock &fb)
void writeLumiAsync(WaitingTaskHolder iTask, LuminosityBlockPrincipal const &lbp, ProcessContext const *, ActivityRegistry *)
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)