1 #ifndef art_Framework_IO_Sources_put_product_in_principal_h 2 #define art_Framework_IO_Sources_put_product_in_principal_h 42 template <
typename T,
typename P>
43 std::enable_if_t<!detail::range_sets_supported(P::branch_type)>
50 if (product.get() ==
nullptr) {
52 <<
"put_product_in_principal: A null unique_ptr was passed to 'put'.\n" 53 <<
"The pointer is of type " << typeID <<
".\n" 54 <<
"The specified product instance name was '" << instance_name
58 auto const& process_name = principal.processConfiguration().processName();
60 typeID.friendlyClassName(), module_label, instance_name, process_name);
62 auto desc = principal.getProductDescription(
pid);
65 "put_product_in_principal: error while trying to " 66 "retrieve product description:\n")
67 <<
"No product is registered for\n" 68 <<
" process name: '" << process_name <<
"'\n" 69 <<
" module label: '" << module_label <<
"'\n" 70 <<
" product friendly class name: '" << typeID.friendlyClassName()
72 <<
" product instance name: '" << instance_name <<
"'\n" 73 <<
" branch type: '" << principal.branchType()
77 std::unique_ptr<EDProduct> wp = std::make_unique<Wrapper<T>>(
move(product));
82 std::make_unique<RangeSet>());
85 template <
typename T,
typename P>
86 std::enable_if_t<detail::range_sets_supported(P::branch_type)>
94 if (product.get() ==
nullptr) {
96 <<
"put_product_in_principal: A null unique_ptr was passed to 'put'.\n" 97 <<
"The pointer is of type " << typeID <<
".\n" 98 <<
"The specified product instance name was '" << instance_name
102 auto const& process_name = principal.processConfiguration().processName();
104 typeID.friendlyClassName(), module_label, instance_name, process_name);
106 auto desc = principal.getProductDescription(
pid);
109 "put_product_in_principal: error while trying to " 110 "retrieve product description:\n")
111 <<
"No product is registered for\n" 112 <<
" process name: '" << process_name <<
"'\n" 113 <<
" module label: '" << module_label <<
"'\n" 114 <<
" product friendly class name: '" << typeID.friendlyClassName()
116 <<
" product instance name: '" << instance_name <<
"'\n" 117 <<
" branch type: '" << principal.branchType()
126 std::unique_ptr<EDProduct> wp = std::make_unique<Wrapper<T>>(
move(product));
131 std::make_unique<RangeSet>(rs));
RunID const & runID() const
std::pair< float, std::string > P
RangeSet rangeSetFor(RunPrincipal const &rp)
static RangeSet forSubRun(SubRunID)
SubRunID subRunID() const
std::string canonicalProductName(std::string const &friendlyClassName, std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
std::enable_if_t<!detail::range_sets_supported(P::branch_type)> put_product_in_principal(std::unique_ptr< T > &&product, P &principal, std::string const &module_label, std::string const &instance_name={})
static RangeSet invalid()
static RangeSet forRun(RunID)
constexpr ProductStatus present() noexcept