The Gaudi Framework  v38r1p1 (ae26267b)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 496 of file MakeAndConsume.cpp.

Constructor & Destructor Documentation

◆ TwoDMerger()

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

Definition at line 502 of file MakeAndConsume.cpp.

503  : MergingMultiTransformer{ name,
504  svcLoc,
505  { KeyValues{ "InputInts", {} }, KeyValues{ "InputDoubles", {} } },
506  { KeyValue{ "OutputInts", "/Event/MySummedInts" },
507  KeyValue{ "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 510 of file MakeAndConsume.cpp.

511  {
513  auto& [is, ds] = r;
514  std::transform( begin( intVectors ), end( intVectors ), std::back_inserter( is ),
515  []( const std::vector<int>& vi ) { return std::accumulate( begin( vi ), end( vi ), 0 ); } );
516  always() << " accumulated: " << is << endmsg;
517  std::transform( begin( doubleVectors ), end( doubleVectors ), std::back_inserter( ds ),
518  []( const std::vector<double>& vd ) { return std::accumulate( begin( vd ), end( vd ), 0. ); } );
519  always() << " accumulated: " << ds << endmsg;
520  return r;
521  }

The documentation for this struct was generated from the following file:
std::vector< int >
std::back_inserter
T back_inserter(T... args)
std::tuple
CLHEP::begin
double * begin(CLHEP::HepVector &v)
Definition: TupleAlg.cpp:45
std::accumulate
T accumulate(T... args)
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
std::transform
T transform(T... args)
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:76
IOTest.end
end
Definition: IOTest.py:123