Go to the documentation of this file.
17 #include <string_view>
22 template <
typename Data,
typename View>
27 :
Producer{
name, svcLoc, {
"Output",
"/Event/Test/StringView" } } {}
36 :
Producer{
name, svcLoc, {
"Output",
"/Event/Test/IntView" } } {}
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 <<
" ";
void operator()(const std::string_view &sv) const override
ProduceIntView(const std::string &name, ISvcLocator *svcLoc)
void operator()(const gsl::span< const int > &view) const override
details::Consumer< Signature, Traits_, details::isLegacy< Traits_ > > Consumer
GetStringView(const std::string &name, ISvcLocator *svcLoc)
ProduceStringView(const std::string &name, ISvcLocator *svcLoc)
details::Producer< Signature, Traits_, details::isLegacy< Traits_ > > Producer
std::vector< int > operator()() const override
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
struct GAUDI_API vector
Parametrisation class for vector-like implementation.
#define DECLARE_COMPONENT(type)
std::string operator()() const override
GetIntView(const std::string &name, ISvcLocator *svcLoc)