The Gaudi Framework  master (e98cfcff)
Loading...
Searching...
No Matches
is2ff_merger_with_scalar Struct Reference
Inheritance diagram for is2ff_merger_with_scalar:
Collaboration diagram for is2ff_merger_with_scalar:

Public Member Functions

 is2ff_merger_with_scalar (std::string const &name, ISvcLocator *pSvcLocator)
 
out_t operator() (ints const &is, int const &scale) const override
 

Detailed Description

Definition at line 80 of file merging_transformer.cpp.

Constructor & Destructor Documentation

◆ is2ff_merger_with_scalar()

is2ff_merger_with_scalar::is2ff_merger_with_scalar ( std::string const & name,
ISvcLocator * pSvcLocator )
inline

Definition at line 81 of file merging_transformer.cpp.

82 : is2ff_merger_scalar_base( name, pSvcLocator,
83 { { "InputInts", { "firstInt", "secondInt" } }, { "Scale", "scale" } },
84 { { "O1", "firstFloat" }, { "O2", "secondFloat" } } ) {}
Gaudi::Functional::MergingMultiTransformer< out_t(ints const &, int const &)> is2ff_merger_scalar_base

Member Function Documentation

◆ operator()()

out_t is2ff_merger_with_scalar::operator() ( ints const & is,
int const & scale ) const
inlineoverride

Definition at line 86 of file merging_transformer.cpp.

86 {
87 float sum = 0, product = 1;
88
89 for ( auto i : is ) {
90 info() << "i: " << i << " ";
91 sum += i;
92 product *= i;
93 }
94 info() << "scale: " << scale << endmsg;
95 return { sum * scale, product * scale };
96 }
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: