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

transform a vector of vector of int to a vector of int, where the output vector of in is scattered into the TES More...

Inheritance diagram for Gaudi::TestSuite::IntVectorsToInts:
Collaboration diagram for Gaudi::TestSuite::IntVectorsToInts:

Public Member Functions

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

Public Attributes

Gaudi::Property< std::vector< std::pair< int, int > > > m_mapping { this, "Mapping", {} }

Detailed Description

transform a vector of vector of int to a vector of int, where the output vector of in is scattered into the TES

Definition at line 652 of file MakeAndConsume.cpp.

Constructor & Destructor Documentation

◆ IntVectorsToInts()

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

Definition at line 658 of file MakeAndConsume.cpp.

659 : SplittingMergingTransformer( name, svcLoc, { "InputLocations", {} }, { "OutputLocations", {} } ) {}
details::SplittingMergingTransformer< Signature, Traits_ > SplittingMergingTransformer

Member Function Documentation

◆ operator()()

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

Definition at line 662 of file MakeAndConsume.cpp.

662 {
663 int l = 0;
664 for ( const auto& iv : intVectors ) { info() << "loaded " << iv << " from " << inputLocation( l++ ) << endmsg; }
665 std::vector<int> out( outputLocationSize(), 0 );
666 for ( const auto& [l, r] : m_mapping.value() ) {
667 out[l] = std::accumulate( intVectors.at( r ).begin(), intVectors.at( r ).end(), out[l] );
668 }
669 l = 0;
670 for ( const auto& o : out ) { info() << "storing " << o << " in " << outputLocation( l++ ) << endmsg; }
671 return out;
672 }
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
dict l
Definition gaudirun.py:591
Gaudi::Property< std::vector< std::pair< int, int > > > m_mapping

Member Data Documentation

◆ m_mapping

Gaudi::Property<std::vector<std::pair<int, int> > > Gaudi::TestSuite::IntVectorsToInts::m_mapping { this, "Mapping", {} }

Definition at line 656 of file MakeAndConsume.cpp.

656{ this, "Mapping", {} };

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