The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
is2ff_merger_filter_with_scalar Struct Reference
Inheritance diagram for is2ff_merger_filter_with_scalar:
Collaboration diagram for is2ff_merger_filter_with_scalar:

Public Member Functions

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

Detailed Description

Definition at line 123 of file merging_transformer.cpp.

Constructor & Destructor Documentation

◆ is2ff_merger_filter_with_scalar()

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

Definition at line 124 of file merging_transformer.cpp.

125 : is2ff_merger_filter_scalar_base( name, pSvcLocator,
126 { { "InputInts", { "firstInt", "secondInt" } }, { "Scale", "scale" } },
127 { { "O1", "firstFloat" }, { "O2", "secondFloat" } } ) {}
Gaudi::Functional::MergingMultiTransformerFilter< out_t(ints const &, int const &)> is2ff_merger_filter_scalar_base

Member Function Documentation

◆ operator()()

filter_out_t is2ff_merger_filter_with_scalar::operator() ( ints const & is,
int const & scale ) const
inlineoverride

Definition at line 129 of file merging_transformer.cpp.

129 {
130 float product = 1, inverse = 1;
131
132 for ( auto i : is ) {
133 info() << "i: " << i << " ";
134 product *= i;
135 inverse *= 1.f / i;
136 }
137 info() << "scale: " << scale << endmsg;
138 product *= scale;
139 inverse *= scale;
140 auto filter_passed = product > 10;
141 info() << "Filter " << ( filter_passed ? "passed" : "failed" ) << endmsg;
142 return { filter_passed, product, inverse };
143 }
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: