26    template <
typename F, 
size_t... Is>
 
   27    auto for_impl( F&& f, std::index_sequence<Is...> ) {
 
   28      if constexpr ( std::disjunction_v<std::is_void<std::invoke_result_t<F, std::integral_constant<int, Is>>>...> ) {
 
   29        ( std::invoke( f, std::integral_constant<int, Is>{} ), ... );
 
   31        return std::array{ std::invoke( f, std::integral_constant<int, Is>{} )... };
 
 
   35    template <auto N, 
typename F>
 
   36    decltype( auto ) 
for_( F&& f ) {
 
   37      return for_impl( std::forward<F>( f ), std::make_index_sequence<N>{} );
 
 
   40    template <
typename Sig>
 
   42    template <
typename... Args>
 
   44    template <
typename Sig>
 
   47    template <
typename Signature, 
typename Traits_, 
bool isLegacy>
 
   51    template <
typename Out, 
typename In, 
typename Traits_>
 
   58      using KeyValue  = 
typename base_class::KeyValue;
 
   67                                if ( std::is_pointer_v<In> ) { 
 
   70                                  std::for_each( this->
m_inputs.begin(), this->m_inputs.end(),
 
   71                                                 []( 
auto& h ) { h.setOptional( true ); } );
 
   75        static_assert( std::is_void_v<Out> );
 
 
   84                                if ( std::is_pointer_v<In> ) { 
 
   87                                  std::for_each( this->
m_inputs.begin(), this->m_inputs.end(),
 
   88                                                 []( 
auto& h ) { h.setOptional( true ); } );
 
   92        static_assert( !std::is_void_v<Out> );
 
 
  105          if constexpr ( std::is_void_v<Out> ) {
 
  106            std::as_const ( *
this )( std::as_const( ins ) );
 
  108            put( std::get<0>( this->m_outputs ), std::as_const( *
this )( std::as_const( ins ) ) );
 
 
  121      template <
typename T>
 
 
  129    template <
typename Out, 
typename... Ins, 
typename Traits_>
 
  141          constexpr auto i   = 
decltype( I )::value;
 
  142          auto&          ins = std::get<i>( inputs );
 
  146                auto& handles = std::get<i>( this->
m_inputs );
 
  148                using Handles = 
typename std::decay_t<
decltype( handles )>;
 
  150                if ( std::is_pointer_v<typename Handles::value_type> ) { 
 
  154                  std::for_each( handles.begin(), handles.end(), []( 
auto& h ) { h.setOptional( true ); } );
 
 
  164        static_assert( std::is_void_v<Out> );
 
 
  169        static_assert( 
sizeof...( Ins ) == 1 );
 
 
  174        static_assert( !std::is_void_v<Out> );
 
 
  179        static_assert( 
sizeof...( Ins ) == 1 );
 
 
  187        static_assert( 
sizeof...( Ins ) == 1 );
 
 
  194        std::tuple<vector_of_const_<Ins>...> inss;
 
  196          constexpr size_t i       = 
decltype( I )::value;
 
  197          auto&            ins     = std::get<i>( inss );
 
  198          auto&            handles = std::get<i>( 
m_inputs );
 
  199          ins.reserve( handles.size() );
 
  200          std::transform( handles.begin(), handles.end(), std::back_inserter( ins ),
 
  204          if constexpr ( std::is_void_v<Out> ) {
 
  205            std::apply( [&]( 
auto&&... ins ) { 
return std::as_const( *
this )( std::as_const( ins )... ); }, inss );
 
  207            put( std::get<0>( this->m_outputs ),
 
  208                 std::apply( [&]( 
auto&&... ins ) { 
return std::as_const( *
this )( std::as_const( ins )... ); },
 
 
  222      template <
typename T>
 
  224      std::tuple<std::vector<InputHandle_t<Ins>>...> 
m_inputs; 
 
 
  233  template <
typename Signature, 
typename Traits_ = Traits::useDefaults>
 
  237  template <details::is_
void_fun Signature, 
typename Traits_ = Traits::useDefaults>
 
  241  template <
typename Signature, 
typename Traits_ = Traits::BaseClass_t<Gaudi::Algorithm>>
 
  244  template <
typename... Outs, 
typename... Ins, 
typename Traits_>
 
  256    static constexpr size_t n_args = 
sizeof...( Ins );
 
  261          constexpr auto i   = 
decltype( I )::value;
 
  262          auto&          ins = std::get<i>( inputs );
 
  266                auto& handles = std::get<i>( this->
m_inputs );
 
  268                using In      = 
typename std::decay_t<
decltype( handles )>::value_type;
 
  270                if ( std::is_pointer_v<In> ) { 
 
  273                  std::for_each( handles.begin(), handles.end(), []( 
auto& h ) { h.setOptional( true ); } );
 
 
  281      static_assert( 
sizeof...( Ins ) == 1 );
 
 
  289      static_assert( 
n_args == 1 );
 
 
  296      std::tuple<vector_of_const_<Ins>...> inss;
 
  298        constexpr size_t i       = 
decltype( I )::value;
 
  299        auto&            ins     = std::get<i>( inss );
 
  300        auto&            handles = std::get<i>( 
m_inputs );
 
  301        ins.reserve( handles.size() );
 
  302        std::transform( handles.begin(), handles.end(), std::back_inserter( ins ),
 
  307            [&]( 
auto&... outhandle ) {
 
  309                  [&outhandle...]( 
auto&&... data ) {
 
  310                    ( details::put( outhandle, std::forward<decltype( data )>( data ) ), ... );
 
  312                  std::apply( [&]( 
auto&&... ins ) { return std::as_const( *this )( std::as_const( ins )... ); },
 
 
  327    template <
typename T>
 
  329    std::tuple<std::vector<InputHandle_t<Ins>>...> 
m_inputs; 
 
 
  337  template <
typename Signature, 
typename Traits_ = Traits::BaseClass_t<Gaudi::Algorithm>>
 
  340  template <
typename... Outs, 
typename In, 
typename Traits_>
 
  363      std::transform( 
m_inputs.begin(), 
m_inputs.end(), std::back_inserter( ins ),
 
  367                   [&]( 
auto&... outhandle ) {
 
  369                         [&outhandle...]( 
bool passed, 
auto&&... data ) {
 
  370                           ( details::put( outhandle, std::forward<decltype( data )>( data ) ), ... );
 
  373                         ( *
this )( std::as_const( ins ) ) );
 
 
  388    template <
typename T>
 
 
  396  template <
typename... Outs, 
typename In, 
typename Traits_>
 
  400                                                                         KeyValues 
const&   inputs,
 
  401                                                                         OutKeys 
const&     outputs )
 
  402      : base_class( name, pSvcLocator, outputs )
 
  407              if ( std::is_pointer_v<In> ) { 
 
  410                std::for_each( this->m_inputs.begin(), this->m_inputs.end(), []( 
auto& h ) { h.setOptional( true ); } );
 
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
This class represents an entry point to all the event specific data.
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
void reserve(size_type size)
Implementation of property with value of concrete type.
Define general base for Gaudi exception.
virtual const std::string & message() const
error message to be printed
virtual const StatusCode & code() const
StatusCode for Exception.
virtual const std::string & tag() const
name tag for the exception, or exception type
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
This class is used for returning status codes from appropriate routines.
Gaudi::tagged_bool< class ImmediatelyInvokeHandler_tag > ImmediatelyInvokeHandler
constexpr bool is_void_fun_v
std::vector< DataObjID > to_DataObjID(const std::vector< std::string > &in)
decltype(auto) for_(F &&f)
typename detail2::InputHandle< T, Tr, detail2::DefaultInputHandle >::type InputHandle_t
auto put(const DataObjectHandle< Out1 > &out_handle, Out2 &&out)
Handles make_vector_of_handles(IDataHandleHolder *owner, const std::vector< DataObjID > &init)
decltype(get_values_helper< Value >(std::make_index_sequence< N >())) RepeatValues_
auto for_impl(F &&f, std::index_sequence< Is... >)
details::MergingTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MergingTransformer
details::MergingTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MergingConsumer
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...