The Gaudi Framework
master (e98cfcff)
Loading...
Searching...
No Matches
Consumer.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
#include "
details.h
"
13
#include "
utilities.h
"
14
15
namespace
Gaudi::Functional
{
16
17
namespace
details
{
18
19
template
<
typename
Signature,
typename
Traits_,
bool
isLegacy>
20
struct
Consumer
;
21
22
template
<
typename
... In,
typename
Traits_>
23
struct
Consumer
<void( const In&... ), Traits_,
true
> :
DataHandleMixin
<
type_list
<>,
type_list
<In...>, Traits_> {
24
using
DataHandleMixin
<
type_list<>
,
type_list
<In...>, Traits_>
::DataHandleMixin
;
25
26
// derived classes are NOT allowed to implement execute ...
27
StatusCode
execute
() override final {
return
execute_single_output
( *
this
, this->getContext() ); }
28
29
// ... instead, they must implement the following operator
30
virtual
void
operator()
(
const
In&... )
const
= 0;
31
};
32
33
template
<
typename
... In,
typename
Traits_>
34
struct
Consumer
<void( const In&... ), Traits_,
false
> :
DataHandleMixin
<
type_list
<>,
type_list
<In...>, Traits_> {
35
using
DataHandleMixin
<
type_list<>
,
type_list
<In...>, Traits_>
::DataHandleMixin
;
36
37
// derived classes are NOT allowed to implement execute ...
38
StatusCode
execute
(
const
EventContext
& ctx )
const
override
final
{
return
execute_single_output
( *
this
, ctx ); }
39
40
// ... instead, they must implement the following operator
41
virtual
void
operator()
(
const
In&... )
const
= 0;
42
};
43
44
}
// namespace details
45
46
template
<
typename
Signature,
typename
Traits_ = Traits::useDefaults>
47
using
Consumer
=
details::Consumer<Signature, Traits_, details::isLegacy<Traits_>
>;
48
49
}
// namespace Gaudi::Functional
EventContext
This class represents an entry point to all the event specific data.
Definition
EventContext.h:35
Gaudi::Functional::details::DataHandleMixin
Definition
details.h:749
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
details.h
Gaudi::Functional::details::execute_single_output
StatusCode execute_single_output(const Algorithm &algo, const EventContext &ctx, const OutHandles &out_handles={})
Definition
details.h:952
Gaudi::Functional
Definition
Consumer.h:15
Gaudi::Functional::Consumer
details::Consumer< Signature, Traits_, details::isLegacy< Traits_ > > Consumer
Definition
Consumer.h:47
details
Definition
AnyDataWrapper.h:19
Gaudi::Functional::details::Consumer
Definition
Consumer.h:20
Gaudi::Functional::details::Consumer< void(const In &...), Traits_, false >::execute
StatusCode execute(const EventContext &ctx) const override final
Definition
Consumer.h:38
Gaudi::Functional::details::Consumer< void(const In &...), Traits_, false >::operator()
virtual void operator()(const In &...) const =0
Gaudi::Functional::details::Consumer< void(const In &...), Traits_, true >::execute
StatusCode execute() override final
Definition
Consumer.h:27
Gaudi::Functional::details::Consumer< void(const In &...), Traits_, true >::operator()
virtual void operator()(const In &...) const =0
Gaudi::Functional::details::type_list
Definition
details.h:447
utilities.h
GaudiFunctional
include
Gaudi
Functional
Consumer.h
Generated on Wed Jun 3 2026 11:01:19 for The Gaudi Framework by
1.13.1