The Gaudi Framework  v39r1 (adb068b2)
details.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #pragma once
12 
13 #include <Gaudi/Algorithm.h>
14 #include <GaudiKernel/Algorithm.h>
17 #include <GaudiKernel/IBinder.h>
19 #include <GaudiKernel/detected.h>
20 #include <cassert>
21 #include <range/v3/version.hpp>
22 #include <range/v3/view/const.hpp>
23 #include <range/v3/view/zip.hpp>
24 #include <sstream>
25 #include <stdexcept>
26 #include <type_traits>
27 
28 // upstream has renamed namespace ranges::view ranges::views
29 #if RANGE_V3_VERSION < 900
30 namespace ranges::views {
31  using namespace ranges::view;
32 }
33 #endif
34 
35 #if defined( __clang__ ) && ( __clang_major__ < 11 ) || defined( __APPLE__ ) && ( __clang_major__ < 12 )
36 # define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN \
37  _Pragma( "clang diagnostic push" ) _Pragma( "clang diagnostic ignored \"-Wunused-lambda-capture\"" )
38 # define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END _Pragma( "clang diagnostic pop" )
39 #else
40 # define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN
41 # define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END
42 #endif
43 
44 // temporary hack to help in transition to updated constructor
45 // allows to write code which is forward and backwards compatible
46 #define GAUDI_FUNCTIONAL_CONSTRUCTOR_USES_TUPLE
47 
49 
50  // CRJ : Stuff for zipping
51  namespace zip {
52 
54  template <typename OS, typename Arg>
55  void printSizes( OS& out, Arg&& arg ) {
56  out << "SizeOf'" << System::typeinfoName( typeid( Arg ) ) << "'=" << std::forward<Arg>( arg ).size();
57  }
58 
60  template <typename OS, typename Arg, typename... Args>
61  void printSizes( OS& out, Arg&& arg, Args&&... args ) {
62  printSizes( out, arg );
63  out << ", ";
64  printSizes( out, args... );
65  }
66 
68  template <typename A>
69  inline bool check_sizes( const A& ) noexcept {
70  return true;
71  }
72 
74  template <typename A, typename B>
75  inline bool check_sizes( const A& a, const B& b ) noexcept {
76  return a.size() == b.size();
77  }
78 
80  template <typename A, typename B, typename... C>
81  inline bool check_sizes( const A& a, const B& b, const C&... c ) noexcept {
82  return ( check_sizes( a, b ) && check_sizes( b, c... ) );
83  }
84 
86  template <typename... Args>
87  inline decltype( auto ) verifySizes( Args&... args ) {
88  if ( !check_sizes( args... ) ) {
89  std::ostringstream mess;
90  mess << "Zipped containers have different sizes : ";
91  printSizes( mess, args... );
92  throw GaudiException( mess.str(), "Gaudi::Functional::details::zip::verifySizes", StatusCode::FAILURE );
93  }
94  }
95 
97  template <typename... Args>
98  inline decltype( auto ) range( Args&&... args ) {
99 #ifndef NDEBUG
100  verifySizes( args... );
101 #endif
102  return ranges::views::zip( std::forward<Args>( args )... );
103  }
104 
106  template <typename... Args>
107  inline decltype( auto ) const_range( Args&&... args ) {
108 #ifndef NDEBUG
109  verifySizes( args... );
110 #endif
111  return ranges::views::const_( ranges::views::zip( std::forward<Args>( args )... ) );
112  }
113  } // namespace zip
114 
117  out.reserve( in.size() );
119  []( const std::string& i ) { return DataObjID{ i }; } );
120  return out;
121  }
122 
124  namespace details2 {
125  template <typename T>
126  using is_optional_ = decltype( std::declval<T>().has_value(), std::declval<T>().value() );
127 
128  template <typename T>
129  using value_type_of_t = typename T::value_type;
130 
131  } // namespace details2
132  template <typename Arg>
133  constexpr bool is_optional_v = Gaudi::cpp17::is_detected_v<details2::is_optional_, Arg>;
134 
135  template <typename Arg>
136  using require_is_optional = std::enable_if_t<is_optional_v<Arg>>;
137 
138  template <typename Arg>
139  using require_is_not_optional = std::enable_if_t<!is_optional_v<Arg>>;
140 
141  template <typename T>
143  std::conditional_t<is_optional_v<T>, Gaudi::cpp17::detected_t<details2::value_type_of_t, T>, T>;
144 
145  constexpr struct invoke_optionally_t {
146  template <typename F, typename Arg, typename = require_is_not_optional<Arg>>
147  decltype( auto ) operator()( F&& f, Arg&& arg ) const {
148  return std::invoke( std::forward<F>( f ), std::forward<Arg>( arg ) );
149  }
150  template <typename F, typename Arg, typename = require_is_optional<Arg>>
151  void operator()( F&& f, Arg&& arg ) const {
152  if ( arg ) std::invoke( std::forward<F>( f ), *std::forward<Arg>( arg ) );
153  }
156 
157  template <typename Value, std::size_t... I>
158  auto get_values_helper( std::index_sequence<I...> ) {
159  return std::make_tuple( ( (void)I, Value{} )... );
160  }
161 
162  template <typename Value, auto N>
163  using RepeatValues_ = decltype( get_values_helper<Value>( std::make_index_sequence<N>() ) );
164 
166 
167  template <typename Out1, typename Out2,
168  typename = std::enable_if_t<std::is_constructible_v<Out1, Out2> && std::is_base_of_v<DataObject, Out1>>>
169  auto put( const DataObjectHandle<Out1>& out_handle, Out2&& out ) {
170  return out_handle.put( std::make_unique<Out1>( std::forward<Out2>( out ) ) );
171  }
172 
173  template <typename Out1, typename Out2, typename = std::enable_if_t<std::is_constructible_v<Out1, Out2>>>
174  auto put( const DataObjectHandle<AnyDataWrapper<Out1>>& out_handle, Out2&& out ) {
175  return out_handle.put( std::forward<Out2>( out ) );
176  }
177 
178  // optional put
179  template <typename OutHandle, typename OptOut, typename = require_is_optional<OptOut>>
180  void put( const OutHandle& out_handle, OptOut&& out ) {
181  if ( out ) put( out_handle, *std::forward<OptOut>( out ) );
182  }
183 
185  // adapt to differences between eg. std::vector (which has push_back) and KeyedContainer (which has insert)
186  // adapt to getting a T, and a container wanting T* by doing new T{ std::move(out) }
187  // adapt to getting a optional<T>
188 
189  constexpr struct insert_t {
190  // for Container<T*>, return T
191  template <typename Container>
192  using c_remove_ptr_t = std::remove_pointer_t<typename Container::value_type>;
193 
194  template <typename Container, typename Value>
195  auto operator()( Container& c, Value&& v ) const -> decltype( c.push_back( v ) ) {
196  return c.push_back( std::forward<Value>( v ) );
197  }
198 
199  template <typename Container, typename Value>
200  auto operator()( Container& c, Value&& v ) const -> decltype( c.insert( v ) ) {
201  return c.insert( std::forward<Value>( v ) );
202  }
203 
204  // Container<T*> with T&& as argument
205  template <typename Container, typename Value,
206  typename = std::enable_if_t<std::is_pointer_v<typename Container::value_type>>,
207  typename = std::enable_if_t<std::is_convertible_v<Value, c_remove_ptr_t<Container>>>>
208  auto operator()( Container& c, Value&& v ) const {
209  return operator()( c, new c_remove_ptr_t<Container>{ std::forward<Value>( v ) } );
210  }
211 
212  } insert{};
213 
215 
216  constexpr struct deref_t {
217  template <typename In, typename = std::enable_if_t<!std::is_pointer_v<In>>>
218  const In& operator()( const In& in ) const {
219  return in;
220  }
221 
222  template <typename In, typename = std::enable_if_t<!std::is_pointer_v<std::decay_t<In>>>>
223  In operator()( In&& in ) const {
224  return std::forward<In>( in );
225  }
226 
227  template <typename In>
228  const In& operator()( const In* in ) const {
229  assert( in != nullptr );
230  return *in;
231  }
232  } deref{};
233 
235  // if Container is a pointer, then we're optional items
236  namespace details2 {
237  template <typename T>
239 
240  template <typename T, typename IT>
242 
243  template <typename T, typename IT>
245 
246  template <typename T, typename IT>
247  struct is_gaudi_range<std::optional<Gaudi::NamedRange_<T, IT>>> : std::true_type {};
248 
249  template <typename T>
250  constexpr static bool is_gaudi_range_v = is_gaudi_range<T>::value;
251 
252  template <typename Container, typename Value>
253  void push_back( Container& c, const Value& v, std::true_type ) {
254  c.push_back( v );
255  }
256  template <typename Container, typename Value>
257  void push_back( Container& c, const Value& v, std::false_type ) {
258  c.push_back( &v );
259  }
260 
261  template <typename In>
263  template <template <typename> class Handle, typename I, typename = std::enable_if_t<std::is_convertible_v<I, In>>>
264  auto operator()( const Handle<I>& h ) -> const In& {
265  return *h.get();
266  }
267  template <template <typename> class Handle, typename I, typename IT>
268  auto operator()( const Handle<Gaudi::Range_<I, IT>>& h ) -> const In {
269  return h.get();
270  }
271  template <template <typename> class Handle, typename I, typename IT>
272  auto operator()( const Handle<Gaudi::NamedRange_<I, IT>>& h ) -> const In {
273  return h.get();
274  }
275  template <template <typename> class Handle, typename I, typename IT>
276  auto operator()( const Handle<std::optional<Gaudi::NamedRange_<I, IT>>>& h ) -> const In {
277  return h.get();
278  }
279  template <template <typename> class Handle, typename I,
280  typename = std::enable_if_t<std::is_convertible_v<I*, In>>>
281  auto operator()( const Handle<I>& h ) -> const In {
282  return h.getIfExists();
283  } // In is-a pointer
284  };
285 
286  template <typename T>
287  T* deref_if( T* const t, std::false_type ) {
288  return t;
289  }
290  template <typename T>
291  T& deref_if( T* const t, std::true_type ) {
292  return *t;
293  }
294  } // namespace details2
295 
296  template <typename Container>
298  static constexpr bool is_pointer = std::is_pointer_v<Container>;
299  static constexpr bool is_range = details2::is_gaudi_range_v<Container>;
300  using val_t = std::add_const_t<std::remove_pointer_t<Container>>;
301  using ptr_t = std::add_pointer_t<val_t>;
302  using ref_t = std::add_lvalue_reference_t<val_t>;
305 
306  public:
307  using value_type = std::conditional_t<is_pointer, ptr_t, val_t>;
308  using size_type = typename ContainerVector::size_type;
309  class iterator {
310  using it_t = typename ContainerVector::const_iterator;
312  friend class vector_of_const_;
313  iterator( it_t iter ) : m_i( iter ) {}
314  using ret_t = std::conditional_t<is_pointer, ptr_t, ref_t>;
315 
316  public:
317  using iterator_category = typename it_t::iterator_category;
318  using value_type = typename it_t::iterator_category;
319  using reference = typename it_t::reference;
320  using pointer = typename it_t::pointer;
321  using difference_type = typename it_t::difference_type;
322 
323  friend bool operator!=( const iterator& lhs, const iterator& rhs ) { return lhs.m_i != rhs.m_i; }
324  friend bool operator==( const iterator& lhs, const iterator& rhs ) { return lhs.m_i == rhs.m_i; }
325  friend auto operator-( const iterator& lhs, const iterator& rhs ) { return lhs.m_i - rhs.m_i; }
326  ret_t operator*() const {
327  if constexpr ( is_range ) {
328  return *m_i;
329  } else {
330  return details2::deref_if( *m_i, std::bool_constant<!is_pointer>{} );
331  }
332  }
334  ++m_i;
335  return *this;
336  }
338  --m_i;
339  return *this;
340  }
341  bool is_null() const { return !*m_i; }
342  explicit operator bool() const { return !is_null(); }
343  };
344  vector_of_const_() = default;
345  void reserve( size_type size ) { m_containers.reserve( size ); }
346  template <typename T> // , typename = std::is_convertible<T,std::conditional_t<is_pointer,ptr_t,val_t>>
347  void push_back( T&& container ) {
348  details2::push_back( m_containers, std::forward<T>( container ),
349  std::bool_constant < is_pointer || is_range > {} );
350  } // note: does not copy its argument, so we're not really a container...
351  iterator begin() const { return m_containers.begin(); }
352  iterator end() const { return m_containers.end(); }
353  size_type size() const { return m_containers.size(); }
354 
355  template <typename X = Container>
356  std::enable_if_t<!std::is_pointer_v<X>, ref_t> front() const {
357  return *m_containers.front();
358  }
359  template <typename X = Container>
360  std::enable_if_t<std::is_pointer_v<X>, ptr_t> front() const {
361  return m_containers.front();
362  }
363 
364  template <typename X = Container>
365  std::enable_if_t<!std::is_pointer_v<X>, ref_t> back() const {
366  return *m_containers.back();
367  }
368  template <typename X = Container>
369  std::enable_if_t<std::is_pointer_v<X>, ptr_t> back() const {
370  return m_containers.back();
371  }
372 
373  template <typename X = Container>
374  std::enable_if_t<!std::is_pointer_v<X>, ref_t> operator[]( size_type i ) const {
375  return *m_containers[i];
376  }
377  template <typename X = Container>
378  std::enable_if_t<std::is_pointer_v<X>, ptr_t> operator[]( size_type i ) const {
379  return m_containers[i];
380  }
381 
382  template <typename X = Container>
383  std::enable_if_t<!std::is_pointer_v<X>, ref_t> at( size_type i ) const {
384  return *m_containers[i];
385  }
386  template <typename X = Container>
387  std::enable_if_t<std::is_pointer_v<X>, ptr_t> at( size_type i ) const {
388  return m_containers[i];
389  }
390 
391  bool is_null( size_type i ) const { return !m_containers[i]; }
392  };
393 
395  namespace detail2 { // utilities for detected_or_t{,_} usage
396  template <typename Tr>
397  using BaseClass_t = typename Tr::BaseClass;
398  template <typename Tr, typename T>
399  using OutputHandle_t = typename Tr::template OutputHandle<T>;
400  template <typename Tr, typename T>
401  using InputHandle_t = typename Tr::template InputHandle<T>;
402 
403  template <typename T>
404  constexpr auto is_tool_v = std::is_base_of_v<IAlgTool, std::decay_t<T>>;
405 
406  template <typename T>
408 
409  template <typename T>
410  using DefaultInputHandle = std::conditional_t<is_tool_v<T>, ToolHandle_t<T>, DataObjectReadHandle<T>>;
411  } // namespace detail2
412 
413  // check whether Traits::BaseClass is a valid type,
414  // if so, define BaseClass_t<Traits> as being Traits::BaseClass
415  // else define as being Gaudi::Algorithm
416  template <typename Tr, typename Base = Gaudi::Algorithm>
418 
419  // check whether Traits::{Input,Output}Handle<T> is a valid type,
420  // if so, define {Input,Output}Handle_t<Traits,T> as being Traits::{Input,Output}Handle<T>
421  // else define as being DataObject{Read,,Write}Handle<T>
422 
423  template <typename Tr, typename T>
425  template <typename Tr, typename T>
427 
428  template <typename Traits>
429  inline constexpr bool isLegacy =
430  std::is_base_of_v<Gaudi::details::LegacyAlgorithmAdapter, details::BaseClass_t<Traits>>;
431 
433 #define GAUDI_FUNCTIONAL_MAKE_VECTOR_OF_HANDLES_USES_DATAOBJID
434 
435  template <typename Handles>
437  Handles handles;
438  handles.reserve( init.size() );
439  std::transform( init.begin(), init.end(), std::back_inserter( handles ),
440  [&]( const auto& loc ) -> typename Handles::value_type {
441  return { loc, owner };
442  } );
443  return handles;
444  }
445 
446  template <typename Handle, typename Algo>
447  auto get( const Handle& handle, const Algo&, const EventContext& )
448  -> decltype( details::deref( handle.get() ) ) // make it SFINAE friendly...
449  {
450  return details::deref( handle.get() );
451  }
452 
453  template <typename IFace, typename Algo>
454  auto get( const ToolHandle<Gaudi::Interface::Bind::IBinder<IFace>>& handle, const Algo&, const EventContext& ctx ) {
455  return handle.bind( ctx );
456  }
457 
458  template <typename Handle>
459  auto getKey( const Handle& h ) -> decltype( h.objKey() ) {
460  return h.objKey();
461  }
462 
464  // given a pack, return a corresponding tuple
465  template <typename... In>
467  using type = std::tuple<In...>;
468 
469  static_assert( !std::disjunction_v<std::is_same<EventContext, In>...>,
470  "EventContext can only appear as first argument" );
471 
472  template <typename Algorithm, typename Handles>
473  static auto apply( const Algorithm& algo, Handles& handles ) {
474  return std::apply(
475  [&]( const auto&... handle ) { return algo( get( handle, algo, Gaudi::Hive::currentContext() )... ); },
476  handles );
477  }
478  template <typename Algorithm, typename Handles>
479  static auto apply( const Algorithm& algo, const EventContext& ctx, Handles& handles ) {
480  return std::apply( [&]( const auto&... handle ) { return algo( get( handle, algo, ctx )... ); }, handles );
481  }
482  };
483 
484  // except when it starts with EventContext, then drop it
485  template <typename... In>
487  using type = std::tuple<In...>;
488 
489  static_assert( !std::disjunction_v<std::is_same<EventContext, In>...>,
490  "EventContext can only appear as first argument" );
491 
492  template <typename Algorithm, typename Handles>
493  static auto apply( const Algorithm& algo, const EventContext& ctx, Handles& handles ) {
494  return std::apply( [&]( const auto&... handle ) { return algo( ctx, get( handle, algo, ctx )... ); }, handles );
495  }
496 
497  template <typename Algorithm, typename Handles>
498  static auto apply( const Algorithm& algo, Handles& handles ) {
499  return apply( algo, Gaudi::Hive::currentContext(), handles );
500  }
501  };
502 
503  template <typename... In>
505 
506  template <typename OutputSpec, typename InputSpec, typename Traits_>
508 
509  template <typename Out, typename In, typename Tr>
511  const std::string& newLoc ) {
512  auto sc = parent.setProperty( prop, newLoc );
513  if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + newLoc, sc );
514  }
515 
516  template <typename Out, typename In, typename Tr>
518  const std::vector<std::string>& newLocs ) {
520  GaudiUtils::details::ostream_joiner( ss << '[', newLocs, ", ", []( std::ostream& os, const auto& i ) -> auto& {
521  return os << "'" << i << "'";
522  } ) << ']';
523  auto sc = parent.setProperty( prop, ss.str() );
524  if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + ss.str(), sc );
525  }
526 
527  template <typename... Out, typename... In, typename Traits_>
528  class DataHandleMixin<std::tuple<Out...>, std::tuple<In...>, Traits_> : public BaseClass_t<Traits_> {
529  static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" );
530 
531  template <typename IArgs, typename OArgs, std::size_t... I, std::size_t... J>
532  DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, const IArgs& inputs, std::index_sequence<I...>,
533  const OArgs& outputs, std::index_sequence<J...> )
534  : BaseClass_t<Traits_>( std::move( name ), pSvcLocator )
535  , m_inputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<I>( inputs ) )... )
536  , m_outputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<J>( outputs ) )... ) {
537  // make sure this algorithm is seen as reentrant by Gaudi
538  this->setProperty( "Cardinality", 0 ).ignore();
539  }
540 
541  public:
542  constexpr static std::size_t N_in = sizeof...( In );
543  constexpr static std::size_t N_out = sizeof...( Out );
544 
547 
548  // generic constructor: N -> M
550  RepeatValues_<KeyValue, N_out> const& outputs )
551  : DataHandleMixin( std::move( name ), pSvcLocator, inputs, std::index_sequence_for<In...>{}, outputs,
552  std::index_sequence_for<Out...>{} ) {}
553 
554  // special cases: forward to the generic case...
555  // 1 -> 1
557  : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( input ),
558  std::forward_as_tuple( output ) ) {}
559  // 1 -> N
561  RepeatValues_<KeyValue, N_out> const& outputs )
562  : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( input ), outputs ) {}
563  // N -> 1
565  const KeyValue& output )
566  : DataHandleMixin( std::move( name ), locator, inputs, std::forward_as_tuple( output ) ) {}
567 
568  template <std::size_t N = 0>
569  decltype( auto ) inputLocation() const {
570  return getKey( std::get<N>( m_inputs ) );
571  }
572  template <typename T>
573  decltype( auto ) inputLocation() const {
574  return getKey( std::get<details::InputHandle_t<Traits_, std::decay_t<T>>>( m_inputs ) );
575  }
576  constexpr unsigned int inputLocationSize() const { return N_in; }
577 
578  template <std::size_t N = 0>
579  decltype( auto ) outputLocation() const {
580  return getKey( std::get<N>( m_outputs ) );
581  }
582  template <typename T>
583  decltype( auto ) outputLocation() const {
584  return getKey( std::get<details::OutputHandle_t<Traits_, std::decay_t<T>>>( m_outputs ) );
585  }
586  constexpr unsigned int outputLocationSize() const { return N_out; }
587 
588  protected:
589  bool isReEntrant() const override { return true; }
590 
593  };
594 
595  template <typename Traits_>
596  class DataHandleMixin<std::tuple<>, std::tuple<>, Traits_> : public BaseClass_t<Traits_> {
597  static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" );
598 
599  public:
603  : BaseClass_t<Traits_>( std::move( name ), pSvcLocator ) {
604  // make sure this algorithm is seen as reentrant by Gaudi
605  this->setProperty( "Cardinality", 0 ).ignore();
606  }
607 
608  protected:
609  bool isReEntrant() const override { return true; }
610 
612  };
613 
614  template <typename... In, typename Traits_>
615  class DataHandleMixin<std::tuple<>, std::tuple<In...>, Traits_> : public BaseClass_t<Traits_> {
616  static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" );
617 
618  template <typename IArgs, std::size_t... I>
619  DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, const IArgs& inputs, std::index_sequence<I...> )
620  : BaseClass_t<Traits_>( std::move( name ), pSvcLocator )
621  , m_inputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<I>( inputs ) )... ) {
622  // make sure this algorithm is seen as reentrant by Gaudi
623  this->setProperty( "Cardinality", 0 ).ignore();
624  }
625 
626  public:
629  constexpr static std::size_t N_in = sizeof...( In );
630 
631  // generic constructor: N -> 0
633  : DataHandleMixin( std::move( name ), pSvcLocator, inputs, std::index_sequence_for<In...>{} ) {}
634 
635  // special cases: forward to the generic case...
636  // 1 -> 0
638  : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( input ) ) {}
639 
640  template <std::size_t N = 0>
641  decltype( auto ) inputLocation() const {
642  return getKey( std::get<N>( m_inputs ) );
643  }
644  template <typename T>
645  decltype( auto ) inputLocation() const {
646  return getKey( std::get<details::InputHandle_t<Traits_, std::decay_t<T>>>( m_inputs ) );
647  }
648  constexpr unsigned int inputLocationSize() const { return N_in; }
649 
650  protected:
651  bool isReEntrant() const override { return true; }
652 
654  };
655 
656  template <typename Traits_>
657  class DataHandleMixin<std::tuple<void>, std::tuple<>, Traits_>
658  : public DataHandleMixin<std::tuple<>, std::tuple<>, Traits_> {
659  public:
661  };
662 
663  template <typename... Out, typename Traits_>
664  class DataHandleMixin<std::tuple<Out...>, std::tuple<>, Traits_> : public BaseClass_t<Traits_> {
665  static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" );
666 
667  template <typename OArgs, std::size_t... J>
668  DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, const OArgs& outputs, std::index_sequence<J...> )
669  : BaseClass_t<Traits_>( std::move( name ), pSvcLocator )
670  , m_outputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<J>( outputs ) )... ) {
671  // make sure this algorithm is seen as reentrant by Gaudi
672  this->setProperty( "Cardinality", 0 ).ignore();
673  }
674 
675  public:
676  constexpr static std::size_t N_out = sizeof...( Out );
679 
680  // generic constructor: 0 -> N
682  : DataHandleMixin( std::move( name ), pSvcLocator, outputs, std::index_sequence_for<Out...>{} ) {}
683 
684  // 0 -> 1
686  : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( output ) ) {}
687 
688  template <std::size_t N = 0>
689  decltype( auto ) outputLocation() const {
690  return getKey( std::get<N>( m_outputs ) );
691  }
692  constexpr unsigned int outputLocationSize() const { return N_out; }
693 
694  protected:
695  bool isReEntrant() const override { return true; }
696 
698  };
699 
701  template <typename Fun, typename Container, typename... Args>
702  constexpr void applyPostProcessing( const Fun&, Container&, Args... ) {
703  static_assert( sizeof...( Args ) == 0, "Args should not be used!" );
704  }
705 
706  template <typename Fun, typename Container>
707  auto applyPostProcessing( const Fun& fun, Container& c ) -> decltype( fun.postprocess( c ), void() ) {
708  fun.postprocess( c );
709  }
710 
711 } // namespace Gaudi::Functional::details
IDataHandleHolder
Definition: IDataHandleHolder.h:24
Gaudi::Functional::details::detail2::BaseClass_t
typename Tr::BaseClass BaseClass_t
Definition: details.h:397
Gaudi::Functional::details::insert_t::operator()
auto operator()(Container &c, Value &&v) const
Definition: details.h:208
Gaudi::Functional::details::invoke_optionally_t
Definition: details.h:145
Gaudi::Functional::details::vector_of_const_::operator[]
std::enable_if_t< std::is_pointer_v< X >, ptr_t > operator[](size_type i) const
Definition: details.h:378
Gaudi::Functional::details::vector_of_const_::front
std::enable_if_t< std::is_pointer_v< X >, ptr_t > front() const
Definition: details.h:360
Gaudi::Functional::details::vector_of_const_::val_t
std::add_const_t< std::remove_pointer_t< Container > > val_t
Definition: details.h:300
Gaudi::Functional::details::vector_of_const_::iterator::is_null
bool is_null() const
Definition: details.h:341
Gaudi::Functional::details::vector_of_const_::iterator
Definition: details.h:309
Gaudi::Functional::details::deref_t::operator()
const In & operator()(const In *in) const
Definition: details.h:228
std::is_same
Gaudi::Functional::details::vector_of_const_::iterator::operator*
ret_t operator*() const
Definition: details.h:326
std::make_tuple
T make_tuple(T... args)
std::false_type
std::string
STL class.
details::size
constexpr auto size(const T &, Args &&...) noexcept
Definition: AnyDataWrapper.h:23
setProperty
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:247
Gaudi::Functional::details::DataHandleMixin< std::tuple<>, std::tuple< In... >, Traits_ >::m_inputs
std::tuple< details::InputHandle_t< Traits_, In >... > m_inputs
Definition: details.h:653
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *locator, const KeyValue &input, const KeyValue &output)
Definition: details.h:556
Gaudi::Functional::details::get
auto get(const ToolHandle< Gaudi::Interface::Bind::IBinder< IFace >> &handle, const Algo &, const EventContext &ctx)
Definition: details.h:454
Gaudi::Functional::details
Definition: Consumer.h:20
Gaudi::NamedRange_
Definition: NamedRange.h:52
std::move
T move(T... args)
Gaudi::Functional::details::require_is_not_optional
std::enable_if_t<!is_optional_v< Arg > > require_is_not_optional
Definition: details.h:139
Gaudi::Hive::currentContext
GAUDI_API const EventContext & currentContext()
Definition: ThreadLocalContext.cpp:30
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >::isReEntrant
bool isReEntrant() const override
Definition: details.h:589
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple<>, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *locator, const KeyValue &output)
Definition: details.h:685
Gaudi::Functional::details::InputHandle_t
Gaudi::cpp17::detected_or_t< detail2::DefaultInputHandle< T >, detail2::InputHandle_t, Tr, T > InputHandle_t
Definition: details.h:426
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple<>, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *pSvcLocator, RepeatValues_< KeyValue, N_out > const &outputs)
Definition: details.h:681
Gaudi::Functional::details::invoke_optionally
constexpr struct Gaudi::Functional::details::invoke_optionally_t invoke_optionally
Gaudi::Functional::details::vector_of_const_::front
std::enable_if_t<!std::is_pointer_v< X >, ref_t > front() const
Definition: details.h:356
Gaudi::Functional::details::vector_of_const_::iterator::operator--
iterator & operator--()
Definition: details.h:337
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple<>, Traits_ >::isReEntrant
bool isReEntrant() const override
Definition: details.h:695
std::pair< std::string, std::string >
std::vector::reserve
T reserve(T... args)
GaudiException.h
Gaudi::Functional::details::insert_t::operator()
auto operator()(Container &c, Value &&v) const -> decltype(c.push_back(v))
Definition: details.h:195
Gaudi::Functional::details::isLegacy
constexpr bool isLegacy
Definition: details.h:429
Gaudi::Functional::details::DataHandleMixin< std::tuple<>, std::tuple< In... >, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *pSvcLocator, const IArgs &inputs, std::index_sequence< I... >)
Definition: details.h:619
std::vector< DataObjID >
std::string::size
T size(T... args)
Gaudi::Functional::details::deref_t
Definition: details.h:216
ISvcLocator
Definition: ISvcLocator.h:46
std::back_inserter
T back_inserter(T... args)
GaudiException
Definition: GaudiException.h:31
Gaudi::Functional::details::vector_of_const_::m_containers
ContainerVector m_containers
Definition: details.h:304
Algorithm.h
Gaudi::Functional::details::details2::get_from_handle::operator()
auto operator()(const Handle< I > &h) -> const In &
Definition: details.h:264
Gaudi::Functional::details::vector_of_const_::iterator::iterator_category
typename it_t::iterator_category iterator_category
Definition: details.h:317
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >::m_inputs
std::tuple< details::InputHandle_t< Traits_, In >... > m_inputs
Definition: details.h:591
Gaudi::Functional::details::vector_of_const_::reserve
void reserve(size_type size)
Definition: details.h:345
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple<>, Traits_ >::outputLocationSize
constexpr unsigned int outputLocationSize() const
Definition: details.h:692
Gaudi::Functional::details::DataHandleMixin< std::tuple<>, std::tuple<>, Traits_ >::isReEntrant
bool isReEntrant() const override
Definition: details.h:609
Gaudi::Functional::details::vector_of_const_::size_type
typename ContainerVector::size_type size_type
Definition: details.h:308
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: details.h:107
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *locator, RepeatValues_< KeyValue, N_in > const &inputs, const KeyValue &output)
Definition: details.h:564
gaudirun.c
c
Definition: gaudirun.py:525
std::vector::back
T back(T... args)
ranges::views
Definition: details.h:30
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:315
Gaudi::Functional::details::vector_of_const_
Definition: details.h:297
Gaudi::Functional::details::vector_of_const_::operator[]
std::enable_if_t<!std::is_pointer_v< X >, ref_t > operator[](size_type i) const
Definition: details.h:374
gaudirun.output
output
Definition: gaudirun.py:521
Gaudi::Functional::details::vector_of_const_::iterator::operator-
friend auto operator-(const iterator &lhs, const iterator &rhs)
Definition: details.h:325
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *pSvcLocator, const IArgs &inputs, std::index_sequence< I... >, const OArgs &outputs, std::index_sequence< J... >)
Definition: details.h:532
MultiMergers.Value
Value
Definition: MultiMergers.py:15
Gaudi::Functional::details::get_values_helper
auto get_values_helper(std::index_sequence< I... >)
Definition: details.h:158
Gaudi::Functional::details::to_DataObjID
std::vector< DataObjID > to_DataObjID(const std::vector< std::string > &in)
Definition: details.h:115
std::vector::front
T front(T... args)
Gaudi::Functional::details::deref_t::operator()
In operator()(In &&in) const
Definition: details.h:223
Gaudi::Functional::details::details2::get_from_handle::operator()
auto operator()(const Handle< Gaudi::Range_< I, IT >> &h) -> const In
Definition: details.h:268
DataObjectHandle
DataObjectHandle.h GaudiKernel/DataObjectHandle.h.
Definition: AlgTool.h:36
Gaudi::Functional::details::vector_of_const_::iterator::iterator
iterator(it_t iter)
Definition: details.h:313
Gaudi::Functional::details::filter_evtcontext_t< EventContext, In... >::apply
static auto apply(const Algorithm &algo, Handles &handles)
Definition: details.h:498
Gaudi::Functional::details::make_vector_of_handles
Handles make_vector_of_handles(IDataHandleHolder *owner, const std::vector< DataObjID > &init)
Definition: details.h:436
Gaudi::Functional::details::insert_t
Definition: details.h:189
Gaudi::Functional::details::insert_t::c_remove_ptr_t
std::remove_pointer_t< typename Container::value_type > c_remove_ptr_t
Definition: details.h:192
bug_34121.t
t
Definition: bug_34121.py:31
ToolHandle
Definition: ToolHandle.h:132
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *pSvcLocator, RepeatValues_< KeyValue, N_in > const &inputs, RepeatValues_< KeyValue, N_out > const &outputs)
Definition: details.h:549
Gaudi::Functional::details::vector_of_const_::at
std::enable_if_t<!std::is_pointer_v< X >, ref_t > at(size_type i) const
Definition: details.h:383
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >::inputLocationSize
constexpr unsigned int inputLocationSize() const
Definition: details.h:576
GaudiPython.Pythonizations.ctx
ctx
Definition: Pythonizations.py:578
Gaudi::Functional::details::zip::check_sizes
bool check_sizes(const A &a, const B &b, const C &... c) noexcept
Compare sizes of 3 or more containers.
Definition: details.h:81
Gaudi::Functional::details::invoke_optionally_t::operator()
void operator()(F &&f, Arg &&arg) const
Definition: details.h:151
Gaudi::Functional::details::filter_evtcontext_t< EventContext, In... >::apply
static auto apply(const Algorithm &algo, const EventContext &ctx, Handles &handles)
Definition: details.h:493
Gaudi::Functional::details::vector_of_const_::iterator::m_i
it_t m_i
Definition: details.h:311
std::ostream
STL class.
Gaudi::Functional::details::detail2::InputHandle_t
typename Tr::template InputHandle< T > InputHandle_t
Definition: details.h:401
Gaudi::Functional::details::detail2::DefaultInputHandle
std::conditional_t< is_tool_v< T >, ToolHandle_t< T >, DataObjectReadHandle< T > > DefaultInputHandle
Definition: details.h:410
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple<>, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *pSvcLocator, const OArgs &outputs, std::index_sequence< J... >)
Definition: details.h:668
Gaudi::Functional::details::vector_of_const_::value_type
std::conditional_t< is_pointer, ptr_t, val_t > value_type
Definition: details.h:307
Gaudi::Functional::details::vector_of_const_::back
std::enable_if_t< std::is_pointer_v< X >, ptr_t > back() const
Definition: details.h:369
Gaudi::cpp17::detected_or_t
typename details::detector< Default, void, Op, Args... >::type detected_or_t
Definition: detected.h:50
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:90
DataObjectReadHandle
Definition: DataObjectHandle.h:452
AlgSequencer.h
h
Definition: AlgSequencer.py:31
Gaudi::Functional::details::applyPostProcessing
auto applyPostProcessing(const Fun &fun, Container &c) -> decltype(fun.postprocess(c), void())
Definition: details.h:707
Gaudi::Functional::details::DataHandleMixin< std::tuple<>, std::tuple< In... >, Traits_ >::inputLocationSize
constexpr unsigned int inputLocationSize() const
Definition: details.h:648
Gaudi::Functional::details::put
void put(const OutHandle &out_handle, OptOut &&out)
Definition: details.h:180
Gaudi::Functional::details::filter_evtcontext_t::apply
static auto apply(const Algorithm &algo, Handles &handles)
Definition: details.h:473
Gaudi::Functional::details::details2::is_optional_
decltype(std::declval< T >().has_value(), std::declval< T >().value()) is_optional_
Definition: details.h:126
Gaudi::Functional::details::detail2::OutputHandle_t
typename Tr::template OutputHandle< T > OutputHandle_t
Definition: details.h:399
Gaudi::Functional::details::deref
constexpr struct Gaudi::Functional::details::deref_t deref
Algorithm.h
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple<>, Traits_ >::m_outputs
std::tuple< details::OutputHandle_t< Traits_, Out >... > m_outputs
Definition: details.h:697
Gaudi::Functional::details::vector_of_const_::iterator::operator++
iterator & operator++()
Definition: details.h:333
Gaudi::Functional::details::vector_of_const_::at
std::enable_if_t< std::is_pointer_v< X >, ptr_t > at(size_type i) const
Definition: details.h:387
Gaudi::Functional::details::require_is_optional
std::enable_if_t< is_optional_v< Arg > > require_is_optional
Definition: details.h:136
AnyDataWrapper
Definition: AnyDataWrapper.h:55
Gaudi::Functional::details::vector_of_const_::push_back
void push_back(T &&container)
Definition: details.h:347
std::transform
T transform(T... args)
Gaudi::Functional::details::updateHandleLocation
void updateHandleLocation(DataHandleMixin< Out, In, Tr > &parent, const std::string &prop, const std::string &newLoc)
Definition: details.h:510
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
Gaudi::Functional::details::vector_of_const_::iterator::operator==
friend bool operator==(const iterator &lhs, const iterator &rhs)
Definition: details.h:324
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >::m_outputs
std::tuple< details::OutputHandle_t< Traits_, Out >... > m_outputs
Definition: details.h:592
Gaudi::Functional::details::vector_of_const_::back
std::enable_if_t<!std::is_pointer_v< X >, ref_t > back() const
Definition: details.h:365
IBinder.h
Gaudi::Functional::details::filter_evtcontext_t
Definition: details.h:466
Gaudi::Functional::details::details2::is_gaudi_range
Definition: details.h:238
Gaudi::Range_
Definition: Range.h:95
std::ostringstream
STL class.
Gaudi::Functional::details::DataHandleMixin< std::tuple<>, std::tuple< In... >, Traits_ >::isReEntrant
bool isReEntrant() const override
Definition: details.h:651
Gaudi::Functional::details::DataHandleMixin< std::tuple<>, std::tuple<>, Traits_ >::m_inputs
std::tuple m_inputs
Definition: details.h:611
gaudirun.type
type
Definition: gaudirun.py:160
ThreadLocalContext.h
Gaudi::Functional::details::deref_t::operator()
const In & operator()(const In &in) const
Definition: details.h:218
Gaudi::cpp17::detected_t
typename is_detected< Op, Args... >::type detected_t
Definition: detected.h:46
DataObjectHandle::put
T * put(std::unique_ptr< T > object) const
Register object in transient store.
Definition: DataObjectHandle.h:180
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
Gaudi::Functional::details::zip::verifySizes
decltype(auto) verifySizes(Args &... args)
Verify the data container sizes have the same sizes.
Definition: details.h:87
Gaudi::Functional::details::filter_evtcontext_t::apply
static auto apply(const Algorithm &algo, const EventContext &ctx, Handles &handles)
Definition: details.h:479
Gaudi::Functional::details::details2::get_from_handle
Definition: details.h:262
Gaudi::Functional::details::vector_of_const_::iterator::operator!=
friend bool operator!=(const iterator &lhs, const iterator &rhs)
Definition: details.h:323
gaudirun.args
args
Definition: gaudirun.py:336
Gaudi::Functional::details::vector_of_const_::begin
iterator begin() const
Definition: details.h:351
std::vector::begin
T begin(T... args)
std
STL namespace.
Gaudi::Functional::details::vector_of_const_::iterator::difference_type
typename it_t::difference_type difference_type
Definition: details.h:321
Gaudi::Functional::details::is_optional_v
constexpr bool is_optional_v
Definition: details.h:133
Gaudi::Functional::details::details2::push_back
void push_back(Container &c, const Value &v, std::false_type)
Definition: details.h:257
Gaudi::Functional::details::detail2::is_tool_v
constexpr auto is_tool_v
Definition: details.h:404
Gaudi::Functional::details::details2::deref_if
T & deref_if(T *const t, std::true_type)
Definition: details.h:291
EventContext
Definition: EventContext.h:34
Gaudi::Functional::details::RepeatValues_
decltype(get_values_helper< Value >(std::make_index_sequence< N >())) RepeatValues_
Definition: details.h:163
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >::outputLocationSize
constexpr unsigned int outputLocationSize() const
Definition: details.h:586
Gaudi::Functional::Traits::BaseClass_t
Definition: utilities.h:40
Gaudi::Functional::details::vector_of_const_::iterator::value_type
typename it_t::iterator_category value_type
Definition: details.h:318
detected.h
Gaudi::Functional::details::vector_of_const_::iterator::pointer
typename it_t::pointer pointer
Definition: details.h:320
fixtures.reference
Generator[dict, None, None] reference(request, Optional[Path] reference_path)
Definition: fixtures.py:211
Gaudi::Functional::details::vector_of_const_::iterator::it_t
typename ContainerVector::const_iterator it_t
Definition: details.h:310
Gaudi::Functional::details::updateHandleLocations
void updateHandleLocations(DataHandleMixin< Out, In, Tr > &parent, const std::string &prop, const std::vector< std::string > &newLocs)
Definition: details.h:517
Gaudi::Functional::details::insert_t::operator()
auto operator()(Container &c, Value &&v) const -> decltype(c.insert(v))
Definition: details.h:200
Gaudi::Functional::details::vector_of_const_::ref_t
std::add_lvalue_reference_t< val_t > ref_t
Definition: details.h:302
Gaudi::Functional::details::vector_of_const_::iterator::reference
typename it_t::reference reference
Definition: details.h:319
Properties.v
v
Definition: Properties.py:122
Gaudi::Functional::details::DataHandleMixin
Definition: details.h:507
Gaudi::Functional::details::details2::get_from_handle::operator()
auto operator()(const Handle< Gaudi::NamedRange_< I, IT >> &h) -> const In
Definition: details.h:272
Gaudi::Functional::details::vector_of_const_::end
iterator end() const
Definition: details.h:352
std::ostringstream::str
T str(T... args)
std::size_t
std::vector::end
T end(T... args)
Gaudi::Functional::details::BaseClass_t
Gaudi::cpp17::detected_or_t< Base, detail2::BaseClass_t, Tr > BaseClass_t
Definition: details.h:417
Gaudi::Functional::details::zip::printSizes
void printSizes(OS &out, Arg &&arg, Args &&... args)
Print the parameters.
Definition: details.h:61
Gaudi::Functional::details::details2::value_type_of_t
typename T::value_type value_type_of_t
Definition: details.h:129
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
Gaudi::Functional::details::DataHandleMixin< std::tuple<>, std::tuple<>, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *pSvcLocator, std::tuple<>={}, std::tuple<>={})
Definition: details.h:602
Gaudi::Functional::details::vector_of_const_::iterator::ret_t
std::conditional_t< is_pointer, ptr_t, ref_t > ret_t
Definition: details.h:314
Gaudi::Functional::details::insert
constexpr struct Gaudi::Functional::details::insert_t insert
Gaudi::Interface::Bind::IBinder
Definition: IBinder.h:56
DataObjectHandle.h
Gaudi::Functional::details::details2::get_from_handle::operator()
auto operator()(const Handle< I > &h) -> const In
Definition: details.h:281
Gaudi::Functional::details::OutputHandle_t
Gaudi::cpp17::detected_or_t< DataObjectWriteHandle< T >, detail2::OutputHandle_t, Tr, T > OutputHandle_t
Definition: details.h:424
Gaudi::Functional::details::filter_evtcontext
typename filter_evtcontext_t< In... >::type filter_evtcontext
Definition: details.h:504
Gaudi::Functional::details::DataHandleMixin< std::tuple<>, std::tuple< In... >, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *pSvcLocator, RepeatValues_< KeyValue, N_in > const &inputs)
Definition: details.h:632
Gaudi::Functional::details::vector_of_const_::vector_of_const_
vector_of_const_()=default
Gaudi::Functional::details::vector_of_const_::ptr_t
std::add_pointer_t< val_t > ptr_t
Definition: details.h:301
Gaudi::Functional::details::DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *locator, const KeyValue &input, RepeatValues_< KeyValue, N_out > const &outputs)
Definition: details.h:560
Gaudi::Functional::details::details2::get_from_handle::operator()
auto operator()(const Handle< std::optional< Gaudi::NamedRange_< I, IT >>> &h) -> const In
Definition: details.h:276
Gaudi::Functional::details::zip::range
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
Definition: details.h:98
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:75
Gaudi::Functional::details::DataHandleMixin< std::tuple<>, std::tuple< In... >, Traits_ >::DataHandleMixin
DataHandleMixin(std::string name, ISvcLocator *locator, const KeyValue &input)
Definition: details.h:637
PrepareBase.out
out
Definition: PrepareBase.py:20
Gaudi::Functional::details::getKey
auto getKey(const Handle &h) -> decltype(h.objKey())
Definition: details.h:459
Gaudi::Functional::details::remove_optional_t
std::conditional_t< is_optional_v< T >, Gaudi::cpp17::detected_t< details2::value_type_of_t, T >, T > remove_optional_t
Definition: details.h:143
Gaudi::Functional::details::vector_of_const_::is_null
bool is_null(size_type i) const
Definition: details.h:391
Gaudi::Functional::details::vector_of_const_::size
size_type size() const
Definition: details.h:353