5 #include "range/v3/view/map.hpp" 32 map<string, set<string>> instanceToFriendlyNames;
33 for (
auto const& type_label : typeLabels |
keys) {
34 auto unique_entry = type_label.productInstanceName();
35 if (type_label.hasEmulatedModule()) {
42 unique_entry +=
"_" + type_label.emulatedModule();
44 auto result = instanceToFriendlyNames[unique_entry].emplace(
45 type_label.typeID().friendlyClassName());
48 "check_for_duplicate_friendly_names: ")
49 <<
"An attempt has been made to call the equivalent of\n\n" 50 <<
" produces<" << type_label.typeID().className() <<
">(\"" 51 << type_label.productInstanceName() <<
"\")\n\n" 52 <<
"which results in a prepared (\"friendly\") name of:\n\n" 53 <<
" " << *
result.first <<
"\n\n" 54 <<
"That friendly name has already been registered for this " 56 <<
"Please check to make sure that produces<> has not already " 58 <<
"called for an Assns<> with reversed template arguments. " 60 <<
"behavior is not supported. Contact artists@fnal.gov for " 74 oss <<
"An attempt was made to declare the following product in the same " 76 <<
"Branch type: " << bt <<
'\n' 77 <<
"Class name: " << tl.
className() <<
'\n' 81 "An error occurred during a call to 'produces' or 'reconstitutes'."}
84 return result.first->first;
91 auto& expectedProducts = typeLabelList_[
bt];
93 check_for_duplicate_friendly_names(expectedProducts);
95 for (
auto& [typeLabel, pd] : expectedProducts) {
std::string const & productInstanceName() const
std::string const & moduleLabel() const
std::map< TypeLabel, BranchDescription > TypeLabelLookup_t
ProcessConfiguration const & processConfiguration() const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
fhicl::ParameterSetID const & parameterSetID() const
void for_each_branch_type(F f)
std::string className() const