Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Consumer.h
Go to the documentation of this file.
1 #ifndef GAUDI_FUNCTIONAL_CONSUMER_H
2 #define GAUDI_FUNCTIONAL_CONSUMER_H
3 
6 #include "GaudiKernel/apply.h"
7 #include <utility>
8 
9 namespace Gaudi {
10  namespace Functional {
11 
12  template <typename Signature, typename Traits_ = Traits::useDefaults>
13  class Consumer;
14 
15  template <typename... In, typename Traits_>
16  class Consumer<void( const In&... ), Traits_>
18  public:
19  using details::DataHandleMixin<void, details::filter_evtcontext<In...>, Traits_>::DataHandleMixin;
20 
21  // derived classes are NOT allowed to implement execute ...
22  StatusCode execute() override final {
23  try {
25  } catch ( GaudiException& e ) {
26  ( e.code() ? this->warning() : this->error() ) << e.message() << endmsg;
27  return e.code();
28  }
29  return StatusCode::SUCCESS;
30  }
31 
32  // ... instead, they must implement the following operator
33  virtual void operator()( const In&... ) const = 0;
34  };
35  } // namespace Functional
36 } // namespace Gaudi
37 
38 #endif
virtual const std::string & message() const
error message to be printed
Define general base for Gaudi exception.
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
class MergingTransformer< Out(const vector_of_const_< In > void
typename filter_evtcontext_t< In... >::type filter_evtcontext
virtual const StatusCode & code() const
StatusCode for Exception.
class MergingTransformer< Out(const vector_of_const_< In > Traits_
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
static auto apply(const Algorithm &algo, Handles &handles)
std::vector< InputHandle_t< In > > m_inputs
virtual Out operator()(const vector_of_const_< In > &inputs) const =0
Helper functions to set/get the application return code.
Definition: __init__.py:1
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192