The Gaudi Framework  master (e98cfcff)
Loading...
Searching...
No Matches
SplittingTransformer.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2026 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 "details.h"
14#include "utilities.h"
15#include <optional>
16#include <vector>
17
18namespace Gaudi::Functional {
19
20 template <typename Container>
21 using vector_of_ = std::vector<Container>;
22 template <typename Container>
23 using vector_of_optional_ = std::vector<std::optional<Container>>;
24
25 namespace details {
26
27 template <typename Signature, typename Traits_>
29
30 template <typename Out, typename... In, typename Traits_>
31 struct SplittingTransformer<vector_of_<Out>( const In&... ), Traits_>
34 Traits_>::DataHandleMixin;
35
36 // derived classes can NOT implement execute
37 StatusCode execute( const EventContext& ctx ) const override final {
38 return details::execute_single_output( *this, ctx, this->m_outputs );
39 }
40
41 // TODO/FIXME: how does the callee know in which order to produce the outputs?
42 // (note: 'missing' items can be specified by making Out an std::optional<Out>,
43 // and only those entries which contain an Out are stored)
44 virtual vector_of_<Out> operator()( const In&... ) const = 0;
45 };
46
47 } // namespace details
48
49 template <typename Signature, typename Traits_ = Traits::useDefaults>
51
52} // namespace Gaudi::Functional
This class represents an entry point to all the event specific data.
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
StatusCode execute_single_output(const Algorithm &algo, const EventContext &ctx, const OutHandles &out_handles={})
Definition details.h:952
details::SplittingTransformer< Signature, Traits_ > SplittingTransformer
std::vector< Container > vector_of_
std::vector< std::optional< Container > > vector_of_optional_