| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Member Functions | List of all members
Gaudi::Functional::ScalarTransformer< ScalarOp, Out(const In &...), Traits_ > Class Template Reference

`#include <GaudiAlg/ScalarTransformer.h>`

Inheritance diagram for Gaudi::Functional::ScalarTransformer< ScalarOp, Out(const In &...), Traits_ >:
[legend]
Collaboration diagram for Gaudi::Functional::ScalarTransformer< ScalarOp, Out(const In &...), Traits_ >:
[legend]

## Public Member Functions
Out | operator() (const In &... in) const override final
| The main operator. More...

## Private Member Functions
const ScalarOp & | scalarOp () const
| Access the scalar operator. More...

## Detailed Description

### template<typename ScalarOp, typename Out, typename... In, typename Traits_>
class Gaudi::Functional::ScalarTransformer< ScalarOp, Out(const In &...), Traits_ >

Definition at line 12 of file ScalarTransformer.h.

## Member Function Documentation

## ◆ operator()()

template<typename ScalarOp , typename Out , typename... In, typename Traits_ >

Out Gaudi::Functional::ScalarTransformer< ScalarOp, Out(const In &...), Traits_ >::operator() | ( | const In &... | in | ) | const
| inline final override

The main operator.

Call the scalar operator with the objects obtained from the given tuple as arguments

Definition at line 21 of file ScalarTransformer.h.

21 {
22 const auto inrange = details::zip::const_range( in... );
23 Out out;
24 out.reserve( inrange.size() );
25 auto& scalar = scalarOp();
26 for ( const auto&& tuple : inrange ) {
28 details::invoke_optionally(
29 [&out]( auto&& arg ) { details::insert( out, std::forward<decltype( arg )>( arg ) ); },
30 std::apply( [&]( const auto&... i ) { return scalar( details::deref( i )... ); }, tuple ) );
31 }
32 details::applyPostProcessing( scalar, out );
33 return out;
34 }
Gaudi::Functional::details::insert
constexpr struct Gaudi::Functional::details::insert_t insert
Gaudi::Functional::details::deref
constexpr struct Gaudi::Functional::details::deref_t deref
Gaudi::Functional::details::invoke_optionally
constexpr struct Gaudi::Functional::details::invoke_optionally_t invoke_optionally
Gaudi::Functional::details::applyPostProcessing
constexpr void applyPostProcessing(const Fun &, Container &, Args...)
Definition: FunctionalDetails.h:560
Gaudi::Functional::details::zip::const_range
decltype(auto) const_range(Args &&... args)
Zips multiple containers together to form a single const range.
Definition: FunctionalDetails.h:80
Gaudi::Functional::ScalarTransformer< ScalarOp, Out(const In &...), Traits_ >::scalarOp
const ScalarOp & scalarOp() const
Access the scalar operator.
Definition: ScalarTransformer.h:15
std::forward
T forward(T... args)

## ◆ scalarOp()

template<typename ScalarOp , typename Out , typename... In, typename Traits_ >

const ScalarOp& Gaudi::Functional::ScalarTransformer< ScalarOp, Out(const In &...), Traits_ >::scalarOp | ( |  | ) | const
| inline private

Access the scalar operator.

Definition at line 15 of file ScalarTransformer.h.

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

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

- GaudiAlg/GaudiAlg/ScalarTransformer.h