The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ > Class Template Reference

#include </builds/gaudi/Gaudi/GaudiFunctional/include/Gaudi/Functional/ScalarTransformer.h>

Inheritance diagram for Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >:
Collaboration diagram for Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >:

Public Member Functions

std::tuple< Out... > operator() (const In &... in) const override final
 The main operator.

Private Member Functions

const ScalarOp & scalarOp () const
 Access the scalar operator.

Detailed Description

template<typename ScalarOp, typename... Out, typename... In, typename Traits_>
class Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >

Definition at line 56 of file ScalarTransformer.h.

Member Function Documentation

◆ operator()()

template<typename ScalarOp, typename... Out, typename... In, typename Traits_>
std::tuple< Out... > Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >::operator() ( const In &... in) const
inlinefinaloverride

The main operator.

Call the scalar operator with the objects obtained from the given indata, and invoke insert with it (unless the resulting type is an optional, and the optional is not engaged)

Definition at line 66 of file ScalarTransformer.h.

66 {
67 const auto inrange = details::zip::range( in... );
68 std::tuple<Out...> out;
69 std::apply( [sz = inrange.size()]( auto&&... o ) { ( o.reserve( sz ), ... ); }, out );
70 auto& scalar = scalarOp();
71 for ( const auto& indata : inrange ) {
73 [&scalar, &indata]( auto&... out ) {
78 [&out...]( auto&& outdata ) {
79 std::apply(
80 [&out...]( auto&&... outdata1 ) {
81 ( details::insert( out, std::forward<decltype( outdata1 )>( outdata1 ) ), ... );
82 },
83 std::forward<decltype( outdata )>( outdata ) );
84 },
85 std::apply( [&scalar]( const auto&... args ) { return scalar( details::deref( args )... ); },
86 indata ) );
87 },
88 out );
89 }
91 return out;
92 }
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
Definition zip.h:67
void applyPostProcessing(const Fun &fun, Container &c)
constexpr struct Gaudi::Functional::details::invoke_optionally_t invoke_optionally

◆ scalarOp()

template<typename ScalarOp, typename... Out, typename... In, typename Traits_>
const ScalarOp & Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >::scalarOp ( ) const
inlineprivate

Access the scalar operator.

Definition at line 60 of file ScalarTransformer.h.

60{ return static_cast<const ScalarOp&>( *this ); }

The documentation for this class was generated from the following file: