| 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_, false > Class Template Referenceabstract

`#include <GaudiAlg/SplittingTransformer.h>`

Inheritance diagram for Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, false >:
[legend]
Collaboration diagram for Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, false >:
[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 (const EventContext &ctx) const 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_, false >

Definition at line 94 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_, false >::base_class = details::DataHandleMixin<void, std::tuple<In...>, Traits_>
| private

Definition at line 96 of file SplittingTransformer.h.

## ◆ KeyValue

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

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

Definition at line 100 of file SplittingTransformer.h.

## ◆ KeyValues

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

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

Definition at line 101 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_, false >::OutputHandle = details::OutputHandle_t<Traits_, details::remove_optional_t<T> >
| private

Definition at line 155 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_, false >::SplittingTransformer | ( | const std::string & | name,
|  | ISvcLocator * | locator,
|  | const std::array< KeyValue, N > & | inputs,
|  | const KeyValues & | outputs
| ) |  |
| inline

Definition at line 103 of file SplittingTransformer.h.

105 : base_class( name, locator, inputs )
106 , m_outputLocations(
107 this, outputs.first, outputs.second,
108 [=]( Gaudi::Details::PropertyBase& ) {
109 this->m_outputs =
110 details::make_vector_of_handles<decltype( this->m_outputs )>( this, m_outputLocations );
111 if constexpr ( details::is_optional_v<Out> ) { // handle constructor does not (yet) allow to
112 // set optional flag... so
113 // do it explicitly here...
114 std::for_each( this->m_outputs.begin(), this->m_outputs.end(),
115 []( auto& h ) { h.setOptional( true ); } );
116 }
117 },
118 Gaudi::Details::Property::ImmediatelyInvokeHandler{true} ) {}
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_, false >::m_outputLocations
Gaudi::Property< std::vector< std::string > > m_outputLocations
Definition: SplittingTransformer.h:157
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, false >::base_class
details::DataHandleMixin< void, std::tuple< In... >, Traits_ > base_class
Definition: SplittingTransformer.h:96

## ◆ SplittingTransformer() [2/2]

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

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

Definition at line 120 of file SplittingTransformer.h.

122 : SplittingTransformer( name, locator, std::array<KeyValue, 1>{input}, output ) {
123 static_assert( N == 1, "single input argument requires single input signature" );
124 }
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
gaudirun.output
output
Definition: gaudirun.py:484
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, false >::N
static constexpr std::size_t N
Definition: SplittingTransformer.h:99
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, false >::SplittingTransformer
SplittingTransformer(const std::string &name, ISvcLocator *locator, const std::array< KeyValue, N > &inputs, const KeyValues &outputs)
Definition: SplittingTransformer.h:103
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_, false >::execute | ( | const EventContext & | ctx | ) | const
| inline final override

Definition at line 131 of file SplittingTransformer.h.

131 {
132 try {
133 // TODO:FIXME: how does operator() know the number and order of expected outputs?
134 auto out = details::filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs );
135 if ( out.size() != m_outputs.size() ) {
136 throw GaudiException( "Error during transform: expected " + std::to_string( m_outputs.size() ) +
137 " containers, got " + std::to_string( out.size() ) + " instead",
138 this->name(), StatusCode::FAILURE );
139 }
140 for ( unsigned i = 0; i != out.size(); ++i ) details::put( m_outputs[i], std::move( out[i] ) );
141 return StatusCode::SUCCESS;
142 } catch ( GaudiException& e ) {
143 ( e.code() ? this->warning() : this->error() ) << e.message() << endmsg;
144 return e.code();
145 }
146 }
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::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, false >::m_outputs
std::vector< OutputHandle< Out > > m_outputs
Definition: SplittingTransformer.h:156
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

## ◆ operator()()

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

virtual vector_of_<Out> Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, false >::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_, false >::outputLocation | ( | unsigned int | n | ) | const
| inline

Definition at line 127 of file SplittingTransformer.h.

127 { return m_outputLocations.value()[n]; }
Gaudi::Functional::details::SplittingTransformer< vector_of_< Out >(const In &...), Traits_, false >::m_outputLocations
Gaudi::Property< std::vector< std::string > > m_outputLocations
Definition: SplittingTransformer.h:157
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_, false >::outputLocationSize | ( |  | ) | const
| inline

Definition at line 128 of file SplittingTransformer.h.

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

## 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_, false >::m_outputLocations
| private

Definition at line 157 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_, false >::m_outputs
| private

Definition at line 156 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_, false >::N = base_class::N_in
| static

Definition at line 99 of file SplittingTransformer.h.

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

- GaudiAlg/GaudiAlg/SplittingTransformer.h