57 using std::placeholders::_1;
59 bool binary_search_string(std::vector<std::string>
const&
v,
std::string const&
s) {
60 return std::binary_search(v.begin(), v.end(),
s);
66 std::shared_ptr<TriggerResultInserter>
68 PreallocationConfiguration
const& iPrealloc,
69 ProductRegistry& preg,
70 ExceptionToActionTable
const&
actions,
71 std::shared_ptr<ActivityRegistry> areg,
72 std::shared_ptr<ProcessConfiguration> processConfiguration) {
74 ParameterSet* trig_pset = proc_pset.getPSetForUpdate(
"@trigger_paths");
75 trig_pset->registerIt();
77 WorkerParams work_args(trig_pset, preg, &iPrealloc, processConfiguration, actions);
78 ModuleDescription md(trig_pset->id(),
79 "TriggerResultInserter",
81 processConfiguration.get(),
84 areg->preModuleConstructionSignal_(md);
85 bool postCalled =
false;
86 std::shared_ptr<TriggerResultInserter> returnValue;
88 maker::ModuleHolderT<TriggerResultInserter> holder(make_shared_noexcept_false<TriggerResultInserter>(*trig_pset, iPrealloc.numberOfStreams()),static_cast<Maker const*>(
nullptr));
89 holder.setModuleDescription(md);
90 holder.registerProductsAndCallbacks(&preg);
91 returnValue =holder.module();
94 areg->postModuleConstructionSignal_(md);
99 areg->postModuleConstructionSignal_(md);
110 template <
typename T>
112 makePathStatusInserters(std::vector<
edm::propagate_const<std::shared_ptr<T>>>& pathStatusInserters,
113 std::vector<std::string>
const& pathNames,
114 PreallocationConfiguration
const& iPrealloc,
115 ProductRegistry& preg,
116 std::shared_ptr<ActivityRegistry> areg,
117 std::shared_ptr<ProcessConfiguration> processConfiguration,
121 pset.addParameter<
std::string>(
"@module_type", moduleTypeName);
122 pset.addParameter<
std::string>(
"@module_edm_type",
"EDProducer");
125 pathStatusInserters.reserve(pathNames.size());
127 for (
auto const& pathName : pathNames) {
129 ModuleDescription md(pset.id(),
132 processConfiguration.get(),
135 areg->preModuleConstructionSignal_(md);
136 bool postCalled =
false;
139 maker::ModuleHolderT<T> holder(make_shared_noexcept_false<T>(iPrealloc.numberOfStreams()),
140 static_cast<Maker const*>(
nullptr));
141 holder.setModuleDescription(md);
142 holder.registerProductsAndCallbacks(&preg);
143 pathStatusInserters.emplace_back(holder.module());
146 areg->postModuleConstructionSignal_(md);
151 areg->postModuleConstructionSignal_(md);
163 checkAndInsertAlias(
std::string const& friendlyClassName,
169 ProductRegistry
const& preg,
170 std::multimap<BranchKey, BranchKey>& aliasMap,
171 std::map<BranchKey, BranchKey>& aliasKeys) {
174 BranchKey
key(friendlyClassName, moduleLabel, productInstanceName, processName);
175 if(preg.productList().find(
key) == preg.productList().end()) {
178 for(
auto const& product : preg.productList()) {
179 if(moduleLabel == product.first.moduleLabel() && processName == product.first.processName()) {
181 <<
"There are no products of type '" << friendlyClassName <<
"'\n" 182 <<
"with module label '" << moduleLabel <<
"' and instance name '" << productInstanceName <<
"'.\n";
187 std::string const& theInstanceAlias(instanceAlias == star ? productInstanceName : instanceAlias);
188 BranchKey aliasKey(friendlyClassName, alias, theInstanceAlias, processName);
189 if(preg.productList().find(aliasKey) != preg.productList().end()) {
191 <<
"A product of type '" << friendlyClassName <<
"'\n" 192 <<
"with module label '" << alias <<
"' and instance name '" << theInstanceAlias <<
"'\n" 193 <<
"already exists.\n";
195 auto iter = aliasKeys.find(aliasKey);
196 if(iter != aliasKeys.end()) {
198 if(iter->second !=
key) {
200 <<
"The module label alias '" << alias <<
"' and product instance alias '" << theInstanceAlias <<
"'\n" 201 <<
"are used for multiple products of type '" << friendlyClassName <<
"'\n" 202 <<
"One has module label '" << moduleLabel <<
"' and product instance name '" << productInstanceName <<
"',\n" 203 <<
"the other has module label '" << iter->second.moduleLabel() <<
"' and product instance name '" << iter->second.productInstanceName() <<
"'.\n";
206 auto prodIter = preg.productList().find(
key);
207 if(prodIter != preg.productList().end()) {
208 if (!prodIter->second.produced()) {
210 <<
"The module label alias '" << alias <<
"' and product instance alias '" << theInstanceAlias <<
"'\n" 211 <<
"are used for a product of type '" << friendlyClassName <<
"'\n" 212 <<
"with module label '" << moduleLabel <<
"' and product instance name '" << productInstanceName <<
"',\n" 213 <<
"An EDAlias can only be used for products produced in the current process. This one is not.\n";
215 aliasMap.insert(std::make_pair(
key, aliasKey));
216 aliasKeys.insert(std::make_pair(aliasKey,
key));
223 std::vector<std::string> aliases = proc_pset.getParameter<std::vector<std::string> >(
"@all_aliases");
224 if(aliases.empty()) {
231 desc.add<
std::string>(
"fromProductInstance", star);
234 std::multimap<BranchKey, BranchKey> aliasMap;
236 std::map<BranchKey, BranchKey> aliasKeys;
240 ParameterSet const& aliasPSet = proc_pset.getParameterSet(alias);
241 std::vector<std::string> vPSetNames = aliasPSet.getParameterNamesForType<
VParameterSet>();
249 if(productInstanceName == star) {
251 BranchKey lowerBound(friendlyClassName, moduleLabel,
empty,
empty);
252 for(ProductRegistry::ProductList::const_iterator it = preg.productList().lower_bound(lowerBound);
253 it != preg.productList().end() && it->first.friendlyClassName() == friendlyClassName && it->first.moduleLabel() == moduleLabel;
260 checkAndInsertAlias(friendlyClassName, moduleLabel, it->first.productInstanceName(),
processName,
alias, instanceAlias, preg, aliasMap, aliasKeys);
265 for(
auto const& product : preg.productList()) {
266 if(moduleLabel == product.first.moduleLabel() && processName == product.first.processName()) {
268 <<
"There are no products of type '" << friendlyClassName <<
"'\n" 269 <<
"with module label '" << moduleLabel <<
"'.\n";
274 checkAndInsertAlias(friendlyClassName, moduleLabel, productInstanceName, processName, alias, instanceAlias, preg, aliasMap, aliasKeys);
282 for(
auto const& aliasEntry : aliasMap) {
283 ProductRegistry::ProductList::const_iterator it = preg.productList().find(aliasEntry.first);
284 assert(it != preg.productList().end());
285 preg.addLabelAlias(it->second, aliasEntry.second.moduleLabel(), aliasEntry.second.productInstanceName());
290 typedef std::vector<std::string>
vstring;
293 vstring
const& end_path_name_list,
294 vstring& modulesInConfig,
295 std::set<std::string>
const& usedModuleLabels,
296 std::map<
std::string, std::vector<std::pair<std::string, int> > >& outputModulePathPositions) {
308 vstring outputModuleLabels;
310 std::string const moduleEdmType(
"@module_edm_type");
316 std::set<std::string> modulesInConfigSet(modulesInConfig.begin(), modulesInConfig.end());
320 vstring scheduledPaths = proc_pset.getParameter<vstring>(
"@paths");
321 std::set<std::string> modulesOnPaths;
323 std::set<std::string> noEndPaths(scheduledPaths.begin(),scheduledPaths.end());
324 for(
auto const& endPath: end_path_name_list) {
325 noEndPaths.erase(endPath);
329 for(
auto const&
path: noEndPaths) {
330 labels = proc_pset.getParameter<vstring>(
path);
331 modulesOnPaths.insert(labels.begin(),labels.end());
337 std::vector<std::string> labelsToBeDropped;
338 labelsToBeDropped.reserve(modulesInConfigSet.size());
339 std::set_difference(modulesInConfigSet.begin(),modulesInConfigSet.end(),
340 usedModuleLabels.begin(),usedModuleLabels.end(),
341 std::back_inserter(labelsToBeDropped));
343 const unsigned int sizeBeforeOutputModules = labelsToBeDropped.size();
344 for (
auto const& modLabel: usedModuleLabels) {
348 edmType = proc_pset.getParameterSet(modLabel).getParameter<
std::string>(moduleEdmType);
349 if (edmType == outputModule) {
350 outputModuleLabels.push_back(modLabel);
351 labelsToBeDropped.push_back(modLabel);
353 if(edmType == edAnalyzer) {
354 if(modulesOnPaths.end()==modulesOnPaths.find(modLabel)) {
355 labelsToBeDropped.push_back(modLabel);
361 std::inplace_merge(labelsToBeDropped.begin(),
362 labelsToBeDropped.begin()+sizeBeforeOutputModules,
363 labelsToBeDropped.end());
369 vstring::iterator endAfterRemove = std::remove_if(modulesInConfig.begin(), modulesInConfig.end(), std::bind(binary_search_string, std::ref(labelsToBeDropped), _1));
370 modulesInConfig.erase(endAfterRemove, modulesInConfig.end());
371 proc_pset.addParameter<vstring>(
std::string(
"@all_modules"), modulesInConfig);
374 vstring endPathsToBeDropped;
376 for (vstring::const_iterator iEndPath = end_path_name_list.begin(), endEndPath = end_path_name_list.end();
377 iEndPath != endEndPath;
379 labels = proc_pset.getParameter<vstring>(*iEndPath);
380 vstring::iterator iSave = labels.begin();
381 vstring::iterator iBegin = labels.begin();
383 for (vstring::iterator iLabel = labels.begin(), iEnd = labels.end();
384 iLabel != iEnd; ++iLabel) {
385 if (binary_search_string(labelsToBeDropped, *iLabel)) {
386 if (binary_search_string(outputModuleLabels, *iLabel)) {
387 outputModulePathPositions[*iLabel].emplace_back(*iEndPath, iSave - iBegin);
390 if (iSave != iLabel) {
391 iSave->swap(*iLabel);
396 labels.erase(iSave, labels.end());
397 if (labels.empty()) {
399 proc_pset.eraseSimpleParameter(*iEndPath);
400 endPathsToBeDropped.push_back(*iEndPath);
402 proc_pset.addParameter<vstring>(*iEndPath,
labels);
408 endAfterRemove = std::remove_if(scheduledPaths.begin(), scheduledPaths.end(), std::bind(binary_search_string, std::ref(endPathsToBeDropped), _1));
409 scheduledPaths.erase(endAfterRemove, scheduledPaths.end());
410 proc_pset.addParameter<vstring>(
std::string(
"@paths"), scheduledPaths);
413 vstring scheduledEndPaths = proc_pset.getParameter<vstring>(
"@end_paths");
414 endAfterRemove = std::remove_if(scheduledEndPaths.begin(), scheduledEndPaths.end(), std::bind(binary_search_string, std::ref(endPathsToBeDropped), _1));
415 scheduledEndPaths.erase(endAfterRemove, scheduledEndPaths.end());
416 proc_pset.addParameter<vstring>(
std::string(
"@end_paths"), scheduledEndPaths);
420 class RngEDConsumer :
public EDConsumerBase {
422 explicit RngEDConsumer(std::set<TypeID>& typesConsumed) {
424 if(rng.isAvailable()) {
425 rng->consumes(consumesCollector());
426 for (
auto const& consumesInfo : this->consumesInfo()) {
427 typesConsumed.emplace(consumesInfo.type());
446 std::shared_ptr<ActivityRegistry> areg,
447 std::shared_ptr<ProcessConfiguration> processConfiguration,
448 bool hasSubprocesses,
452 resultsInserter_{tns.
getTrigPaths().empty()? std::shared_ptr<TriggerResultInserter>{} :makeInserter(proc_pset,prealloc,preg,actions,areg,processConfiguration)},
466 processConfiguration,
474 processConfiguration,
477 assert(0<prealloc.numberOfStreams());
479 for(
unsigned int i=0;
i<prealloc.numberOfStreams();++
i) {
485 proc_pset,tns,prealloc,preg,
486 branchIDListHelper,actions,
487 areg,processConfiguration,
495 const std::string kTriggerResults(
"TriggerResults");
496 std::vector<std::string> modulesToUse;
499 if(worker->description().moduleLabel() != kTriggerResults) {
500 modulesToUse.push_back(worker->description().moduleLabel());
506 std::vector<std::string>
temp;
507 temp.reserve(modulesToUse.size());
508 auto itBeginUnscheduled = modulesToUse.begin()+modulesToUse.size()-
n;
509 std::copy(itBeginUnscheduled,modulesToUse.end(),
510 std::back_inserter(temp));
511 std::copy(modulesToUse.begin(),itBeginUnscheduled,std::back_inserter(temp));
512 temp.swap(modulesToUse);
522 proc_pset, preg, prealloc,
523 actions,areg,processConfiguration,processContext);
527 std::set<std::string> usedModuleLabels;
529 if(worker->description().moduleLabel() != kTriggerResults) {
530 usedModuleLabels.insert(worker->description().moduleLabel());
533 std::vector<std::string> modulesInConfig(proc_pset.getParameter<std::vector<std::string> >(
"@all_modules"));
534 std::map<std::string, std::vector<std::pair<std::string, int> > > outputModulePathPositions;
535 reduceParameterSet(proc_pset, tns.getEndPaths(), modulesInConfig, usedModuleLabels,
536 outputModulePathPositions);
537 processEDAliases(proc_pset, processConfiguration->processName(), preg);
538 proc_pset.registerIt();
539 processConfiguration->setParameterSetID(proc_pset.id());
540 processConfiguration->setProcessConfigurationID();
544 size_t all_workers_count =
allWorkers().size();
553 limitOutput(proc_pset, branchIDListHelper.branchIDLists(), subProcessParentageHelper);
559 branchIDListHelper.updateFromRegistry(preg);
562 worker->registerThinnedAssociations(preg, thinnedAssociationsHelper);
564 thinnedAssociationsHelper.sort();
569 c->selectProducts(preg, thinnedAssociationsHelper);
572 for(
auto & product : preg.productListUpdator()) {
578 std::set<TypeID> productTypesConsumed;
579 std::set<TypeID> elementTypesConsumed;
582 for (
auto const& consumesInfo : worker->consumesInfo()) {
584 productTypesConsumed.emplace(consumesInfo.type());
586 elementTypesConsumed.emplace(consumesInfo.type());
591 if(hasSubprocesses) {
596 RngEDConsumer rngConsumer = RngEDConsumer(productTypesConsumed);
598 preg.setFrozen(productTypesConsumed, elementTypesConsumed, processConfiguration->processName());
601 for (
auto&
c : all_output_communicators_) {
602 c->setEventSelectionInfo(outputModulePathPositions, preg.anyProductProduced());
606 std::vector<const ModuleDescription*> modDesc;
608 modDesc.reserve(
workers.size());
611 std::back_inserter(modDesc),
613 return iWorker->descPtr();
618 prealloc.numberOfStreams(),
622 auto timeKeeperPtr = summaryTimeKeeper_.get();
654 int maxEventSpecs = 0;
655 int maxEventsOut = -1;
662 std::vector<std::string> psetNamesE;
669 if (maxEventSpecs > 1) {
671 "\nAt most, one form of 'output' may appear in the 'maxEvents' parameter set";
676 if (vMaxEventsOut !=
nullptr && !vMaxEventsOut->
empty()) {
677 std::string const& moduleLabel =
c->description().moduleLabel();
682 "\nNo entry in 'maxEvents' for output module label '" << moduleLabel <<
"'.\n";
694 if (!
c->limitReached()) {
699 LogInfo(
"SuccessfulTermination")
700 <<
"The job is terminating successfully because each output module\n" 701 <<
"has reached its configured limit.\n";
722 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Event Summary ------------";
737 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Path Summary ------------";
739 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 740 << std::right << std::setw(10) <<
"Executed" <<
" " 741 << std::right << std::setw(10) <<
"Passed" <<
" " 742 << std::right << std::setw(10) <<
"Failed" <<
" " 743 << std::right << std::setw(10) <<
"Error" <<
" " 747 << std::right << std::setw(5) << 1
748 << std::right << std::setw(5) <<
p.bitPosition <<
" " 749 << std::right << std::setw(10) <<
p.timesRun <<
" " 750 << std::right << std::setw(10) <<
p.timesPassed <<
" " 751 << std::right << std::setw(10) <<
p.timesFailed <<
" " 752 << std::right << std::setw(10) <<
p.timesExcept <<
" " 774 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"-------End-Path Summary ------------";
776 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 777 << std::right << std::setw(10) <<
"Executed" <<
" " 778 << std::right << std::setw(10) <<
"Passed" <<
" " 779 << std::right << std::setw(10) <<
"Failed" <<
" " 780 << std::right << std::setw(10) <<
"Error" <<
" " 784 << std::right << std::setw(5) << 0
785 << std::right << std::setw(5) <<
p.bitPosition <<
" " 786 << std::right << std::setw(10) <<
p.timesRun <<
" " 787 << std::right << std::setw(10) <<
p.timesPassed <<
" " 788 << std::right << std::setw(10) <<
p.timesFailed <<
" " 789 << std::right << std::setw(10) <<
p.timesExcept <<
" " 795 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Modules in Path: " <<
p.name <<
" ------------";
797 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 798 << std::right << std::setw(10) <<
"Visited" <<
" " 799 << std::right << std::setw(10) <<
"Passed" <<
" " 800 << std::right << std::setw(10) <<
"Failed" <<
" " 801 << std::right << std::setw(10) <<
"Error" <<
" " 804 unsigned int bitpos = 0;
805 for (
auto const&
mod:
p.moduleInPathSummaries) {
807 << std::right << std::setw(5) << 1
808 << std::right << std::setw(5) << bitpos <<
" " 809 << std::right << std::setw(10) <<
mod.timesVisited <<
" " 810 << std::right << std::setw(10) <<
mod.timesPassed <<
" " 811 << std::right << std::setw(10) <<
mod.timesFailed <<
" " 812 << std::right << std::setw(10) <<
mod.timesExcept <<
" " 813 <<
mod.moduleLabel <<
"";
820 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"------ Modules in End-Path: " <<
p.name <<
" ------------";
822 << std::right << std::setw(10) <<
"Trig Bit#" <<
" " 823 << std::right << std::setw(10) <<
"Visited" <<
" " 824 << std::right << std::setw(10) <<
"Passed" <<
" " 825 << std::right << std::setw(10) <<
"Failed" <<
" " 826 << std::right << std::setw(10) <<
"Error" <<
" " 829 unsigned int bitpos=0;
830 for (
auto const&
mod:
p.moduleInPathSummaries) {
832 << std::right << std::setw(5) << 0
833 << std::right << std::setw(5) << bitpos <<
" " 834 << std::right << std::setw(10) <<
mod.timesVisited <<
" " 835 << std::right << std::setw(10) <<
mod.timesPassed <<
" " 836 << std::right << std::setw(10) <<
mod.timesFailed <<
" " 837 << std::right << std::setw(10) <<
mod.timesExcept <<
" " 838 <<
mod.moduleLabel <<
"";
844 LogVerbatim(
"FwkSummary") <<
"TrigReport " <<
"---------- Module Summary ------------";
846 << std::right << std::setw(10) <<
"Visited" <<
" " 847 << std::right << std::setw(10) <<
"Executed" <<
" " 848 << std::right << std::setw(10) <<
"Passed" <<
" " 849 << std::right << std::setw(10) <<
"Failed" <<
" " 850 << std::right << std::setw(10) <<
"Error" <<
" " 854 << std::right << std::setw(10) << worker.timesVisited <<
" " 855 << std::right << std::setw(10) << worker.timesRun <<
" " 856 << std::right << std::setw(10) << worker.timesPassed <<
" " 857 << std::right << std::setw(10) << worker.timesFailed <<
" " 858 << std::right << std::setw(10) << worker.timesExcept <<
" " 859 << worker.moduleLabel <<
"";
869 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Event Summary ---[sec]----";
887 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Path Summary ---[Real sec]----";
889 << std::right << std::setw(kColumn1Size) <<
"per event"<<
" " 890 << std::right << std::setw(kColumn2Size) <<
"per exec" 893 const int timesRun =
std::max(1,
p.timesRun);
896 << std::right << std::setw(kColumn1Size) <<
p.realTime/totalEvents <<
" " 897 << std::right << std::setw(kColumn2Size) <<
p.realTime/timesRun <<
" " 901 << std::right << std::setw(kColumn1Size) <<
"per event"<<
" " 902 << std::right << std::setw(kColumn2Size) <<
"per exec" 906 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"-------End-Path Summary ---[Real sec]----";
908 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 909 << std::right << std::setw(kColumn2Size) <<
"per exec" 912 const int timesRun =
std::max(1,
p.timesRun);
916 << std::right << std::setw(kColumn1Size) <<
p.realTime/totalEvents <<
" " 917 << std::right << std::setw(kColumn2Size) <<
p.realTime/timesRun <<
" " 921 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 922 << std::right << std::setw(kColumn2Size) <<
"per exec" 927 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Modules in Path: " <<
p.name <<
" ---[Real sec]----";
929 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 930 << std::right << std::setw(kColumn2Size) <<
"per visit" 932 for (
auto const&
mod:
p.moduleInPathSummaries) {
935 << std::right << std::setw(kColumn1Size) <<
mod.realTime/totalEvents <<
" " 936 << std::right << std::setw(kColumn2Size) <<
mod.realTime/
std::max(1,
mod.timesVisited) <<
" " 937 <<
mod.moduleLabel <<
"";
942 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 943 << std::right << std::setw(kColumn2Size) <<
"per visit" 948 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"------ Modules in End-Path: " <<
p.name <<
" ---[Real sec]----";
950 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 951 << std::right << std::setw(kColumn2Size) <<
"per visit" 953 for (
auto const&
mod:
p.moduleInPathSummaries) {
956 << std::right << std::setw(kColumn1Size) <<
mod.realTime/totalEvents <<
" " 957 << std::right << std::setw(kColumn2Size) <<
mod.realTime/
std::max(1,
mod.timesVisited) <<
" " 958 <<
mod.moduleLabel <<
"";
963 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 964 << std::right << std::setw(kColumn2Size) <<
"per visit" 968 LogVerbatim(
"FwkSummary") <<
"TimeReport " <<
"---------- Module Summary ---[Real sec]----";
970 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 971 << std::right << std::setw(kColumn2Size) <<
"per exec" <<
" " 972 << std::right << std::setw(kColumn3Size) <<
"per visit" 977 << std::right << std::setw(kColumn1Size) << worker.realTime/totalEvents <<
" " 978 << std::right << std::setw(kColumn2Size) << worker.realTime/
std::max(1, worker.timesRun) <<
" " 979 << std::right << std::setw(kColumn3Size) << worker.realTime/
std::max(1, worker.timesVisited) <<
" " 980 << worker.moduleLabel <<
"";
983 << std::right << std::setw(kColumn1Size) <<
"per event" <<
" " 984 << std::right << std::setw(kColumn2Size) <<
"per exec" <<
" " 985 << std::right << std::setw(kColumn3Size) <<
"per visit" 989 LogVerbatim(
"FwkSummary") <<
"T---Report end!" <<
"";
994 using std::placeholders::_1;
999 using std::placeholders::_1;
1009 c->writeRunAsync(task, rp, processContext, activityRegistry, mergeableRunProductMetadata);
1018 c->writeLumiAsync(task, lbp, processContext, activityRegistry);
1023 using std::placeholders::_1;
1031 using std::placeholders::_1;
1036 using std::placeholders::_1;
1055 unsigned int iStreamID,
1068 if (worker->description().moduleLabel() == iLabel) {
1073 if (
nullptr == found) {
1082 s->replaceModule(newMod,iLabel);
1094 auto const& processName = newMod->moduleDescription().processName();
1095 auto const& runModuleToIndicies = runLookup->indiciesForModulesInProcess(processName);
1096 auto const& lumiModuleToIndicies = lumiLookup->indiciesForModulesInProcess(processName);
1097 auto const& eventModuleToIndicies = eventLookup->indiciesForModulesInProcess(processName);
1108 std::vector<ModuleDescription const*>
1110 std::vector<ModuleDescription const*>
result;
1115 result.push_back(p);
1127 worker->convertCurrentProcessAlias(processName);
1149 std::vector<std::string>& oLabelsToFill)
const {
1155 std::vector<ModuleDescription const*>& descriptions,
1156 unsigned int hint)
const {
1157 streamSchedules_[0]->moduleDescriptionsInPath(iPathLabel, descriptions, hint);
1162 std::vector<ModuleDescription const*>& descriptions,
1163 unsigned int hint)
const {
1164 streamSchedules_[0]->moduleDescriptionsInEndPath(iEndPathLabel, descriptions, hint);
1169 std::vector<std::pair<unsigned int, unsigned int> >& moduleIDToIndex,
1170 std::vector<std::vector<ModuleDescription const*> >& modulesWhoseProductsAreConsumedBy,
1172 allModuleDescriptions.clear();
1173 moduleIDToIndex.clear();
1174 modulesWhoseProductsAreConsumedBy.clear();
1180 std::map<std::string, ModuleDescription const*> labelToDesc;
1184 allModuleDescriptions.push_back(p);
1185 moduleIDToIndex.push_back(std::pair<unsigned int, unsigned int>(p->
id(),
i));
1193 std::vector<ModuleDescription const*>&
modules = modulesWhoseProductsAreConsumedBy.at(i);
1194 worker->modulesWhoseProductsAreConsumed(modules, preg, labelToDesc);
1203 s->enableEndPaths(active);
1218 s->getTriggerReport(rep);
1233 int returnValue = 0;
1235 returnValue += s->totalEvents();
1242 int returnValue = 0;
1244 returnValue += s->totalEventsPassed();
1251 int returnValue = 0;
1253 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
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 writeRunAsync(WaitingTaskHolder iTask, RunPrincipal const &rp, ProcessContext const *, ActivityRegistry *, MergeableRunProductMetadata const *)
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 setIsMergeable(BranchDescription &)
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)