The Gaudi Framework  v36r4 (0a924e98)
Gaudi::Examples::TwoDMerger Struct Referencefinal

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

Inheritance diagram for Gaudi::Examples::TwoDMerger:
Collaboration diagram for Gaudi::Examples::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 492 of file MakeAndConsume.cpp.

Constructor & Destructor Documentation

◆ TwoDMerger()

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

Definition at line 498 of file MakeAndConsume.cpp.

499  : MergingMultiTransformer{ name,
500  svcLoc,
501  { KeyValues{ "InputInts", {} }, KeyValues{ "InputDoubles", {} } },
502  { KeyValue{ "OutputInts", "/Event/MySummedInts" },
503  KeyValue{ "OutputDoubles", "/Event/MySummedDoubles" } } } {}

Member Function Documentation

◆ operator()()

std::tuple<std::vector<int>, std::vector<double> > Gaudi::Examples::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 506 of file MakeAndConsume.cpp.

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

The documentation for this struct was generated from the following file:
std::vector< int >
std::back_inserter
T back_inserter(T... args)
std::tuple
TimingHistograms.name
name
Definition: TimingHistograms.py:25
HistoDumpEx.r
r
Definition: HistoDumpEx.py:20
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)
IOTest.end
def end
Definition: IOTest.py:128