22template <
typename Data,
typename View>
27 : Producer{ name, svcLoc, {
"Output",
"/Event/Test/StringView" } } {}
29 std::string
operator()()
const override {
return "Hello World"; }
36 : Producer{ name, svcLoc, {
"Output",
"/Event/Test/IntView" } } {}
39 std::vector<int> vi{ 1, 2, 3, 5, 8, 13, 21, 34 };
40 info() <<
"made vector with data at : " << vi.data() <<
endmsg;
48 : Consumer{ name, svcLoc, {
"Input",
"/Event/Test/StringView" } } {}
50 void operator()(
const std::string_view& sv )
const override { info() << sv <<
endmsg; }
56 : Consumer{ name, svcLoc, {
"Input",
"/Event/Test/IntView" } } {}
58 void operator()(
const gsl::span<const int>& view )
const override {
59 info() <<
"got a span with data at : " << view.data() <<
endmsg;
61 for (
int i : view ) out << i <<
" ";
Gaudi::Functional::Traits::use_< Gaudi::Functional::Traits::writeViewFor< Data, View >, BaseClass_t > writeViewFor
Gaudi::Functional::Traits::BaseClass_t< Gaudi::Algorithm > BaseClass_t
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
details::Producer< Signature, Traits_, details::isLegacy< Traits_ > > Producer
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
GetIntView(const std::string &name, ISvcLocator *svcLoc)
void operator()(const gsl::span< const int > &view) const override
void operator()(const std::string_view &sv) const override
GetStringView(const std::string &name, ISvcLocator *svcLoc)
ProduceIntView(const std::string &name, ISvcLocator *svcLoc)
std::vector< int > operator()() const override
ProduceStringView(const std::string &name, ISvcLocator *svcLoc)
std::string operator()() const override