1 #ifndef art_Framework_IO_Sources_put_product_in_principal_h 2 #define art_Framework_IO_Sources_put_product_in_principal_h 29 template <
typename T,
typename P>
30 std::enable_if_t<P::branch_type == InEvent || P::branch_type == InResults>
33 std::string
const& module_label,
34 std::string
const& instance_name = {});
36 template <
typename T,
typename P>
37 std::enable_if_t<P::branch_type == InSubRun || P::branch_type == InRun>
40 std::string
const& module_label,
41 std::string
const& instance_name = {},
57 template <
typename T,
typename P>
62 std::string
const& module_label,
63 std::string
const& instance_name)
65 if (product.get() ==
nullptr) {
66 TypeID const typeID{
typeid(T)};
68 <<
"put_product_in_principal: A null unique_ptr was passed to 'put'.\n" 69 <<
"The pointer is of type " << typeID <<
".\n" 70 <<
"The specified product instance name was '" << instance_name <<
"'.\n";
74 get_ProductDescription<T>(principal, module_label, instance_name);
76 std::unique_ptr<EDProduct> wp =
77 std::make_unique<Wrapper<T>>(std::move(product));
78 principal.put(std::move(wp),
80 std::make_unique<ProductProvenance const>(
84 template <
typename T,
typename P>
89 std::string
const& module_label,
90 std::string
const& instance_name,
93 if (product.get() ==
nullptr) {
94 TypeID const typeID{
typeid(T)};
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 <<
"'.\n";
102 get_ProductDescription<T>(principal, module_label, instance_name);
109 std::unique_ptr<EDProduct> wp =
110 std::make_unique<Wrapper<T>>(std::move(product));
111 principal.put(std::move(wp),
113 std::make_unique<ProductProvenance const>(
std::enable_if_t< P::branch_type==InEvent||P::branch_type==InResults > put_product_in_principal(std::unique_ptr< T > &&product, P &principal, std::string const &module_label, std::string const &instance_name={})
RangeSet rangeSetFor(RunPrincipal const &rp)
ProductID productID() const
static RangeSet forRun(RunID)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
static RangeSet forSubRun(SubRunID)
static RangeSet invalid()