51 template <
typename InputIterator,
typename ForwardIterator,
typename Func>
52 void transform_into(InputIterator begin, InputIterator
end, ForwardIterator
out, Func
func) {
53 for (; begin !=
end; ++begin, ++
out)
62 template <
typename FROM,
typename TO,
typename FUNC>
63 void fill_summary(FROM
const& from, TO&
to, FUNC
func) {
64 if (
to.size() != from.size()) {
66 transform_into(from.begin(), from.end(),
temp.begin(),
func);
69 transform_into(from.begin(), from.end(),
to.begin(),
func);
79 std::shared_ptr<ActivityRegistry> areg,
80 std::shared_ptr<TriggerResultInserter> inserter) {
83 ptr->setActivityRegistry(areg);
87 void initializeBranchToReadingWorker(std::vector<std::string>
const& branchesToDeleteEarly,
88 ProductRegistry
const& preg,
89 std::multimap<std::string, Worker*>& branchToReadingWorker) {
90 auto vBranchesToDeleteEarly = branchesToDeleteEarly;
92 std::sort(vBranchesToDeleteEarly.begin(), vBranchesToDeleteEarly.end(), std::less<std::string>());
93 vBranchesToDeleteEarly.erase(
std::unique(vBranchesToDeleteEarly.begin(), vBranchesToDeleteEarly.end()),
94 vBranchesToDeleteEarly.end());
97 auto allBranchNames = preg.allBranchNames();
99 for (
auto&
b : allBranchNames) {
100 b.resize(
b.size() - 1);
102 std::sort(allBranchNames.begin(), allBranchNames.end(), std::less<std::string>());
103 std::vector<std::string>
temp;
104 temp.reserve(vBranchesToDeleteEarly.size());
107 vBranchesToDeleteEarly.end(),
108 allBranchNames.begin(),
109 allBranchNames.end(),
110 std::back_inserter(
temp));
111 vBranchesToDeleteEarly.swap(
temp);
112 if (
temp.size() != vBranchesToDeleteEarly.size()) {
113 std::vector<std::string> missingProducts;
116 vBranchesToDeleteEarly.begin(),
117 vBranchesToDeleteEarly.end(),
118 std::back_inserter(missingProducts));
119 LogInfo l(
"MissingProductsForCanDeleteEarly");
120 l <<
"The following products in the 'canDeleteEarly' list are not available in this job and will be ignored.";
121 for (
auto const&
n : missingProducts) {
127 for (
auto const&
branch : vBranchesToDeleteEarly) {
128 branchToReadingWorker.insert(std::make_pair(
branch, static_cast<Worker*>(
nullptr)));
134 WorkerManager& workerManager,
135 ProductRegistry& preg,
136 PreallocationConfiguration
const* prealloc,
137 std::shared_ptr<ProcessConfiguration const> processConfiguration) {
140 if (modpset ==
nullptr) {
145 return workerManager.getWorker(*modpset, preg, prealloc, processConfiguration,
moduleLabel);
154 template <
typename T>
155 auto findConditionalTaskModulesRange(
T& modnames) {
156 auto beg =
std::find(modnames.begin(), modnames.end(),
"#");
157 if (beg == modnames.end()) {
158 return std::pair(modnames.end(), modnames.end());
160 return std::pair(beg + 1, std::prev(modnames.end()));
163 std::optional<std::string> findBestMatchingAlias(
164 std::unordered_multimap<std::string, edm::BranchDescription const*>
const& conditionalModuleBranches,
165 std::unordered_multimap<std::string, StreamSchedule::AliasInfo>
const& aliasMap,
167 ConsumesInfo
const& consumesInfo) {
168 std::optional<std::string> best;
170 bool bestIsAmbiguous =
false;
172 auto updateBest = [&best, &wildcardsInBest, &bestIsAmbiguous](
174 int const wildcards =
static_cast<int>(instanceIsWildcard) + static_cast<int>(typeIsWildcard);
175 if (wildcards == 0) {
176 bestIsAmbiguous =
false;
179 if (not best
or wildcards < wildcardsInBest) {
181 wildcardsInBest = wildcards;
182 bestIsAmbiguous =
false;
183 }
else if (best and *best !=
label and wildcardsInBest == wildcards) {
184 bestIsAmbiguous =
true;
189 auto findAlias = aliasMap.equal_range(productModuleLabel);
190 for (
auto it = findAlias.first; it != findAlias.second; ++it) {
192 it->second.instanceLabel !=
"*" ? it->second.instanceLabel : it->second.originalInstanceLabel;
193 bool const instanceIsWildcard = (aliasInstanceLabel ==
"*");
194 if (instanceIsWildcard
or consumesInfo.instance() == aliasInstanceLabel) {
195 bool const typeIsWildcard = it->second.friendlyClassName ==
"*";
196 if (typeIsWildcard
or (consumesInfo.type().friendlyClassName() == it->second.friendlyClassName)) {
197 if (updateBest(it->second.originalModuleLabel, instanceIsWildcard, typeIsWildcard)) {
198 return it->second.originalModuleLabel;
203 auto branches = conditionalModuleBranches.equal_range(productModuleLabel);
204 for (
auto itBranch = branches.first; itBranch != branches.second; ++it) {
205 if (typeIsWildcard
or itBranch->second->productInstanceName() == it->second.originalInstanceLabel) {
207 TypeID(itBranch->second->wrappedType().typeInfo()),
208 itBranch->second->className())) {
209 if (updateBest(it->second.originalModuleLabel, instanceIsWildcard, typeIsWildcard)) {
210 return it->second.originalModuleLabel;
218 if (bestIsAmbiguous) {
220 <<
"Encountered ambiguity when trying to find a best-matching alias for\n" 221 <<
" friendly class name " << consumesInfo.type().friendlyClassName() <<
"\n" 222 <<
" module label " << productModuleLabel <<
"\n" 223 <<
" product instance name " << consumesInfo.instance() <<
"\n" 224 <<
"when processing EDAliases for modules in ConditionalTasks. Two aliases have the same number of " 226 << wildcardsInBest <<
")";
234 typedef std::vector<std::string>
vstring;
245 std::shared_ptr<ProcessConfiguration const> processConfiguration,
247 std::vector<std::string>
const& trigPathNames) {
248 std::unordered_set<std::string> allConditionalMods;
249 for (
auto const&
pathName : trigPathNames) {
253 auto condRange = findConditionalTaskModulesRange(modnames);
254 if (condRange.first == condRange.second)
258 allConditionalMods.insert(condRange.first, condRange.second);
261 for (
auto const&
cond : allConditionalMods) {
263 (
void)getWorker(
cond, proc_pset, workerManager, preg, prealloc, processConfiguration);
271 if (allConditionalMods.find(
prod.first.moduleLabel()) != allConditionalMods.end()) {
280 std::unordered_set<std::string>
const& conditionalmods)
const {
281 std::unordered_multimap<std::string, edm::BranchDescription const*>
ret;
282 for (
auto const&
mod : conditionalmods) {
291 auto aliases = proc_pset.
getParameter<std::vector<std::string>>(
"@all_aliases");
293 for (
auto const&
alias : aliases) {
295 auto aliasedToModuleLabels =
info.getParameterNames();
296 for (
auto const&
mod : aliasedToModuleLabels) {
297 if (not
mod.empty() and
mod[0] !=
'@' and allConditionalMods.find(
mod) != allConditionalMods.end()) {
298 auto aliasVPSet =
info.getParameter<std::vector<edm::ParameterSet>>(
mod);
299 for (
auto const& aliasPSet : aliasVPSet) {
303 if (aliasPSet.exists(
"type")) {
306 if (aliasPSet.exists(
"toProductInstance")) {
309 if (aliasPSet.exists(
"fromProductInstance")) {
310 originalInstance = aliasPSet.getParameter<
std::string>(
"fromProductInstance");
323 std::unordered_set<std::string>
const& allConditionalMods) {
324 auto const& all_modules = proc_pset.
getParameter<std::vector<std::string>>(
"@all_modules");
325 std::vector<std::string> switchEDAliases;
326 for (
auto const&
module : all_modules) {
328 if (mod_pset.getParameter<
std::string>(
"@module_type") ==
"SwitchProducer") {
329 auto const& all_cases = mod_pset.
getParameter<std::vector<std::string>>(
"@all_cases");
330 for (
auto const& case_label : all_cases) {
333 switchEDAliases.push_back(case_label);
339 switchEDAliases, allConditionalMods, proc_pset, processConfiguration.
processName(), preg);
342 std::unordered_multimap<std::string, AliasInfo>
aliasMap_;
349 std::shared_ptr<TriggerResultInserter> inserter,
352 std::shared_ptr<ModuleRegistry> modReg,
358 std::shared_ptr<ActivityRegistry> areg,
359 std::shared_ptr<ProcessConfiguration const> processConfiguration,
362 : workerManager_(modReg, areg,
actions),
370 number_of_unscheduled_modules_(0),
372 streamContext_(streamID_, processContext),
373 skippingEvent_(
false) {
374 bool hasPath =
false;
375 std::vector<std::string>
const& pathNames = tns.
getTrigPaths();
376 std::vector<std::string>
const& endPathNames = tns.
getEndPaths();
379 proc_pset, preg, &prealloc, processConfiguration,
workerManager_, pathNames);
383 for (
auto const& trig_name : pathNames) {
387 processConfiguration,
392 conditionalTaskHelper);
408 for (
auto const& end_path_name : endPathNames) {
410 proc_pset, preg, &prealloc, processConfiguration, bitpos, end_path_name, endPathNames, conditionalTaskHelper);
417 std::set<std::string> usedWorkerLabels;
419 usedWorkerLabels.insert(worker->description()->moduleLabel());
421 std::vector<std::string> modulesInConfig(proc_pset.
getParameter<std::vector<std::string>>(
"@all_modules"));
422 std::set<std::string> modulesInConfigSet(modulesInConfig.begin(), modulesInConfig.end());
423 std::vector<std::string> unusedLabels;
425 modulesInConfigSet.end(),
426 usedWorkerLabels.begin(),
427 usedWorkerLabels.end(),
428 back_inserter(unusedLabels));
429 std::set<std::string> unscheduledLabels;
430 std::vector<std::string> shouldBeUsedLabels;
431 if (!unusedLabels.empty()) {
436 for (
auto const&
label : unusedLabels) {
440 assert(modulePSet !=
nullptr);
442 *modulePSet, preg, &prealloc, processConfiguration,
label, unscheduledLabels, shouldBeUsedLabels);
444 if (!shouldBeUsedLabels.empty()) {
445 std::ostringstream unusedStream;
446 unusedStream <<
"'" << shouldBeUsedLabels.front() <<
"'";
447 for (std::vector<std::string>::iterator itLabel = shouldBeUsedLabels.begin() + 1,
448 itLabelEnd = shouldBeUsedLabels.end();
449 itLabel != itLabelEnd;
451 unusedStream <<
",'" << *itLabel <<
"'";
453 LogInfo(
"path") <<
"The following module labels are not assigned to any path:\n" << unusedStream.str() <<
"\n";
460 std::vector<std::string>
const& branchesToDeleteEarly,
463 std::multimap<std::string, Worker*> branchToReadingWorker;
464 initializeBranchToReadingWorker(branchesToDeleteEarly, preg, branchToReadingWorker);
466 const std::vector<std::string>
kEmpty;
467 std::map<Worker*, unsigned int> reserveSizeForWorker;
468 unsigned int upperLimitOnReadingWorker = 0;
469 unsigned int upperLimitOnIndicies = 0;
470 unsigned int nUniqueBranchesToDelete = branchToReadingWorker.size();
476 if (!branchToReadingWorker.empty()) {
482 auto found = branchToReadingWorker.equal_range(
desc.branchName());
484 --nUniqueBranchesToDelete;
485 branchToReadingWorker.erase(
found.first,
found.second);
492 if (branchToReadingWorker.empty()) {
499 if (
nullptr !=
pset) {
500 auto branches =
pset->getUntrackedParameter<std::vector<std::string>>(
"mightGet",
kEmpty);
501 if (not branches.empty()) {
502 ++upperLimitOnReadingWorker;
504 for (
auto const&
branch : branches) {
505 auto found = branchToReadingWorker.equal_range(
branch);
507 ++upperLimitOnIndicies;
508 ++reserveSizeForWorker[
w];
509 if (
nullptr ==
found.first->second) {
512 branchToReadingWorker.insert(make_pair(
found.first->first,
w));
519 auto it = branchToReadingWorker.begin();
520 std::vector<std::string> unusedBranches;
521 while (it != branchToReadingWorker.end()) {
522 if (it->second ==
nullptr) {
523 unusedBranches.push_back(it->first);
527 branchToReadingWorker.erase(
temp);
532 if (not unusedBranches.empty()) {
534 l <<
"The following products in the 'canDeleteEarly' list are not used in this job and will be ignored.\n" 535 " If possible, remove the producer from the job or add the product to the producer's own 'mightGet' list.";
536 for (
auto const&
n : unusedBranches) {
541 if (!branchToReadingWorker.empty()) {
545 std::map<const Worker*, EarlyDeleteHelper*> alreadySeenWorkers;
547 size_t nextOpenIndex = 0;
549 for (
auto& branchAndWorker : branchToReadingWorker) {
550 if (lastBranchName != branchAndWorker.first) {
552 BranchID bid(branchAndWorker.first +
".");
554 lastBranchName = branchAndWorker.first;
556 auto found = alreadySeenWorkers.find(branchAndWorker.second);
557 if (alreadySeenWorkers.end() ==
found) {
562 size_t index = nextOpenIndex;
563 size_t nIndices = reserveSizeForWorker[branchAndWorker.second];
567 alreadySeenWorkers.insert(std::make_pair(branchAndWorker.second, &(
earlyDeleteHelpers_.back())));
568 nextOpenIndex += nIndices;
578 if (itLast->end() != it->begin()) {
580 unsigned int delta = it->begin() - itLast->end();
581 it->shiftIndexPointers(
delta);
595 p.setEarlyDeleteHelpers(alreadySeenWorkers);
598 p.setEarlyDeleteHelpers(alreadySeenWorkers);
606 std::unordered_set<std::string>& conditionalModules,
607 std::unordered_multimap<std::string, edm::BranchDescription const*>
const& conditionalModuleBranches,
608 std::unordered_multimap<std::string, AliasInfo>
const& aliasMap,
612 std::shared_ptr<ProcessConfiguration const> processConfiguration) {
613 std::vector<Worker*> returnValue;
616 using namespace productholderindexhelper;
617 for (
auto const& ci : consumesInfo) {
618 if (not ci.skipCurrentProcess() and
619 (ci.process().empty()
or ci.process() == processConfiguration->processName())) {
620 auto productModuleLabel = ci.label();
621 if (productModuleLabel.empty()) {
623 for (
auto const&
branch : conditionalModuleBranches) {
625 if (conditionalModules.find(
branch.first) == conditionalModules.end()) {
629 if (
branch.second->unwrappedTypeID() != ci.type()) {
634 ci.type(),
TypeID(
branch.second->wrappedType().typeInfo()),
branch.second->className())) {
639 auto condWorker = getWorker(
branch.first, proc_pset,
workerManager_, preg, prealloc, processConfiguration);
642 conditionalModules.erase(
branch.first);
646 conditionalModuleBranches,
651 processConfiguration);
652 returnValue.insert(returnValue.end(), dependents.begin(), dependents.end());
653 returnValue.push_back(condWorker);
657 bool productFromConditionalModule =
false;
658 auto itFound = conditionalModules.find(productModuleLabel);
659 if (itFound == conditionalModules.end()) {
662 auto foundAlias = findBestMatchingAlias(conditionalModuleBranches, aliasMap, productModuleLabel, ci);
664 productModuleLabel = *foundAlias;
665 productFromConditionalModule =
true;
666 itFound = conditionalModules.find(productModuleLabel);
668 if (itFound == conditionalModules.end()) {
674 auto findBranches = conditionalModuleBranches.equal_range(productModuleLabel);
675 for (
auto itBranch = findBranches.first; itBranch != findBranches.second; ++itBranch) {
676 if (itBranch->second->productInstanceName() == ci.instance()) {
678 if (ci.type() == itBranch->second->unwrappedTypeID()) {
679 productFromConditionalModule =
true;
685 TypeID(itBranch->second->wrappedType().typeInfo()),
687 productFromConditionalModule =
true;
694 if (productFromConditionalModule) {
696 getWorker(productModuleLabel, proc_pset,
workerManager_, preg, prealloc, processConfiguration);
699 conditionalModules.erase(itFound);
703 conditionalModuleBranches,
708 processConfiguration);
709 returnValue.insert(returnValue.end(), dependents.begin(), dependents.end());
710 returnValue.push_back(condWorker);
721 std::shared_ptr<ProcessConfiguration const> processConfiguration,
725 std::vector<std::string>
const& endPathNames,
731 auto condRange = findConditionalTaskModulesRange(modnames);
733 std::unordered_set<std::string> conditionalmods;
735 std::unordered_multimap<std::string, edm::BranchDescription const*> conditionalModsBranches;
736 std::unordered_map<std::string, unsigned int> conditionalModOrder;
737 if (condRange.first != condRange.second) {
738 for (
auto it = condRange.first; it != condRange.second; ++it) {
740 conditionalModOrder.emplace(*it, it - modnames.begin() - 1);
743 conditionalmods = std::unordered_set<std::string>(std::make_move_iterator(condRange.first),
744 std::make_move_iterator(condRange.second));
747 modnames.erase(std::prev(condRange.first), modnames.end());
750 unsigned int placeInPath = 0;
751 for (
auto const&
name : modnames) {
753 bool doNotRunConcurrently =
false;
755 if (
name[0] ==
'!') {
757 }
else if (
name[0] ==
'-' or name[0] ==
'+') {
762 doNotRunConcurrently =
true;
771 if (worker ==
nullptr) {
777 <<
"The unknown module label \"" <<
moduleLabel <<
"\" appears in " << pathType <<
" \"" <<
pathName 778 <<
"\"\n please check spelling or remove that label from the path.";
789 <<
"' with module label '" <<
moduleLabel <<
"' appears on EndPath '" 791 <<
"The return value of the filter will be ignored.\n" 792 <<
"To suppress this warning, either remove the filter from the endpath,\n" 793 <<
"or explicitly ignore it in the configuration by using cms.ignore().\n";
796 bool runConcurrently = not doNotRunConcurrently;
798 runConcurrently =
false;
803 conditionalModsBranches,
808 processConfiguration);
809 for (
auto condMod : condModules) {
810 tmpworkers.emplace_back(
811 condMod,
WorkerInPath::Ignore, conditionalModOrder[condMod->description()->moduleLabel()],
true);
814 tmpworkers.emplace_back(worker, filterAction, placeInPath, runConcurrently);
818 out.swap(tmpworkers);
824 std::shared_ptr<ProcessConfiguration const> processConfiguration,
828 std::vector<std::string>
const& endPathNames,
832 proc_pset, preg, prealloc, processConfiguration,
name,
false, tmpworkers, endPathNames, conditionalTaskHelper);
835 if (!tmpworkers.empty()) {
856 std::shared_ptr<ProcessConfiguration const> processConfiguration,
859 std::vector<std::string>
const& endPathNames,
863 proc_pset, preg, prealloc, processConfiguration,
name,
true, tmpworkers, endPathNames, conditionalTaskHelper);
865 if (!tmpworkers.empty()) {
891 if (worker->description()->moduleLabel() == iLabel) {
896 if (
nullptr ==
found) {
907 std::vector<ModuleDescription const*>
result;
943 results_->at(empty_trig_path) = hltPathStatus;
944 pathStatusInserters[empty_trig_path]->setPathStatus(
streamID_, hltPathStatus);
966 auto pathErrorHolder = std::make_unique<std::atomic<std::exception_ptr*>>(
nullptr);
967 auto pathErrorPtr = pathErrorHolder.get();
970 [iTask,
this, weakToken, pathError =
std::move(pathErrorHolder)](std::exception_ptr
const* iPtr)
mutable {
973 std::exception_ptr ptr;
974 if (pathError->load()) {
975 ptr = *pathError->load();
976 delete pathError->load();
978 if ((not ptr) and iPtr) {
988 auto pathsDone =
make_waiting_task([allPathsHolder, pathErrorPtr, transitionInfo =
info,
this, weakToken](
989 std::exception_ptr
const* iPtr)
mutable {
995 pathErrorPtr->store(
new std::exception_ptr(*iPtr));
1034 *(iExcept.load()) = std::exception_ptr();
1036 *(iExcept.load()) = std::current_exception();
1039 *(iExcept.load()) = std::current_exception();
1043 if ((not iExcept) and
results_->accept()) {
1057 std::rethrow_exception(expt);
1062 std::ostringstream ost;
1063 ost <<
"Processing Event " <<
info.principal().id();
1066 iExcept.store(
new std::exception_ptr(std::current_exception()));
1070 iExcept.store(
new std::exception_ptr(std::current_exception()));
1074 std::exception_ptr ptr;
1076 ptr = *iExcept.load();
1089 bool const cleaningUpAfterException =
false;
1095 iExcept = std::current_exception();
1103 iExcept = std::current_exception();
1117 std::back_inserter(oLabelsToFill),
1118 std::bind(&
Path::name, std::placeholders::_1));
1122 TrigPaths::const_iterator itFound = std::find_if(
1125 std::bind(std::equal_to<std::string>(), iPathLabel, std::bind(&
Path::name, std::placeholders::_1)));
1127 oLabelsToFill.reserve(itFound->size());
1128 for (
size_t i = 0;
i < itFound->size(); ++
i) {
1129 oLabelsToFill.push_back(itFound->getWorker(
i)->description()->moduleLabel());
1135 std::vector<ModuleDescription const*>& descriptions,
1136 unsigned int hint)
const {
1137 descriptions.clear();
1139 TrigPaths::const_iterator itFound;
1143 if (itFound->name() == iPathLabel)
1148 itFound = std::find_if(
1151 std::bind(std::equal_to<std::string>(), iPathLabel, std::bind(&
Path::name, std::placeholders::_1)));
1156 descriptions.reserve(itFound->size());
1157 for (
size_t i = 0;
i < itFound->size(); ++
i) {
1158 descriptions.push_back(itFound->getWorker(
i)->description());
1164 std::vector<ModuleDescription const*>& descriptions,
1165 unsigned int hint)
const {
1166 descriptions.clear();
1168 TrigPaths::const_iterator itFound;
1172 if (itFound->name() == iEndPathLabel)
1177 itFound = std::find_if(
1180 std::bind(std::equal_to<std::string>(), iEndPathLabel, std::bind(&
Path::name, std::placeholders::_1)));
1185 descriptions.reserve(itFound->size());
1186 for (
size_t i = 0;
i < itFound->size(); ++
i) {
1187 descriptions.push_back(itFound->getWorker(
i)->description());
1211 std::vector<ModuleInPathSummary>
temp(sz);
1212 for (
size_t i = 0;
i != sz; ++
i) {
1218 for (
size_t i = 0;
i != sz; ++
i) {
1246 using std::placeholders::_1;
1279 unsigned int indexEmpty = 0;
1280 unsigned int indexOfPath = 0;
1281 for (
auto& pathStatusInserter : pathStatusInserters) {
1282 std::shared_ptr<PathStatusInserter> inserterPtr =
get_underlying(pathStatusInserter);
1286 workerPtr->setActivityRegistry(
actReg_);
1295 trig_paths_.at(indexOfPath).setPathStatusInserter(inserterPtr.get(), workerPtr.get());
1304 for (
auto& endPathStatusInserter : endPathStatusInserters) {
1305 std::shared_ptr<EndPathStatusInserter> inserterPtr =
get_underlying(endPathStatusInserter);
1309 workerPtr->setActivityRegistry(
actReg_);
1318 end_paths_.at(indexOfPath).setPathStatusInserter(
nullptr, workerPtr.get());
static void fillModuleInPathSummary(Path const &path, size_t which, ModuleInPathSummary &sum)
void moduleDescriptionsInEndPath(std::string const &iEndPathLabel, std::vector< ModuleDescription const *> &descriptions, unsigned int hint) const
ExceptionToActionTable const & actionTable() const
returns the action table
T getParameter(std::string const &) const
void fillTrigPath(ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name, TrigResPtr, std::vector< std::string > const &endPathNames, ConditionalTaskHelper const &conditionalTaskHelper)
std::vector< int > empty_trig_paths_
roAction_t actions[nactions]
bool getMapped(key_type const &k, value_type &result) const
std::vector< edm::propagate_const< WorkerPtr > > pathStatusInserterWorkers_
void endStream(StreamID iID, StreamContext &streamContext)
virtual void replaceModuleFor(Worker *) const =0
ProductList const & productList() const
std::unordered_multimap< std::string, AliasInfo > const & aliasMap() const
void processAccumulatorsAsync(WaitingTaskHolder, typename T::TransitionInfoType const &, ServiceToken const &, StreamID, ParentContext const &, typename T::Context const *)
std::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
static PFTauRenderPlugin instance
std::shared_ptr< HLTGlobalStatus > TrigResPtr
WorkersInPath::size_type size_type
int totalEventsPassed() const
ret
prodAgent to be discontinued
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 processOneEventAsync(WaitingTaskHolder iTask, EventTransitionInfo &, ServiceToken const &token, std::vector< edm::propagate_const< std::shared_ptr< PathStatusInserter >>> &pathStatusInserters)
std::vector< BranchToCount > earlyDeleteBranchToCount_
std::unordered_multimap< std::string, AliasInfo > aliasMap_
void setupOnDemandSystem(EventTransitionInfo const &)
void addContextAndPrintException(char const *context, cms::Exception &ex, bool disablePrint)
void addToAllWorkers(Worker *w)
std::string const & moduleName() const
StreamSchedule(std::shared_ptr< TriggerResultInserter > inserter, std::vector< edm::propagate_const< std::shared_ptr< PathStatusInserter >>> &pathStatusInserters, std::vector< edm::propagate_const< std::shared_ptr< EndPathStatusInserter >>> &endPathStatusInserters, std::shared_ptr< ModuleRegistry >, ParameterSet &proc_pset, service::TriggerNamesService const &tns, PreallocationConfiguration const &prealloc, ProductRegistry &pregistry, ExceptionToActionTable const &actions, std::shared_ptr< ActivityRegistry > areg, std::shared_ptr< ProcessConfiguration const > processConfiguration, StreamID streamID, ProcessContext const *processContext)
std::vector< Worker * > tryToPlaceConditionalModules(Worker *, std::unordered_set< std::string > &conditionalModules, std::unordered_multimap< std::string, edm::BranchDescription const *> const &conditionalModuleBranches, std::unordered_multimap< std::string, AliasInfo > const &aliasMap, ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration)
edm::propagate_const< WorkerPtr > results_inserter_
void deleteModuleIfExists(std::string const &moduleLabel)
std::shared_ptr< Worker > WorkerPtr
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
StreamID streamID() const
ConditionalTaskHelper(ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration, WorkerManager &workerManager, std::vector< std::string > const &trigPathNames)
unsigned int number_of_unscheduled_modules_
int totalEventsFailed() const
TEMPL(T2) struct Divides void
WorkerManager workerManager_
std::shared_ptr< ActivityRegistry > actReg_
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
T getUntrackedParameter(std::string const &, T const &) const
constexpr element_type const * get() const
oneapi::tbb::task_group * group() const noexcept
void processEDAliases(std::vector< std::string > const &aliasNamesToProcess, std::unordered_set< std::string > const &aliasModulesToProcess, ParameterSet const &proc_pset, std::string const &processName, ProductRegistry &preg)
std::vector< WorkerInPath > PathWorkers
std::vector< int > empty_end_paths_
void doneWaiting(std::exception_ptr iExcept)
void fillEndPath(ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration, int bitpos, std::string const &name, std::vector< std::string > const &endPathNames, ConditionalTaskHelper const &conditionalTaskHelper)
void processSwitchEDAliases(ParameterSet const &proc_pset, ProductRegistry &preg, ProcessConfiguration const &processConfiguration, std::unordered_set< std::string > const &allConditionalMods)
void moduleDescriptionsInPath(std::string const &iPathLabel, std::vector< ModuleDescription const *> &descriptions, unsigned int hint) const
TrigResConstPtr results() const
Strings const & getTrigPaths() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
def unique(seq, keepstr=True)
StreamContext streamContext_
std::vector< std::string > vstring
virtual std::vector< ConsumesInfo > consumesInfo() const =0
static void fillPathSummary(Path const &path, PathSummary &sum)
void finishedPaths(std::atomic< std::exception_ptr *> &, WaitingTaskHolder, EventTransitionInfo &)
FunctorWaitingTask< F > * make_waiting_task(F f)
bool typeIsViewCompatible(TypeID const &requestedViewType, TypeID const &wrappedtypeID, std::string const &className)
std::exception_ptr finishProcessOneEvent(std::exception_ptr)
ServiceToken lock() const
void deleteModule(std::string const &iLabel)
Delete the module with label iLabel.
static void fillWorkerSummaryAux(Worker const &w, WorkerSummary &sum)
virtual Types moduleType() const =0
Log< level::Info, false > LogInfo
void beginStream(StreamID iID, StreamContext &streamContext)
ModuleDescription const * description() const
std::string const & className() const
void clearCounters()
Clear all the counters in the trigger report.
void initializeEarlyDelete(ModuleRegistry &modReg, std::vector< std::string > const &branchesToDeleteEarly, edm::ProductRegistry const &preg)
void fillAliasMap(ParameterSet const &proc_pset, std::unordered_set< std::string > const &allConditionalMods)
Strings const & getEndPaths() const
void getTriggerReport(TriggerReport &rep) const
void addToUnscheduledWorkers(ParameterSet &pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration, std::string label, std::set< std::string > &unscheduledLabels, std::vector< std::string > &shouldBeUsedLabels)
exception_actions::ActionCodes find(const std::string &category) const
std::vector< unsigned int > earlyDeleteHelperToBranchIndicies_
void forAllModuleHolders(F iFunc)
edm::propagate_const< TrigResPtr > results_
bool search_all(ForwardSequence const &s, Datum const &d)
constexpr T & get_underlying(propagate_const< T > &)
void addContext(std::string const &context)
virtual std::unique_ptr< OutputModuleCommunicator > createOutputModuleCommunicator()=0
std::vector< ModuleDescription const * > getAllModuleDescriptions() const
static void fillWorkerSummary(Worker const *pw, WorkerSummary &sum)
std::string const & processName() const
std::atomic< bool > skippingEvent_
void setupResolvers(Principal &principal)
void replaceModule(maker::ModuleHolder *iMod, std::string const &iLabel)
clone the type of module with label iLabel but configure with iPSet.
void fillWorkers(ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration, std::string const &name, bool ignoreFilters, PathWorkers &out, std::vector< std::string > const &endPathNames, ConditionalTaskHelper const &conditionalTaskHelper)
std::vector< edm::propagate_const< WorkerPtr > > endPathStatusInserterWorkers_
void makePathStatusInserters(std::vector< edm::propagate_const< std::shared_ptr< PathStatusInserter >>> &pathStatusInserters, std::vector< edm::propagate_const< std::shared_ptr< EndPathStatusInserter >>> &endPathStatusInserters, ExceptionToActionTable const &actions)
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
std::unordered_multimap< std::string, edm::BranchDescription const * > conditionalModuleBranches(std::unordered_set< std::string > const &conditionalmods) const
std::vector< ModuleInPathSummary > moduleInPathSummaries
void availablePaths(std::vector< std::string > &oLabelsToFill) const
adds to oLabelsToFill the labels for all paths in the process
unsigned int value() const
auto wrap(F iFunc) -> decltype(iFunc())
std::unordered_multimap< std::string, edm::BranchDescription const * > conditionalModsBranches_
Log< level::Warning, false > LogWarning
std::list< std::string > const & context() const
std::string const & moduleLabel() const
T mod(const T &a, const T &b)
std::string const & name() const
std::vector< std::string > vstring
static Registry * instance()
std::vector< EarlyDeleteHelper > earlyDeleteHelpers_
void addToAllWorkers(Worker *w)
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e)
ParameterSet * getPSetForUpdate(std::string const &name, bool &isTracked)