The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Gaudi::TestSuite::IntVectorsMergingConsumer Struct Referencefinal
Inheritance diagram for Gaudi::TestSuite::IntVectorsMergingConsumer:
Collaboration diagram for Gaudi::TestSuite::IntVectorsMergingConsumer:

Public Types

using Base

Public Member Functions

 IntVectorsMergingConsumer (const std::string &name, ISvcLocator *svcLoc)
void operator() (Gaudi::Functional::vector_of_const_< std::vector< int > > const &intVectors) const override

Detailed Description

Definition at line 540 of file MakeAndConsume.cpp.

Member Typedef Documentation

◆ Base

Initial value:
details::MergingTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MergingConsumer
Gaudi::Functional::Traits::BaseClass_t< Gaudi::Algorithm > BaseClass_t

Definition at line 543 of file MakeAndConsume.cpp.

Constructor & Destructor Documentation

◆ IntVectorsMergingConsumer()

Gaudi::TestSuite::IntVectorsMergingConsumer::IntVectorsMergingConsumer ( const std::string & name,
ISvcLocator * svcLoc )
inline

Definition at line 547 of file MakeAndConsume.cpp.

548 : Base( name, svcLoc, { "InputLocations", {} } ) {}
Gaudi::Functional::MergingConsumer< void(Gaudi::Functional::vector_of_const_< std::vector< int > > const &), BaseClass_t > Base

Member Function Documentation

◆ operator()()

void Gaudi::TestSuite::IntVectorsMergingConsumer::operator() ( Gaudi::Functional::vector_of_const_< std::vector< int > > const & intVectors) const
inlineoverride

Definition at line 550 of file MakeAndConsume.cpp.

550 {
551 // Create a vector and pre-allocate enough space for the number of integers we have
552 auto nelements = std::accumulate( intVectors.begin(), intVectors.end(), 0,
553 []( const auto a, const auto b ) { return a + b.size(); } );
554 info() << "sum of input sizes: " << nelements << endmsg;
555 // Concatenate the input vectors to form the output
556 for ( const auto& intVector : intVectors ) { info() << "Consuming vector " << intVector << endmsg; }
557 }
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198

The documentation for this struct was generated from the following file: