@@ -354,38 +354,41 @@ namespace edm {
354354
355355 template <typename G, typename F>
356356 void registerTransform (edm::EDPutTokenT<G> iToken, F iF, std::string productInstance = std::string()) {
357- using ReturnTypeT = decltype (iF (std::declval<G>()));
357+ using ReturnTypeT = decltype (iF (std::declval<edm::StreamID>(), std::declval< G>()));
358358 TypeID returnType (typeid (ReturnTypeT));
359- TransformerBase::registerTransformImp (*this ,
360- EDPutToken (iToken),
361- returnType,
362- std::move (productInstance),
363- [f = std::move (iF)](edm::WrapperBase const & iGotProduct) {
364- return std::make_unique<edm::Wrapper<ReturnTypeT>>(
365- WrapperBase::Emplace{},
366- f (*static_cast <edm::Wrapper<G> const &>(iGotProduct).product ()));
367- });
359+ TransformerBase::registerTransformImp (
360+ *this ,
361+ EDPutToken (iToken),
362+ returnType,
363+ std::move (productInstance),
364+ [f = std::move (iF)](edm::StreamID id, std::any const & iGotProduct) {
365+ auto pGotProduct = std::any_cast<edm::WrapperBase const *>(iGotProduct);
366+ return std::make_unique<edm::Wrapper<ReturnTypeT>>(
367+ WrapperBase::Emplace{}, f (id, *static_cast <edm::Wrapper<G> const *>(pGotProduct)->product ()));
368+ });
368369 }
369370
370371 template <typename G, typename P, typename F>
371372 void registerTransformAsync (edm::EDPutTokenT<G> iToken,
372373 P iPre,
373374 F iF,
374375 std::string productInstance = std::string()) {
375- using CacheTypeT = decltype (iPre (std::declval<G>(), WaitingTaskWithArenaHolder ()));
376- using ReturnTypeT = decltype (iF (std::declval<CacheTypeT>()));
376+ using CacheTypeT =
377+ decltype (iPre (std::declval<edm::StreamID>(), std::declval<G>(), WaitingTaskWithArenaHolder ()));
378+ using ReturnTypeT = decltype (iF (std::declval<edm::StreamID>(), std::declval<CacheTypeT>()));
377379 TypeID returnType (typeid (ReturnTypeT));
378380 TransformerBase::registerTransformAsyncImp (
379381 *this ,
380382 EDPutToken (iToken),
381383 returnType,
382384 std::move (productInstance),
383- [p = std::move (iPre)](edm::WrapperBase const & iGotProduct, WaitingTaskWithArenaHolder iHolder) {
384- return std::any (p (*static_cast <edm::Wrapper<G> const &>(iGotProduct).product (), std::move (iHolder)));
385+ [p = std::move (iPre)](
386+ edm::StreamID id, edm::WrapperBase const & iGotProduct, WaitingTaskWithArenaHolder iHolder) {
387+ return std::any (p (id, *static_cast <edm::Wrapper<G> const &>(iGotProduct).product (), std::move (iHolder)));
385388 },
386- [f = std::move (iF)](std::any const & iCache) {
389+ [f = std::move (iF)](edm::StreamID id, std::any const & iCache) {
387390 auto cache = std::any_cast<CacheTypeT>(iCache);
388- return std::make_unique<edm::Wrapper<ReturnTypeT>>(WrapperBase::Emplace{}, f (cache));
391+ return std::make_unique<edm::Wrapper<ReturnTypeT>>(WrapperBase::Emplace{}, f (id, cache));
389392 });
390393 }
391394
0 commit comments