The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Gaudi::TestSuite::TwoDMerger Struct Referencefinal

Concatenates a list of input vectors into a single output vector. More...

Inheritance diagram for Gaudi::TestSuite::TwoDMerger:
Collaboration diagram for Gaudi::TestSuite::TwoDMerger:

Public Member Functions

 TwoDMerger (const std::string &name, ISvcLocator *svcLoc)
std::tuple< std::vector< int >, std::vector< double > > operator() (const Gaudi::Functional::vector_of_const_< std::vector< int > > &intVectors, const Gaudi::Functional::vector_of_const_< std::vector< double > > &doubleVectors) const override

Detailed Description

Concatenates a list of input vectors into a single output vector.

Definition at line 578 of file MakeAndConsume.cpp.

Constructor & Destructor Documentation

◆ TwoDMerger()

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

Definition at line 584 of file MakeAndConsume.cpp.

585 : MergingMultiTransformer{
586 name,
587 svcLoc,
588 { { "InputInts", {} }, { "InputDoubles", {} } },
589 { { "OutputInts", "/Event/MySummedInts" }, { "OutputDoubles", "/Event/MySummedDoubles" } } } {}

Member Function Documentation

◆ operator()()

std::tuple< std::vector< int >, std::vector< double > > Gaudi::TestSuite::TwoDMerger::operator() ( const Gaudi::Functional::vector_of_const_< std::vector< int > > & intVectors,
const Gaudi::Functional::vector_of_const_< std::vector< double > > & doubleVectors ) const
inlineoverride

Definition at line 592 of file MakeAndConsume.cpp.

593 {
594 auto r = std::tuple{ std::vector<int>{}, std::vector<double>{} };
595 auto& [is, ds] = r;
596 std::transform( begin( intVectors ), end( intVectors ), std::back_inserter( is ),
597 []( const std::vector<int>& vi ) { return std::accumulate( begin( vi ), end( vi ), 0 ); } );
598 always() << " accumulated: " << is << endmsg;
599 std::transform( begin( doubleVectors ), end( doubleVectors ), std::back_inserter( ds ),
600 []( const std::vector<double>& vd ) { return std::accumulate( begin( vd ), end( vd ), 0. ); } );
601 always() << " accumulated: " << ds << endmsg;
602 return r;
603 }
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
AttribStringParser::Iterator begin(const AttribStringParser &parser)

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