| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

`#include <GaudiAlg/ScalarTransformer.h>`

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

## Public Member Functions
std::tuple< Out... > | operator() (const In &...in) const final
| The main operator. More...
Public Member Functions inherited from Gaudi::Functional::MultiTransformer< std::tuple< Out... >(const In &...), Traits_ >
StatusCode | execute () override final
virtual std::tuple< Out... > | operator() (const In &...) const =0
Public Member Functions inherited from Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >
| DataHandleMixin (const std::string &name, ISvcLocator *pSvcLocator, const std::array< KeyValue, N_in > &inputs, const std::array< KeyValue, N_out > &outputs)
| DataHandleMixin (const std::string &name, ISvcLocator *locator, const KeyValue &input, const KeyValue &output)
| DataHandleMixin (const std::string &name, ISvcLocator *locator, const KeyValue &input, const std::array< KeyValue, N_out > &outputs)
| DataHandleMixin (const std::string &name, ISvcLocator *locator, const std::array< KeyValue, N_in > &inputs, const KeyValue &output)
template<std::size_t N = 0>
const std::string & | inputLocation () const
unsigned int | inputLocationSize () const
template<std::size_t N = 0>
const std::string & | outputLocation () const
unsigned int | outputLocationSize () const

## Private Member Functions
const ScalarOp & | scalarOp () const
| Access the scalar operator. More...
template<typename Tuple , std::size_t... I>
void | reserve (Tuple &t, const std::size_t resSize, std::index_sequence< I... >) const
| Reserve the given size in all output containers. More...
template<typename Tuple , typename Scalar , std::size_t... I>
decltype(auto) | getScalar (const Tuple &t, const Scalar &s, std::index_sequence< I... >) const
| Call the scalar operator with the objects obtained from the given tuple. More...
template<typename InTuple , typename OutTuple , std::size_t... I>
void | insert (InTuple &&in, OutTuple &out, std::index_sequence< I... >) const
| Insert the returned tuple of objects into the correct containers. More...

## Additional Inherited Members
Public Types inherited from Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >
using | KeyValue = std::pair< std::string, std::string >
Static Public Attributes inherited from Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >
static constexpr std::size_t | N_in = sizeof...(In)
static constexpr std::size_t | N_out = sizeof...(Out)
Protected Attributes inherited from Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >
std::tuple< details::InputHandle_t< Traits_, In >... > | m_inputs
std::tuple< details::OutputHandle_t< Traits_, Out >... > | m_outputs

## 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 55 of file ScalarTransformer.h.

## Member Function Documentation

template<typename ScalarOp , typename... Out, typename... In, typename Traits_ >
template<typename Tuple , typename Scalar , std::size_t... I>

decltype(auto) Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >::getScalar | ( | const Tuple & | t,
|  | const Scalar & | s,
|  | std::index_sequence< I... > |
| ) |  | const
| inline private

Call the scalar operator with the objects obtained from the given tuple.

Definition at line 75 of file ScalarTransformer.h.

78 {
79 return s( details::deref(std::get<I>(t))... );
80 }
Gaudi::Functional::details::deref
constexpr struct Gaudi::Functional::details::deref_t deref
gaudirun.s
string s
Definition: gaudirun.py:245
template<typename ScalarOp , typename... Out, typename... In, typename Traits_ >
template<typename InTuple , typename OutTuple , std::size_t... I>

void Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >::insert | ( | InTuple && | in,
|  | OutTuple & | out,
|  | std::index_sequence< I... > |
| ) |  | const
| inline private

Insert the returned tuple of objects into the correct containers.

Definition at line 84 of file ScalarTransformer.h.

85 {
86 if ( in )
87 { std::initializer_list<long unsigned int>
88 { ( details::insert( std::get<I>(out), std::move(std::get<I>(*in)) ), I )... }; }
89 }
Gaudi::Functional::details::insert
constexpr struct Gaudi::Functional::details::insert_t insert
std::move
T move(T...args)
std::initializer_list
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
| inline final

The main operator.

Definition at line 96 of file ScalarTransformer.h.

97 {
98 const auto inrange = details::zip::const_range(in...);
99 std::tuple<Out...> out;
100 reserve( out, inrange.size(), std::index_sequence_for<Out...>{} );
101 auto & scalar = scalarOp();
102 for ( const auto && i : inrange )
103 {
104 insert( getScalar( i, scalar, std::index_sequence_for<In...>{} ), out,
105 std::index_sequence_for<Out...>{} );
106 }
107 //details::apply( scalar, out ); // awaiting a post-processor call
108 return out;
109 }
Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >::getScalar
decltype(auto) getScalar(const Tuple &t, const Scalar &s, std::index_sequence< I... >) const
Call the scalar operator with the objects obtained from the given tuple.
Definition: ScalarTransformer.h:75
Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >::insert
void insert(InTuple &&in, OutTuple &out, std::index_sequence< I... >) const
Insert the returned tuple of objects into the correct containers.
Definition: ScalarTransformer.h:84
Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >::reserve
void reserve(Tuple &t, const std::size_t resSize, std::index_sequence< I... >) const
Reserve the given size in all output containers.
Definition: ScalarTransformer.h:66
Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >::scalarOp
const ScalarOp & scalarOp() const
Access the scalar operator.
Definition: ScalarTransformer.h:60
std::tuple
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:66
template<typename ScalarOp , typename... Out, typename... In, typename Traits_ >
template<typename Tuple , std::size_t... I>

void Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >::reserve | ( | Tuple & | t,
|  | const std::size_t | resSize,
|  | std::index_sequence< I... > |
| ) |  | const
| inline private

Reserve the given size in all output containers.

Definition at line 66 of file ScalarTransformer.h.

69 {
70 std::initializer_list<long unsigned int> { (std::get<I>(t).reserve(resSize),I)... };
71 }
Gaudi::Functional::MultiScalarTransformer< ScalarOp, std::tuple< Out... >(const In &...), Traits_ >::reserve
void reserve(Tuple &t, const std::size_t resSize, std::index_sequence< I... >) const
Reserve the given size in all output containers.
Definition: ScalarTransformer.h:66
std::initializer_list
template<typename ScalarOp , typename... Out, typename... In, typename Traits_ >

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

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:

- GaudiAlg/GaudiAlg/ScalarTransformer.h