22 template <
typename Container>
24 template <
typename Container>
30 template <
typename Signature,
typename Traits_,
bool isLegacy>
33 template <
typename Out,
typename In,
typename Traits_>
37 static_assert( std::is_base_of_v<Algorithm, base_class>,
"BaseClass must inherit from Algorithm" );
40 using KeyValues = std::pair<std::string, std::vector<std::string>>;
49 if ( std::is_pointer_v<In> ) {
53 [](
auto&
h ) { h.setOptional( true ); } );
61 details::make_vector_of_handles<decltype( this->m_outputs )>( this, m_outputLocations );
62 if constexpr ( details::is_optional<Out> ) {
65 std::for_each( this->m_outputs.begin(), this->m_outputs.end(),
66 []( auto& h ) { h.setOptional( true ); } );
72 const std::string&
outputLocation(
unsigned int n )
const {
return m_outputLocations.value()[
n].key(); }
76 const std::string&
inputLocation(
unsigned int n )
const {
return m_inputLocations.value()[
n].key(); }
84 std::transform( m_inputs.begin(), m_inputs.end(), std::back_inserter( ins ),
87 auto out = ( *this )( std::as_const( ins ) );
88 if (
out.size() != m_outputs.size() ) {
89 throw GaudiException(
"Error during transform: expected " + std::to_string( m_outputs.size() ) +
90 " containers, got " + std::to_string(
out.size() ) +
" instead",
93 for (
unsigned i = 0; i !=
out.size(); ++i )
details::put( m_outputs[i], std::move(
out[i] ) );
108 template <
typename T>
114 template <
typename T>
123 template <
typename Signature,
typename Traits_ = Traits::useDefaults>