The Gaudi Framework
master (2e52acd2)
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
#include <
GaudiKernel/FunctionalFilterDecision.h
>
15
#include <tuple>
16
17
namespace
Gaudi::Functional
{
18
19
namespace
details
{
20
21
template
<
typename
Signature,
typename
Traits_,
bool
isLegacy>
22
struct
Consumer
;
23
24
template
<
typename
... In,
typename
Traits_>
25
struct
Consumer
<void( const In&... ), Traits_,
true
>
26
:
DataHandleMixin
<
std
::tuple<>,
filter_evtcontext
<In...>, Traits_> {
27
using
DataHandleMixin
<std::tuple<>,
filter_evtcontext
<In...>, Traits_>
::DataHandleMixin
;
28
29
// derived classes are NOT allowed to implement execute ...
30
StatusCode
execute
() override final {
31
return
details::execute
( *
this
, [&] {
32
filter_evtcontext_t<In...>::apply
( *
this
,
Gaudi::Hive::currentContext
(), this->m_inputs );
33
return
FilterDecision::PASSED
;
34
} );
35
}
36
37
// ... instead, they must implement the following operator
38
virtual
void
operator()
(
const
In&... )
const
= 0;
39
};
40
41
template
<
typename
... In,
typename
Traits_>
42
struct
Consumer
<void( const In&... ), Traits_,
false
>
43
:
DataHandleMixin
<
std
::tuple<>,
filter_evtcontext
<In...>, Traits_> {
44
using
DataHandleMixin
<std::tuple<>,
filter_evtcontext
<In...>, Traits_>
::DataHandleMixin
;
45
46
// derived classes are NOT allowed to implement execute ...
47
StatusCode
execute
(
const
EventContext
& ctx )
const
override
final
{
48
return
details::execute
( *
this
, [&] {
49
filter_evtcontext_t<In...>::apply
( *
this
, ctx, this->m_inputs );
50
return
FilterDecision::PASSED
;
51
} );
52
}
53
54
// ... instead, they must implement the following operator
55
virtual
void
operator()
(
const
In&... )
const
= 0;
56
};
57
58
}
// namespace details
59
60
template
<
typename
Signature,
typename
Traits_ = Traits::useDefaults>
61
using
Consumer
=
details::Consumer<Signature, Traits_, details::isLegacy<Traits_>
>;
62
63
}
// namespace Gaudi::Functional
FunctionalFilterDecision.h
EventContext
This class represents an entry point to all the event specific data.
Definition
EventContext.h:35
Gaudi::Functional::details::DataHandleMixin
Definition
details.h:552
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
details.h
Gaudi::Functional::details::execute
StatusCode execute(CommonMessagingBase const &alg, F &&f)
Definition
details.h:429
Gaudi::Functional::details::filter_evtcontext
typename filter_evtcontext_t< In... >::type filter_evtcontext
Definition
details.h:549
Gaudi::Functional
Definition
Consumer.h:17
Gaudi::Functional::FilterDecision::PASSED
@ PASSED
Definition
FunctionalFilterDecision.h:18
Gaudi::Functional::Consumer
details::Consumer< Signature, Traits_, details::isLegacy< Traits_ > > Consumer
Definition
Consumer.h:61
Gaudi::Hive::currentContext
GAUDI_API const EventContext & currentContext()
Definition
ThreadLocalContext.cpp:30
details
Definition
AnyDataWrapper.h:19
std
STL namespace.
Gaudi::Functional::details::Consumer
Definition
Consumer.h:22
Gaudi::Functional::details::Consumer< void(const In &...), Traits_, false >::execute
StatusCode execute(const EventContext &ctx) const override final
Definition
Consumer.h:47
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:30
Gaudi::Functional::details::Consumer< void(const In &...), Traits_, true >::operator()
virtual void operator()(const In &...) const =0
Gaudi::Functional::details::filter_evtcontext_t::apply
static auto apply(const Algorithm &algo, const EventContext &ctx, Handles &handles)
Definition
details.h:529
utilities.h
GaudiFunctional
include
Gaudi
Functional
Consumer.h
Generated on Fri May 15 2026 17:06:46 for The Gaudi Framework by
1.13.1