| The Gaudi Framework v32r1 (f65d50dc)

Namespaces | Classes | Typedefs | Functions | Variables
Gaudi::Functional::details Namespace Reference

## Namespaces
| detail2
| details2
| zip

## Classes
struct | Consumer
struct | Consumer< void(const In &...), Traits_, false >
struct | Consumer< void(const In &...), Traits_, true >
class | DataHandleMixin
class | DataHandleMixin< std::tuple< Out... >, std::tuple< In... >, Traits_ >
class | DataHandleMixin< std::tuple< Out... >, void, Traits_ >
class | DataHandleMixin< void, std::tuple< In... >, Traits_ >
class | DataHandleMixin< void, std::tuple<>, Traits_ >
struct | deref_t
struct | filter_evtcontext_t
struct | filter_evtcontext_t< EventContext, In... >
struct | insert_t
struct | invoke_optionally_t
struct | MergingTransformer
struct | MergingTransformer< Out(const vector_of_const_< In > &), Traits_, false >
struct | MergingTransformer< Out(const vector_of_const_< In > &), Traits_, true >
struct | Producer
class | SplittingTransformer
class | SplittingTransformer< vector_of_< Out >(const In &...), Traits_, false >
class | SplittingTransformer< vector_of_< Out >(const In &...), Traits_, true >
class | vector_of_const_

## Typedefs
template<typename Arg >
using | require_is_optional = std::enable_if_t< is_optional_v< Arg > >
template<typename Arg >
using | require_is_not_optional = std::enable_if_t<!is_optional_v< Arg > >
template<typename T >
using | remove_optional_t = std::conditional_t< is_optional_v< T >, typename T::value_type, T >
template<typename Tr >
using | BaseClass_t = Gaudi::cpp17::detected_or_t< GaudiAlgorithm, detail2::BaseClass_t, Tr >
template<typename Tr , typename T >
using | OutputHandle_t = Gaudi::cpp17::detected_or_t< DataObjectWriteHandle< T >, detail2::OutputHandle_t, Tr, T >
template<typename Tr , typename T >
using | InputHandle_t = Gaudi::cpp17::detected_or_t< DataObjectReadHandle< T >, detail2::InputHandle_t, Tr, T >
template<typename... In>
using | filter_evtcontext = typename filter_evtcontext_t< In... >::type

