50 template <
typename InputIterator,
typename ForwardIterator,
typename Func>
51 void transform_into(InputIterator begin, InputIterator
end, ForwardIterator
out, Func
func) {
52 for (; begin !=
end; ++begin, ++
out)
61 template <
typename FROM,
typename TO,
typename FUNC>
62 void fill_summary(FROM
const& from, TO&
to, FUNC
func) {
63 if (
to.size() != from.size()) {
65 transform_into(from.begin(), from.end(),
temp.begin(),
func);
68 transform_into(from.begin(), from.end(),
to.begin(),
func);
78 std::shared_ptr<ActivityRegistry> areg,
79 std::shared_ptr<TriggerResultInserter> inserter) {
82 ptr->setActivityRegistry(areg);
86 void initializeBranchToReadingWorker(std::vector<std::string>
const& branchesToDeleteEarly,
87 ProductRegistry
const& preg,
88 std::multimap<std::string, Worker*>& branchToReadingWorker) {
89 auto vBranchesToDeleteEarly = branchesToDeleteEarly;
91 std::sort(vBranchesToDeleteEarly.begin(), vBranchesToDeleteEarly.end(), std::less<std::string>());
92 vBranchesToDeleteEarly.erase(
std::unique(vBranchesToDeleteEarly.begin(), vBranchesToDeleteEarly.end()),
93 vBranchesToDeleteEarly.end());
96 auto allBranchNames = preg.allBranchNames();
98 for (
auto&
b : allBranchNames) {
99 b.resize(
b.size() - 1);
101 std::sort(allBranchNames.begin(), allBranchNames.end(), std::less<std::string>());
102 std::vector<std::string>
temp;
103 temp.reserve(vBranchesToDeleteEarly.size());
106 vBranchesToDeleteEarly.end(),
107 allBranchNames.begin(),
108 allBranchNames.end(),
109 std::back_inserter(
temp));
110 vBranchesToDeleteEarly.swap(
temp);
111 if (
temp.size() != vBranchesToDeleteEarly.size()) {
112 std::vector<std::string> missingProducts;
115 vBranchesToDeleteEarly.begin(),
116 vBranchesToDeleteEarly.end(),
117 std::back_inserter(missingProducts));
118 LogInfo l(
"MissingProductsForCanDeleteEarly");
119 l <<
"The following products in the 'canDeleteEarly' list are not available in this job and will be ignored.";
120 for (
auto const&
n : missingProducts) {
126 for (
auto const&
branch : vBranchesToDeleteEarly) {
127 branchToReadingWorker.insert(std::make_pair(
branch, static_cast<Worker*>(
nullptr)));
133 WorkerManager& workerManager,
134 ProductRegistry& preg,
135 PreallocationConfiguration
const* prealloc,
136 std::shared_ptr<ProcessConfiguration const> processConfiguration) {
139 if (modpset ==
nullptr) {
144 return workerManager.getWorker(*modpset, preg, prealloc, processConfiguration,
moduleLabel);
150 typedef std::vector<std::string>
vstring;
161 std::shared_ptr<ProcessConfiguration const> processConfiguration,
163 std::vector<std::string>
const& trigPathNames) {
164 std::unordered_set<std::string> allConditionalMods;
165 for (
auto const&
pathName : trigPathNames) {
169 auto itCondBegin =
std::find(modnames.begin(), modnames.end(),
"#");
170 if (itCondBegin == modnames.end())
174 allConditionalMods.insert(itCondBegin + 1, std::prev(modnames.end()));
177 for (
auto const&
cond : allConditionalMods) {
179 (
void)getWorker(
cond, proc_pset, workerManager, preg, prealloc, processConfiguration);
187 if (allConditionalMods.find(
prod.first.moduleLabel()) != allConditionalMods.end()) {
196 std::unordered_set<std::string>
const& conditionalmods)
const {
197 std::multimap<std::string, edm::BranchDescription const*>
ret;
198 for (
auto const&
mod : conditionalmods) {
207 auto aliases = proc_pset.
getParameter<std::vector<std::string>>(
"@all_aliases");
209 for (
auto const&
alias : aliases) {
211 auto aliasedToModuleLabels =
info.getParameterNames();
212 for (
auto const&
mod : aliasedToModuleLabels) {
213 if (not
mod.empty() and
mod[0] !=
'@' and allConditionalMods.find(
mod) != allConditionalMods.end()) {
214 auto aliasVPSet =
info.getParameter<std::vector<edm::ParameterSet>>(
mod);
215 for (
auto const& aliasPSet : aliasVPSet) {
219 if (aliasPSet.exists(
"type")) {
222 if (aliasPSet.exists(
"toProductInstance")) {
225 if (aliasPSet.exists(
"fromProductInstance")) {
226 originalInstance = aliasPSet.getParameter<
std::string>(
"fromProductInstance");
239 std::unordered_set<std::string>
const& allConditionalMods) {
240 auto const& all_modules = proc_pset.
getParameter<std::vector<std::string>>(
"@all_modules");
241 std::vector<std::string> switchEDAliases;
242 for (
auto const&
module : all_modules) {
244 if (mod_pset.getParameter<
std::string>(
"@module_type") ==
"SwitchProducer") {
245 auto const& all_cases = mod_pset.
getParameter<std::vector<std::string>>(
"@all_cases");
246 for (
auto const& case_label : all_cases) {
249 switchEDAliases.push_back(case_label);
255 switchEDAliases, allConditionalMods, proc_pset, processConfiguration.
processName(), preg);
265 std::shared_ptr<TriggerResultInserter> inserter,
268 std::shared_ptr<ModuleRegistry> modReg,
275 std::shared_ptr<ActivityRegistry> areg,
276 std::shared_ptr<ProcessConfiguration> processConfiguration,
279 : workerManager_(modReg, areg,
actions),
287 number_of_unscheduled_modules_(0),
289 streamContext_(streamID_, processContext),
290 skippingEvent_(
false) {
291 bool hasPath =
false;
292 std::vector<std::string>
const& pathNames = tns.
getTrigPaths();
293 std::vector<std::string>
const& endPathNames = tns.
getEndPaths();
296 proc_pset, preg, &prealloc, processConfiguration,
workerManager_, pathNames);
300 for (
auto const& trig_name : pathNames) {
304 processConfiguration,
309 conditionalTaskHelper);
325 for (
auto const& end_path_name : endPathNames) {
327 proc_pset, preg, &prealloc, processConfiguration, bitpos, end_path_name, endPathNames, conditionalTaskHelper);
334 std::set<std::string> usedWorkerLabels;
336 usedWorkerLabels.insert(worker->description()->moduleLabel());
338 std::vector<std::string> modulesInConfig(proc_pset.
getParameter<std::vector<std::string>>(
"@all_modules"));
339 std::set<std::string> modulesInConfigSet(modulesInConfig.begin(), modulesInConfig.end());
340 std::vector<std::string> unusedLabels;
342 modulesInConfigSet.end(),
343 usedWorkerLabels.begin(),
344 usedWorkerLabels.end(),
345 back_inserter(unusedLabels));
346 std::set<std::string> unscheduledLabels;
347 std::vector<std::string> shouldBeUsedLabels;
348 if (!unusedLabels.empty()) {
353 for (
auto const&
label : unusedLabels) {
357 assert(modulePSet !=
nullptr);
359 *modulePSet, preg, &prealloc, processConfiguration,
label, unscheduledLabels, shouldBeUsedLabels);
361 if (!shouldBeUsedLabels.empty()) {
362 std::ostringstream unusedStream;
363 unusedStream <<
"'" << shouldBeUsedLabels.front() <<
"'";
364 for (std::vector<std::string>::iterator itLabel = shouldBeUsedLabels.begin() + 1,
365 itLabelEnd = shouldBeUsedLabels.end();
366 itLabel != itLabelEnd;
368 unusedStream <<
",'" << *itLabel <<
"'";
370 LogInfo(
"path") <<
"The following module labels are not assigned to any path:\n" << unusedStream.str() <<
"\n";
377 std::vector<std::string>
const& branchesToDeleteEarly,
380 std::multimap<std::string, Worker*> branchToReadingWorker;
381 initializeBranchToReadingWorker(branchesToDeleteEarly, preg, branchToReadingWorker);
383 const std::vector<std::string>
kEmpty;
384 std::map<Worker*, unsigned int> reserveSizeForWorker;
385 unsigned int upperLimitOnReadingWorker = 0;
386 unsigned int upperLimitOnIndicies = 0;
387 unsigned int nUniqueBranchesToDelete = branchToReadingWorker.size();
393 if (!branchToReadingWorker.empty()) {
399 auto found = branchToReadingWorker.equal_range(
desc.branchName());
401 --nUniqueBranchesToDelete;
402 branchToReadingWorker.erase(
found.first,
found.second);
409 if (branchToReadingWorker.empty()) {
416 if (
nullptr !=
pset) {
417 auto branches =
pset->getUntrackedParameter<std::vector<std::string>>(
"mightGet",
kEmpty);
418 if (not branches.empty()) {
419 ++upperLimitOnReadingWorker;
421 for (
auto const&
branch : branches) {
422 auto found = branchToReadingWorker.equal_range(
branch);
424 ++upperLimitOnIndicies;
425 ++reserveSizeForWorker[
w];
426 if (
nullptr ==
found.first->second) {
429 branchToReadingWorker.insert(make_pair(
found.first->first,
w));
436 auto it = branchToReadingWorker.begin();
437 std::vector<std::string> unusedBranches;
438 while (it != branchToReadingWorker.end()) {
439 if (it->second ==
nullptr) {
440 unusedBranches.push_back(it->first);
444 branchToReadingWorker.erase(
temp);
449 if (not unusedBranches.empty()) {
451 l <<
"The following products in the 'canDeleteEarly' list are not used in this job and will be ignored.\n" 452 " If possible, remove the producer from the job or add the product to the producer's own 'mightGet' list.";
453 for (
auto const&
n : unusedBranches) {
458 if (!branchToReadingWorker.empty()) {
462 std::map<const Worker*, EarlyDeleteHelper*> alreadySeenWorkers;
464 size_t nextOpenIndex = 0;
466 for (
auto& branchAndWorker : branchToReadingWorker) {
467 if (lastBranchName != branchAndWorker.first) {
469 BranchID bid(branchAndWorker.first +
".");
471 lastBranchName = branchAndWorker.first;
473 auto found = alreadySeenWorkers.find(branchAndWorker.second);
474 if (alreadySeenWorkers.end() ==
found) {
479 size_t index = nextOpenIndex;
480 size_t nIndices = reserveSizeForWorker[branchAndWorker.second];
484 alreadySeenWorkers.insert(std::make_pair(branchAndWorker.second, &(
earlyDeleteHelpers_.back())));
485 nextOpenIndex += nIndices;
495 if (itLast->end() != it->begin()) {
497 unsigned int delta = it->begin() - itLast->end();
498 it->shiftIndexPointers(
delta);
512 p.setEarlyDeleteHelpers(alreadySeenWorkers);
515 p.setEarlyDeleteHelpers(alreadySeenWorkers);
523 std::unordered_set<std::string>& conditionalModules,
524 std::multimap<std::string, edm::BranchDescription const*>
const& conditionalModuleBranches,
525 std::multimap<std::string, AliasInfo>
const& aliasMap,
529 std::shared_ptr<ProcessConfiguration const> processConfiguration) {
530 std::vector<Worker*> returnValue;
533 using namespace productholderindexhelper;
534 for (
auto const& ci : consumesInfo) {
535 if (not ci.skipCurrentProcess() and
536 (ci.process().empty()
or ci.process() == processConfiguration->processName())) {
537 auto productModuleLabel = ci.label();
538 if (productModuleLabel.empty()) {
540 for (
auto const&
branch : conditionalModuleBranches) {
542 if (conditionalModules.find(
branch.first) == conditionalModules.end()) {
546 if (
branch.second->unwrappedTypeID() != ci.type()) {
551 ci.type(),
TypeID(
branch.second->wrappedType().typeInfo()),
branch.second->className())) {
556 auto condWorker = getWorker(
branch.first, proc_pset,
workerManager_, preg, prealloc, processConfiguration);
559 conditionalModules.erase(
branch.first);
563 conditionalModuleBranches,
568 processConfiguration);
569 returnValue.insert(returnValue.end(), dependents.begin(), dependents.end());
570 returnValue.push_back(condWorker);
574 bool productFromConditionalModule =
false;
575 auto itFound = conditionalModules.find(productModuleLabel);
576 if (itFound == conditionalModules.end()) {
578 auto findAlias = aliasMap.equal_range(productModuleLabel);
579 for (
auto it = findAlias.first; it != findAlias.second; ++it) {
581 productModuleLabel = it->second.originalModuleLabel;
582 if (it->second.instanceLabel ==
"*" or ci.instance() == it->second.instanceLabel) {
583 if (it->second.friendlyClassName ==
"*" or 584 (ci.type().friendlyClassName() == it->second.friendlyClassName)) {
585 productFromConditionalModule =
true;
591 auto branches = conditionalModuleBranches.equal_range(productModuleLabel);
592 for (
auto itBranch = branches.first; itBranch != branches.second; ++it) {
593 if (it->second.originalInstanceLabel ==
"*" or 594 itBranch->second->productInstanceName() == it->second.originalInstanceLabel) {
596 TypeID(itBranch->second->wrappedType().typeInfo()),
598 productFromConditionalModule =
true;
603 if (productFromConditionalModule) {
609 if (productFromConditionalModule) {
610 itFound = conditionalModules.find(productModuleLabel);
612 if (itFound == conditionalModules.end()) {
618 auto findBranches = conditionalModuleBranches.equal_range(productModuleLabel);
619 for (
auto itBranch = findBranches.first; itBranch != findBranches.second; ++itBranch) {
620 if (itBranch->second->productInstanceName() == ci.instance()) {
622 if (ci.type() == itBranch->second->unwrappedTypeID()) {
623 productFromConditionalModule =
true;
629 TypeID(itBranch->second->wrappedType().typeInfo()),
631 productFromConditionalModule =
true;
638 if (productFromConditionalModule) {
640 getWorker(productModuleLabel, proc_pset,
workerManager_, preg, prealloc, processConfiguration);
643 conditionalModules.erase(itFound);
647 conditionalModuleBranches,
652 processConfiguration);
653 returnValue.insert(returnValue.end(), dependents.begin(), dependents.end());
654 returnValue.push_back(condWorker);
665 std::shared_ptr<ProcessConfiguration const> processConfiguration,
669 std::vector<std::string>
const& endPathNames,
675 auto itCondBegin =
std::find(modnames.begin(), modnames.end(),
"#");
677 std::unordered_set<std::string> conditionalmods;
679 std::multimap<std::string, AliasInfo> aliasMap;
680 std::multimap<std::string, edm::BranchDescription const*> conditionalModsBranches;
681 std::unordered_map<std::string, unsigned int> conditionalModOrder;
682 if (itCondBegin != modnames.end()) {
683 for (
auto it = itCondBegin + 1; it != modnames.begin() + modnames.size() - 1; ++it) {
685 conditionalModOrder.emplace(*it, it - modnames.begin() - 1);
688 conditionalmods = std::unordered_set<std::string>(
689 std::make_move_iterator(itCondBegin + 1), std::make_move_iterator(modnames.begin() + modnames.size() - 1));
693 modnames.erase(itCondBegin, modnames.end());
695 unsigned int placeInPath = 0;
696 for (
auto const&
name : modnames) {
698 bool doNotRunConcurrently =
false;
700 if (
name[0] ==
'!') {
702 }
else if (
name[0] ==
'-' or name[0] ==
'+') {
707 doNotRunConcurrently =
true;
716 if (worker ==
nullptr) {
722 <<
"The unknown module label \"" <<
moduleLabel <<
"\" appears in " << pathType <<
" \"" <<
pathName 723 <<
"\"\n please check spelling or remove that label from the path.";
734 <<
"' with module label '" <<
moduleLabel <<
"' appears on EndPath '" 736 <<
"The return value of the filter will be ignored.\n" 737 <<
"To suppress this warning, either remove the filter from the endpath,\n" 738 <<
"or explicitly ignore it in the configuration by using cms.ignore().\n";
741 bool runConcurrently = not doNotRunConcurrently;
743 runConcurrently =
false;
748 conditionalModsBranches,
753 processConfiguration);
754 for (
auto condMod : condModules) {
755 tmpworkers.emplace_back(
756 condMod,
WorkerInPath::Ignore, conditionalModOrder[condMod->description()->moduleLabel()],
true);
759 tmpworkers.emplace_back(worker, filterAction, placeInPath, runConcurrently);
763 out.swap(tmpworkers);
769 std::shared_ptr<ProcessConfiguration const> processConfiguration,
773 std::vector<std::string>
const& endPathNames,
777 proc_pset, preg, prealloc, processConfiguration,
name,
false, tmpworkers, endPathNames, conditionalTaskHelper);
780 if (!tmpworkers.empty()) {
801 std::shared_ptr<ProcessConfiguration const> processConfiguration,
804 std::vector<std::string>
const& endPathNames,
808 proc_pset, preg, prealloc, processConfiguration,
name,
true, tmpworkers, endPathNames, conditionalTaskHelper);
810 if (!tmpworkers.empty()) {
836 if (worker->description()->moduleLabel() == iLabel) {
841 if (
nullptr ==
found) {
852 std::vector<ModuleDescription const*>
result;
888 results_->at(empty_trig_path) = hltPathStatus;
889 pathStatusInserters[empty_trig_path]->setPathStatus(
streamID_, hltPathStatus);
911 auto pathErrorHolder = std::make_unique<std::atomic<std::exception_ptr*>>(
nullptr);
912 auto pathErrorPtr = pathErrorHolder.get();
915 [iTask,
this, weakToken, pathError =
std::move(pathErrorHolder)](std::exception_ptr
const* iPtr)
mutable {
918 std::exception_ptr ptr;
919 if (pathError->load()) {
920 ptr = *pathError->load();
921 delete pathError->load();
923 if ((not ptr) and iPtr) {
933 auto pathsDone =
make_waiting_task([allPathsHolder, pathErrorPtr, transitionInfo =
info,
this, weakToken](
934 std::exception_ptr
const* iPtr)
mutable {
940 pathErrorPtr->store(
new std::exception_ptr(*iPtr));
979 *(iExcept.load()) = std::exception_ptr();
981 *(iExcept.load()) = std::current_exception();
984 *(iExcept.load()) = std::current_exception();
988 if ((not iExcept) and
results_->accept()) {
1002 std::rethrow_exception(expt);
1007 std::ostringstream ost;
1008 ost <<
"Processing Event " <<
info.principal().id();
1011 iExcept.store(
new std::exception_ptr(std::current_exception()));
1015 iExcept.store(
new std::exception_ptr(std::current_exception()));
1019 std::exception_ptr ptr;
1021 ptr = *iExcept.load();
1034 bool const cleaningUpAfterException =
false;
1040 iExcept = std::current_exception();
1048 iExcept = std::current_exception();
1062 std::back_inserter(oLabelsToFill),
1063 std::bind(&
Path::name, std::placeholders::_1));
1067 TrigPaths::const_iterator itFound = std::find_if(
1070 std::bind(std::equal_to<std::string>(), iPathLabel, std::bind(&
Path::name, std::placeholders::_1)));
1072 oLabelsToFill.reserve(itFound->size());
1073 for (
size_t i = 0;
i < itFound->size(); ++
i) {
1074 oLabelsToFill.push_back(itFound->getWorker(
i)->description()->moduleLabel());
1080 std::vector<ModuleDescription const*>& descriptions,
1081 unsigned int hint)
const {
1082 descriptions.clear();
1084 TrigPaths::const_iterator itFound;
1088 if (itFound->name() == iPathLabel)
1093 itFound = std::find_if(
1096 std::bind(std::equal_to<std::string>(), iPathLabel, std::bind(&
Path::name, std::placeholders::_1)));
1101 descriptions.reserve(itFound->size());
1102 for (
size_t i = 0;
i < itFound->size(); ++
i) {
1103 descriptions.push_back(itFound->getWorker(
i)->description());
1109 std::vector<ModuleDescription const*>& descriptions,
1110 unsigned int hint)
const {
1111 descriptions.clear();
1113 TrigPaths::const_iterator itFound;
1117 if (itFound->name() == iEndPathLabel)
1122 itFound = std::find_if(
1125 std::bind(std::equal_to<std::string>(), iEndPathLabel, std::bind(&
Path::name, std::placeholders::_1)));
1130 descriptions.reserve(itFound->size());
1131 for (
size_t i = 0;
i < itFound->size(); ++
i) {
1132 descriptions.push_back(itFound->getWorker(
i)->description());
1156 std::vector<ModuleInPathSummary>
temp(sz);
1157 for (
size_t i = 0;
i != sz; ++
i) {
1163 for (
size_t i = 0;
i != sz; ++
i) {
1191 using std::placeholders::_1;
1224 unsigned int indexEmpty = 0;
1225 unsigned int indexOfPath = 0;
1226 for (
auto& pathStatusInserter : pathStatusInserters) {
1227 std::shared_ptr<PathStatusInserter> inserterPtr =
get_underlying(pathStatusInserter);
1231 workerPtr->setActivityRegistry(
actReg_);
1240 trig_paths_.at(indexOfPath).setPathStatusInserter(inserterPtr.get(), workerPtr.get());
1249 for (
auto& endPathStatusInserter : endPathStatusInserters) {
1250 std::shared_ptr<EndPathStatusInserter> inserterPtr =
get_underlying(endPathStatusInserter);
1254 workerPtr->setActivityRegistry(
actReg_);
1263 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_
std::multimap< std::string, edm::BranchDescription const * > conditionalModsBranches_
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
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 addToUnscheduledWorkers(ParameterSet &pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration > processConfiguration, std::string label, std::set< std::string > &unscheduledLabels, std::vector< std::string > &shouldBeUsedLabels)
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_
void setupOnDemandSystem(EventTransitionInfo const &)
void addContextAndPrintException(char const *context, cms::Exception &ex, bool disablePrint)
void addToAllWorkers(Worker *w)
std::string const & moduleName() const
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)
std::multimap< std::string, AliasInfo > aliasMap_
StreamID streamID() const
std::vector< Worker * > tryToPlaceConditionalModules(Worker *, std::unordered_set< std::string > &conditionalModules, std::multimap< std::string, edm::BranchDescription const *> const &conditionalModuleBranches, std::multimap< std::string, AliasInfo > const &aliasMap, ParameterSet &proc_pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration)
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)
std::multimap< std::string, edm::BranchDescription const * > conditionalModuleBranches(std::unordered_set< std::string > const &conditionalmods) const
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)
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, BranchIDListHelper &branchIDListHelper, ExceptionToActionTable const &actions, std::shared_ptr< ActivityRegistry > areg, std::shared_ptr< ProcessConfiguration > processConfiguration, StreamID streamID, ProcessContext const *processContext)
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
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)
std::multimap< std::string, AliasInfo > const & aliasMap() const
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::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())
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)