1 #ifndef art_Framework_IO_ProductMix_MixOp_h 2 #define art_Framework_IO_ProductMix_MixOp_h 30 template <
typename Prod,
typename OProd>
33 template <
typename FUNC>
39 bool compactMissingProducts,
79 template <
typename Prod,
typename OProd>
80 template <
typename FUNC>
85 bool const outputProduct,
86 bool const compactMissingProducts,
99 template <
typename Prod,
typename OProd>
105 std::vector<Prod const*> inConverted;
106 inConverted.reserve(inProducts.size());
108 for (
auto const& ep : inProducts) {
110 std::dynamic_pointer_cast<
Wrapper<Prod> const>(ep)->product();
112 inConverted.emplace_back(prod);
116 catch (std::bad_cast
const&) {
118 <<
"Unable to obtain correctly-typed product from wrapper.\n";
121 auto rProd = std::make_unique<OProd>();
123 if (
mixFunc_(inConverted, *rProd, remap)) {
126 <<
"Returned true (output product to be put in event) from a mix " 128 <<
"declared with outputProduct=false.\n";
134 template <
typename Prod,
typename OProd>
141 template <
typename Prod,
typename OProd>
148 template <
typename Prod,
typename OProd>
154 TypeID const outputType{
typeid(OProd)};
156 auto const productName =
166 template <
typename Prod,
typename OProd>
BranchType branchType() const override
std::string const moduleLabel_
ProductID incomingProductID_
BranchType const branchType_
ProductID incomingProductID() const override
InputTag const & inputTag() const override
std::vector< std::shared_ptr< EDProduct const >> SpecProdList
bool const outputProduct_
EDProduct const * newIncomingWrappedProduct() const override
std::string const outputInstanceLabel_
MixOp(std::string const &moduleLabel, InputTag const &inputTag, std::string const &outputInstanceLabel, FUNC mixFunc, bool outputProduct, bool compactMissingProducts, BranchType bt)
std::function< bool(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &)> MixFunc
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
std::string canonicalProductName(std::string const &friendlyClassName, std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName)
bool const compactMissingProducts_
std::string const processName_
MixFunc< Prod, OProd > const mixFunc_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
TypeID inputType() const override
std::string const & processName() const
static constexpr ProductID invalid() noexcept
void mixAndPut(Event &e, SpecProdList const &inProducts, PtrRemapper const &remap) const override
static Globals * instance()
ProductID outgoingProductID() const override
void setIncomingProductID(ProductID) override