## Functions
template<typename Out1 , typename Out2 , typename = std::enable_if_t<std::is_constructible_v<Out1, Out2> && std::is_base_of_v<DataObject, Out1>>>
Out1 * | put (const DataObjectHandle< Out1 > &out_handle, Out2 &&out)
template<typename Out1 , typename Out2 , typename = std::enable_if_t<std::is_constructible_v<Out1, Out2>>>
void | put (const DataObjectHandle< AnyDataWrapper< Out1 >> &out_handle, Out2 &&out)
template<typename OutHandle , typename OptOut , typename = require_is_optional<OptOut>>
void | put (const OutHandle &out_handle, OptOut &&out)
template<typename Handles >
Handles | make_vector_of_handles (IDataHandleHolder *owner, const std::vector< std::string > &init)
template<typename Handle , typename Algo >
auto | get (const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
template<typename Handle >
auto | getKey (const Handle &h) -> decltype(h.objKey())
template<typename Out , typename In , typename Tr >
void | updateHandleLocation (DataHandleMixin< Out, In, Tr > &parent, const std::string &prop, const std::string &newLoc)
template<typename Out , typename In , typename Tr >
void | updateHandleLocations (DataHandleMixin< Out, In, Tr > &parent, const std::string &prop, const std::vector< std::string > &newLocs)
template<typename Fun , typename Container , typename... Args>
constexpr void | applyPostProcessing (const Fun &, Container &, Args...)
template<typename Fun , typename Container >
auto | applyPostProcessing (const Fun &fun, Container &c) -> decltype(fun.postprocess(c), void())

## Variables
template<typename Arg >
constexpr bool | is_optional_v = Gaudi::cpp17::is_detected_v<details2::is_optional_, Arg>
constexpr struct Gaudi::Functional::details::invoke_optionally_t | invoke_optionally
constexpr struct Gaudi::Functional::details::insert_t | insert
constexpr struct Gaudi::Functional::details::deref_t | deref
template<typename Traits >
constexpr bool | isLegacy

## Typedef Documentation

## ◆ BaseClass_t

template<typename Tr >

using Gaudi::Functional::details::BaseClass_t = typedef Gaudi::cpp17::detected_or_t<GaudiAlgorithm, detail2::BaseClass_t, Tr>

Definition at line 303 of file FunctionalDetails.h.

## ◆ filter_evtcontext

template<typename... In>

using Gaudi::Functional::details::filter_evtcontext = typedef typename filter_evtcontext_t<In...>::type

Definition at line 387 of file FunctionalDetails.h.

## ◆ InputHandle_t

template<typename Tr , typename T >

using Gaudi::Functional::details::InputHandle_t = typedef Gaudi::cpp17::detected_or_t<DataObjectReadHandle<T>, detail2::InputHandle_t, Tr, T>

Definition at line 311 of file FunctionalDetails.h.

## ◆ OutputHandle_t

template<typename Tr , typename T >

using Gaudi::Functional::details::OutputHandle_t = typedef Gaudi::cpp17::detected_or_t<DataObjectWriteHandle<T>, detail2::OutputHandle_t, Tr, T>

Definition at line 309 of file FunctionalDetails.h.

## ◆ remove_optional_t

template<typename T >

using Gaudi::Functional::details::remove_optional_t = typedef std::conditional_t<is_optional_v<T>, typename T::value_type, T>

Definition at line 105 of file FunctionalDetails.h.

## ◆ require_is_not_optional

template<typename Arg >

using Gaudi::Functional::details::require_is_not_optional = typedef std::enable_if_t<!is_optional_v<Arg> >

Definition at line 102 of file FunctionalDetails.h.

## ◆ require_is_optional

template<typename Arg >

using Gaudi::Functional::details::require_is_optional = typedef std::enable_if_t<is_optional_v<Arg> >

Definition at line 99 of file FunctionalDetails.h.

## Function Documentation

## ◆ applyPostProcessing() [1/2]

template<typename Fun , typename Container , typename... Args>

constexpr void Gaudi::Functional::details::applyPostProcessing | ( | const Fun & | ,
|  | Container & | ,
|  | Args... |
| ) |  |

Definition at line 560 of file FunctionalDetails.h.

560 {
561 static_assert( sizeof...( Args ) == 0, "Args should not be used!" );
562 }

## ◆ applyPostProcessing() [2/2]

template<typename Fun , typename Container >

auto Gaudi::Functional::details::applyPostProcessing | ( | const Fun & | fun,
|  | Container & | c
| ) |  | -> decltype( fun.postprocess( c ), void() )

Definition at line 565 of file FunctionalDetails.h.

565 {
566 fun.postprocess( c );
567 }
gaudirun.c
c
Definition: gaudirun.py:487

## ◆ get()

template<typename Handle , typename Algo >

auto Gaudi::Functional::details::get | ( | const Handle & | handle,
|  | const Algo & | ,
|  | const EventContext & |
| ) |  | -> decltype( details::deref( handle.get() ) )

Definition at line 332 of file FunctionalDetails.h.

334 {
335 return details::deref( handle.get() );
336 }
Gaudi::Functional::details::deref
constexpr struct Gaudi::Functional::details::deref_t deref

## ◆ getKey()

template<typename Handle >

auto Gaudi::Functional::details::getKey | ( | const Handle & | h | ) | -> decltype( h.objKey() )

Definition at line 339 of file FunctionalDetails.h.

339 {
340 return h.objKey();
341 }

## ◆ make_vector_of_handles()

template<typename Handles >

Handles Gaudi::Functional::details::make_vector_of_handles | ( | IDataHandleHolder * | owner,
|  | const std::vector< std::string > & | init
| ) |  |

Definition at line 320 of file FunctionalDetails.h.

320 {
321 Handles handles;
322 handles.reserve( init.size() );
323 std::transform(
324 init.begin(), init.end(),
325 std::back_inserter( handles ), [&]( const std::string& loc ) -> typename Handles::value_type {
326 return {loc, owner};
327 } );
328 return handles;
329 }
std::vector::end
T end(T... args)
std::string
STL class.
std::vector::size
T size(T... args)
std::vector::begin
T begin(T... args)
std::back_inserter
T back_inserter(T... args)
std::transform
T transform(T... args)

## ◆ put() [1/3]

template<typename Out1 , typename Out2 , typename = std::enable_if_t<std::is_constructible_v<Out1, Out2> && std::is_base_of_v<DataObject, Out1>>>

Out1* Gaudi::Functional::details::put | ( | const DataObjectHandle< Out1 > & | out_handle,
|  | Out2 && | out
| ) |  |

Definition at line 121 of file FunctionalDetails.h.

121 {
122 return out_handle.put( std::make_unique<Out1>( std::forward<Out2>( out ) ) );
123 }
DataObjectHandle::put
T * put(std::unique_ptr< T > object) const
Register object in transient store.
Definition: DataObjectHandle.h:153

## ◆ put() [2/3]

template<typename Out1 , typename Out2 , typename = std::enable_if_t<std::is_constructible_v<Out1, Out2>>>

void Gaudi::Functional::details::put | ( | const DataObjectHandle< AnyDataWrapper< Out1 >> & | out_handle,
|  | Out2 && | out
| ) |  |

Definition at line 126 of file FunctionalDetails.h.

126 {
127 out_handle.put( std::forward<Out2>( out ) );
128 }
DataObjectHandle::put
T * put(std::unique_ptr< T > object) const
Register object in transient store.
Definition: DataObjectHandle.h:153

## ◆ put() [3/3]

template<typename OutHandle , typename OptOut , typename = require_is_optional<OptOut>>

void Gaudi::Functional::details::put | ( | const OutHandle & | out_handle,
|  | OptOut && | out
| ) |  |

Definition at line 132 of file FunctionalDetails.h.

132 {
133 if ( out ) put( out_handle, *std::forward<OptOut>( out ) );
134 }
Gaudi::Functional::details::put
void put(const OutHandle &out_handle, OptOut &&out)
Definition: FunctionalDetails.h:132

## ◆ updateHandleLocation()

template<typename Out , typename In , typename Tr >

void Gaudi::Functional::details::updateHandleLocation | ( | DataHandleMixin< Out, In, Tr > & | parent,
|  | const std::string & | prop,
|  | const std::string & | newLoc
| ) |  |

Definition at line 393 of file FunctionalDetails.h.

394 {
395 auto sc = parent.setProperty( prop, newLoc );
396 if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + newLoc, sc );
397 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21

## ◆ updateHandleLocations()

template<typename Out , typename In , typename Tr >

void Gaudi::Functional::details::updateHandleLocations | ( | DataHandleMixin< Out, In, Tr > & | parent,
|  | const std::string & | prop,
|  | const std::vector< std::string > & | newLocs
| ) |  |

Definition at line 400 of file FunctionalDetails.h.

401 {
402 std::ostringstream ss;
403 GaudiUtils::details::ostream_joiner(
404 ss << '[', newLocs, ", ", []( std::ostream & os, const auto& i ) -> auto& { return os << "'" << i << "'"; } )
405 << ']';
406 auto sc = parent.setProperty( prop, ss.str() );
407 if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + ss.str(), sc );
408 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
std::ostringstream
STL class.
std::ostringstream::str
T str(T... args)
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:37
std::ostream
STL class.

## Variable Documentation

## ◆ deref

constexpr struct Gaudi::Functional::details::deref_t Gaudi::Functional::details::deref

## ◆ insert

constexpr struct Gaudi::Functional::details::insert_t Gaudi::Functional::details::insert

## ◆ invoke_optionally

constexpr struct Gaudi::Functional::details::invoke_optionally_t Gaudi::Functional::details::invoke_optionally

## ◆ is_optional_v

template<typename Arg >

constexpr bool Gaudi::Functional::details::is_optional_v = Gaudi::cpp17::is_detected_v<details2::is_optional_, Arg>

Definition at line 96 of file FunctionalDetails.h.

## ◆ isLegacy

template<typename Traits >

constexpr bool Gaudi::Functional::details::isLegacy
| inline

Initial value:
=
std::is_base_of_v<Gaudi::details::LegacyAlgorithmAdapter, details::BaseClass_t<Traits>>

Definition at line 314 of file FunctionalDetails.h.