| The Gaudi Framework v32r1 (f65d50dc)

Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Attributes | List of all members
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true > Class Template Referenceabstract

`#include <GaudiAlg/SplittingTransformer.h>`

Inheritance diagram for Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >:
[legend]
Collaboration diagram for Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >:
[legend]

## Public Types
using | KeyValue = typename base_class::KeyValue
using | KeyValues = typename base_class::KeyValues
Public Types inherited from Gaudi::Functional::details::DataHandleMixin< void, std::tuple< In... >, Traits_ >
using | KeyValue = std::pair< std::string, std::string >
using | KeyValues = std::pair< std::string, std::vector< std::string > >

## Public Member Functions
| SplittingTransformer (const std::string &name, ISvcLocator *locator, const std::array< KeyValue, N > &inputs, const KeyValues &outputs)
| SplittingTransformer (const std::string &name, ISvcLocator *locator, const KeyValue &input, const KeyValues &output)
const std::string & | outputLocation (unsigned int n) const
unsigned int | outputLocationSize () const
StatusCode | execute () override final
virtual vector_of_< Out > | operator() (const In &...) const =0
Public Member Functions inherited from Gaudi::Functional::details::DataHandleMixin< void, std::tuple< In... >, Traits_ >
| DataHandleMixin (const std::string &name, ISvcLocator *pSvcLocator, const std::array< KeyValue, N_in > &inputs)
| DataHandleMixin (const std::string &name, ISvcLocator *locator, const KeyValue &input)
constexpr unsigned int | inputLocationSize () const

## Static Public Attributes
static constexpr std::size_t | N = base_class::N_in
Static Public Attributes inherited from Gaudi::Functional::details::DataHandleMixin< void, std::tuple< In... >, Traits_ >
static constexpr std::size_t | N_in = sizeof...( In )

## Private Types
using | base_class = details::DataHandleMixin< void, std::tuple< In... >, Traits_ >
template<typename T >
using | OutputHandle = details::OutputHandle_t< Traits_, details::remove_optional_t< T > >

## Private Attributes
std::vector< OutputHandle< Out > > | m_outputs
Gaudi::Property< std::vector< std::string > > | m_outputLocations

## Additional Inherited Members
Protected Member Functions inherited from Gaudi::Functional::details::DataHandleMixin< void, std::tuple< In... >, Traits_ >
bool | isReEntrant () const override
Protected Attributes inherited from Gaudi::Functional::details::DataHandleMixin< void, std::tuple< In... >, Traits_ >
std::tuple< details::InputHandle_t< Traits_, In >... > | m_inputs

## Detailed Description

### template<typename Out, typename... In, typename Traits_>
class Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >

Definition at line 26 of file SplittingTransformer.h.

## Member Typedef Documentation

## ◆ base_class

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

using Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::base_class = details::DataHandleMixin<void, std::tuple<In...>, Traits_>
| private

Definition at line 28 of file SplittingTransformer.h.

## ◆ KeyValue

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

using Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::KeyValue = typename base_class::KeyValue

Definition at line 32 of file SplittingTransformer.h.

## ◆ KeyValues

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

using Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::KeyValues = typename base_class::KeyValues

Definition at line 33 of file SplittingTransformer.h.

## ◆ OutputHandle

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

using Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::OutputHandle = details::OutputHandle_t<Traits_, details::remove_optional_t<T> >
| private

Definition at line 87 of file SplittingTransformer.h.

## Constructor & Destructor Documentation

## ◆ SplittingTransformer() [1/2]

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

Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::SplittingTransformer | ( | const std::string & | name,
|  | ISvcLocator * | locator,
|  | const std::array< KeyValue, N > & | inputs,
|  | const KeyValues & | outputs
| ) |  |
| inline

Definition at line 35 of file SplittingTransformer.h.

37 : base_class( name, locator, inputs )
38 , m_outputLocations(
39 this, outputs.first, outputs.second,
40 [=]( Gaudi::Details::PropertyBase& ) {
41 this->m_outputs =
42 details::make_vector_of_handles<decltype( this->m_outputs )>( this, m_outputLocations );
43 if constexpr ( details::is_optional_v<Out> ) { // handle constructor does not (yet) allow to
44 // set optional flag... so
45 // do it explicitly here...
46 std::for_each( this->m_outputs.begin(), this->m_outputs.end(),
47 []( auto& h ) { h.setOptional( true ); } );
48 }
49 },
50 Gaudi::Details::Property::ImmediatelyInvokeHandler{true} ) {}
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::base_class
details::DataHandleMixin< void, std::tuple< In... >, Traits_ > base_class
Definition: SplittingTransformer.h:28
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
Gaudi::Details::Property::ImmediatelyInvokeHandler
Gaudi::tagged_bool< class ImmediatelyInvokeHandler_tag > ImmediatelyInvokeHandler
Definition: Property.h:141
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::m_outputLocations
Gaudi::Property< std::vector< std::string > > m_outputLocations
Definition: SplittingTransformer.h:89
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32

## ◆ SplittingTransformer() [2/2]

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

Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::SplittingTransformer | ( | const std::string & | name,
|  | ISvcLocator * | locator,
|  | const KeyValue & | input,
|  | const KeyValues & | output
| ) |  |
| inline

Definition at line 52 of file SplittingTransformer.h.

54 : SplittingTransformer( name, locator, std::array<KeyValue, 1>{input}, output ) {
55 static_assert( N == 1, "single input argument requires single input signature" );
56 }
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
gaudirun.output
output
Definition: gaudirun.py:484
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::SplittingTransformer
SplittingTransformer(const std::string &name, ISvcLocator *locator, const std::array< KeyValue, N > &inputs, const KeyValues &outputs)
Definition: SplittingTransformer.h:35
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::N
static constexpr std::size_t N
Definition: SplittingTransformer.h:31
std::array
STL class.

## Member Function Documentation

## ◆ execute()

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

StatusCode Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::execute | ( |  | ) |
| inline final override

Definition at line 63 of file SplittingTransformer.h.

63 {
64 try {
65 // TODO:FIXME: how does operator() know the number and order of expected outputs?
66 auto out = details::filter_evtcontext_t<In...>::apply( *this, this->m_inputs );
67 if ( out.size() != m_outputs.size() ) {
68 throw GaudiException( "Error during transform: expected " + std::to_string( m_outputs.size() ) +
69 " containers, got " + std::to_string( out.size() ) + " instead",
70 this->name(), StatusCode::FAILURE );
71 }
72 for ( unsigned i = 0; i != out.size(); ++i ) details::put( m_outputs[i], std::move( out[i] ) );
73 return StatusCode::SUCCESS;
74 } catch ( GaudiException& e ) {
75 ( e.code() ? this->warning() : this->error() ) << e.message() << endmsg;
76 return e.code();
77 }
78 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
std::to_string
T to_string(T... args)
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
Gaudi::Functional::details::filter_evtcontext_t::apply
static auto apply(const Algorithm &algo, Handles &handles)
Definition: FunctionalDetails.h:353
std::move
T move(T... args)
GaudiException::code
virtual const StatusCode & code() const
StatusCode for Exception.
Definition: GaudiException.h:76
std::vector::size
T size(T... args)
Gaudi::Functional::details::DataHandleMixin< void, std::tuple< In... >, Traits_ >::m_inputs
std::tuple< details::InputHandle_t< Traits_, In >... > m_inputs
Definition: FunctionalDetails.h:518
Gaudi::Functional::details::put
Out1 * put(const DataObjectHandle< Out1 > &out_handle, Out2 &&out)
Definition: FunctionalDetails.h:121
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::m_outputs
std::vector< OutputHandle< Out > > m_outputs
Definition: SplittingTransformer.h:88

## ◆ operator()()

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

virtual vector_of_<Out> Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::operator() | ( | const In & | ... | ) | const
| pure virtual

## ◆ outputLocation()

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

const std::string& Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::outputLocation | ( | unsigned int | n | ) | const
| inline

Definition at line 59 of file SplittingTransformer.h.

59 { return m_outputLocations.value()[n]; }
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::m_outputLocations
Gaudi::Property< std::vector< std::string > > m_outputLocations
Definition: SplittingTransformer.h:89
GaudiPluginService.cpluginsvc.n
n
Definition: cpluginsvc.py:210

## ◆ outputLocationSize()

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

unsigned int Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::outputLocationSize | ( |  | ) | const
| inline

Definition at line 60 of file SplittingTransformer.h.

60 { return m_outputLocations.value().size(); }
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::m_outputLocations
Gaudi::Property< std::vector< std::string > > m_outputLocations
Definition: SplittingTransformer.h:89

## Member Data Documentation

## ◆ m_outputLocations

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

Gaudi::Property<std::vector<std::string> > Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::m_outputLocations
| private

Definition at line 89 of file SplittingTransformer.h.

## ◆ m_outputs

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

std::vector<OutputHandle<Out> > Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::m_outputs
| private

Definition at line 88 of file SplittingTransformer.h.

## ◆ N

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

constexpr std::size_t Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >::N = base_class::N_in
| static

Definition at line 31 of file SplittingTransformer.h.

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

- GaudiAlg/GaudiAlg/SplittingTransformer.h