Go to the documentation of this file.
33 always() <<
"CountingConsumer: incrementing \"This is not an error\" twice" <<
endmsg;
37 always() <<
"CountingConsumer: incrementing \"This is not a warning\" twice" <<
endmsg;
41 always() <<
"CountingConsumer: incrementing \"This is not info\" twice" <<
endmsg;
52 :
Producer(
name, svcLoc, KeyValue(
"OutputLocation",
"/Event/MyInt" ) ) {}
55 info() <<
"executing IntDataProducer, storing " << m_value.value() <<
" into " << outputLocation() <<
endmsg;
67 :
Producer(
name, svcLoc, KeyValue(
"OutputLocation",
"/Event/MyVector" ) ) {}
70 info() <<
"executing VectorDataProducer, storing [3,3,3,3] into " << outputLocation() <<
endmsg;
81 :
Producer(
name, svcLoc, KeyValue(
"OutputLocation",
"/Event/MyKeyed" ) ) {}
89 info() <<
"executing KeyedDataProducer, storing [4,5] into " << outputLocation() <<
endmsg;
99 :
Consumer(
name, svcLoc, KeyValue(
"InputLocation",
"/Event/MyInt" ) ) {}
102 info() <<
"executing IntDataConsumer, consuming " << input <<
" from " << inputLocation() <<
endmsg;
111 :
Transformer(
name, svcLoc, KeyValue(
"InputLocation",
"/Event/MyInt" ),
112 KeyValue(
"OutputLocation",
"/Event/MyFloat" ) ) {}
115 info() <<
"Converting: " << input <<
" from " << inputLocation() <<
" and storing it into " << outputLocation()
127 {KeyValue(
"InputLocation",
"/Event/MyInt" ), KeyValue{
"OtherInput",
"/Event/MyOtherFloat"}},
128 KeyValue(
"OutputLocation",
"/Event/OtherFloat" ) ) {}
130 float operator()(
const int& in1,
const float& in2 )
const override {
131 info() <<
"Converting: " << in1 <<
" from " << inputLocation<int>() <<
" and " << in2 <<
" from "
132 << inputLocation<float>() <<
" and storing it into " << outputLocation() <<
endmsg;
144 {KeyValue(
"InputLocation1", {
"/Event/MyInt"} ), KeyValue(
"InputLocation2", {
"/Event/MyOtherInt"} )},
145 {KeyValue(
"OutputLocation1", {
"/Event/MyMultiFloat1"} ),
146 KeyValue(
"OutputLocation2", {
"/Event/MyMultiFloat2"} )} ) {}
149 info() <<
"Number of inputs : " << inputLocationSize() <<
", number of outputs : " << outputLocationSize()
151 info() <<
"Converting " << input1 <<
" from " << inputLocation<0>() <<
" and " << input2 <<
" from "
152 << inputLocation<1>() <<
endmsg;
153 info() <<
"Storing results into " << outputLocation<0>() <<
" and " << outputLocation<1>() <<
endmsg;
168 {
"OutputLocation",
"/Event/MyConcatenatedIntVector"} ) {}
173 auto nelements =
std::accumulate( intVectors.begin(), intVectors.end(), 0,
174 [](
const auto a,
const auto b ) { return a + b.size(); } );
176 out.reserve( nelements );
178 for (
const auto& intVector : intVectors ) {
179 info() <<
"Concatening vector " << intVector <<
endmsg;
180 out.insert(
out.end(), intVector.begin(), intVector.end() );
182 info() <<
"Storing output vector " <<
out <<
" to " << outputLocation() <<
endmsg;
192 :
Consumer(
name, svcLoc, KeyValue(
"InputLocation",
"/Event/MyFloat" ) ) {}
195 info() <<
"executing FloatDataConsumer: " << input <<
endmsg;
206 info() <<
"executing ContextConsumer, got " <<
ctx <<
endmsg;
215 :
Transformer(
name, svcLoc, KeyValue{
"OutputLoc",
"/Event/SomeOtherInt"} ) {}
218 info() <<
"executing ContextConsumer, got " <<
ctx <<
endmsg;
228 :
Consumer(
name, svcLoc, KeyValue(
"InputLocation",
"/Event/MyInt" ) ) {}
231 info() <<
"executing ContextIntConsumer, got context = " <<
ctx <<
", int = " << i <<
endmsg;
240 :
Producer(
name, svcLoc, KeyValue(
"OutputLocation",
"/Event/MyVectorOfDoubles" ) ) {}
243 info() <<
"storing vector<double> into " << outputLocation() <<
endmsg;
244 return {12.34, 56.78, 90.12, 34.56, 78.90};
251 :
Gaudi::Functional::MultiScalarTransformer<
255 : MultiScalarTransformer(
name, svcLoc, KeyValue{
"InputDoubles", {
"/Event/MyVectorOfDoubles"}},
256 {KeyValue{
"OutputFractions", {
"/Event/MyVectorOfFractions"}},
257 KeyValue{
"OutputIntegers", {
"/Event/MyVectorOfIntegers"}}} ) {}
259 using MultiScalarTransformer::operator();
264 info() <<
"Converting " << d <<
" -> " << frac <<
", " << i <<
endmsg;
271 :
Gaudi::Functional::MultiScalarTransformer<
275 : MultiScalarTransformer(
name, svcLoc, KeyValue{
"InputDoubles", {
"/Event/MyVectorOfDoubles"}},
276 {KeyValue{
"OutputFractions", {
"/Event/OptMyVectorOfFractions"}},
277 KeyValue{
"OutputIntegers", {
"/Event/OptMyVectorOfIntegers"}}} ) {}
279 using MultiScalarTransformer::operator();
281 boost::optional<std::tuple<double, int>>
operator()(
const double& d )
const {
283 info() <<
"Skipping " << d <<
endmsg;
288 info() <<
"Converting " << d <<
" -> " << frac <<
", " << i <<
endmsg;
295 :
Gaudi::Functional::ScalarTransformer<
298 : ScalarTransformer(
name, svcLoc,
299 {KeyValue{
"InputFractions", {
"/Event/MyVectorOfFractions"}},
300 KeyValue{
"InputIntegers", {
"/Event/MyVectorOfIntegers"}}},
301 {KeyValue{
"OutputDoubles", {
"/Event/MyNewVectorOfDoubles"}}} ) {}
303 using ScalarTransformer::operator();
307 info() <<
"Converting " << i <<
", " << frac <<
" -> " << d <<
endmsg;
318 : ScalarTransformer(
name, svcLoc,
319 {KeyValue{
"InputFractions", {
"/Event/MyVectorOfFractions"}},
320 KeyValue{
"InputIntegers", {
"/Event/MyVectorOfIntegers"}}},
321 {KeyValue{
"OutputDoubles", {
"/Event/MyOptVectorOfDoubles"}}} ) {}
323 using ScalarTransformer::operator();
325 boost::optional<double>
operator()(
const double& frac,
const int& i )
const {
328 info() <<
"Skipping " << d <<
endmsg;
331 info() <<
"Converting " << i <<
", " << frac <<
" -> " << d <<
endmsg;
357 :
Producer(
name, svcLoc, KeyValue(
"OutputLocation",
"/Event/MyS" ) ) {}
361 for (
int i = 0; i <
j; ++i )
out.insert(
new S{} );
362 info() <<
"storing KeyedContainer of size " <<
out.size() <<
" into " << outputLocation() <<
endmsg;
377 {
"OutputLocation",
"/Event/MyConcatenatedIntFromSVector"} ) {}
383 for (
const auto& SVector : SVectors ) {
384 info() <<
"Concatening range of size " << SVector.size() <<
endmsg;
385 for (
auto*
s : SVector ) {
out.push_back(
s->a ); }
387 info() <<
"Storing output vector " <<
out <<
" to " << outputLocation() <<
endmsg;
402 auto nelements =
std::accumulate( intVectors.begin(), intVectors.end(), 0,
403 [](
const auto a,
const auto b ) { return a + b.size(); } );
404 info() <<
"sum of input sizes: " << nelements <<
endmsg;
406 for (
const auto& intVector : intVectors ) { info() <<
"Consuming vector " << intVector <<
endmsg; }
420 :
Base(
name, svcLoc, {
"InputLocations", {}} ) {}
424 auto nelements =
std::accumulate( intVectors.begin(), intVectors.end(), 0,
425 [](
const auto a,
const auto b ) { return a + b.size(); } );
426 info() <<
"sum of input sizes: " << nelements <<
endmsg;
428 for (
const auto& intVector : intVectors ) { info() <<
"Consuming vector " << intVector <<
endmsg; }
std::vector< int > operator()(const Gaudi::Functional::vector_of_const_< Gaudi::Range_< std::vector< S const * >>> &SVectors) const override
void operator()(const Gaudi::Functional::vector_of_const_< std::vector< int >> &intVectors) const override
SRangesToIntVector(const std::string &name, ISvcLocator *svcLoc)
int operator()(const EventContext &ctx) const override
IntVectorsMergingConsumer(const std::string &name, ISvcLocator *svcLoc)
details::MergingTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MergingTransformer
details::Consumer< Signature, Traits_, details::isLegacy< Traits_ > > Consumer
std::vector< int > operator()(const Gaudi::Functional::vector_of_const_< std::vector< int >> &intVectors) const override
IntFloatToFloatData(const std::string &name, ISvcLocator *svcLoc)
IntVectorsToIntVector(const std::string &name, ISvcLocator *svcLoc)
KeyedObject()=default
Standard Constructor. The object key is preset to the invalid value.
Gaudi::Accumulators::MsgCounter< MSG::INFO > m_info
S::Container operator()() const override
VectorDataProducer(const std::string &name, ISvcLocator *svcLoc)
details::MergingTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MergingConsumer
FloatDataConsumer(const std::string &name, ISvcLocator *svcLoc)
SDataProducer(const std::string &name, ISvcLocator *svcLoc)
void operator()() const override
IntDataConsumer(const std::string &name, ISvcLocator *svcLoc)
long add(ContainedObject *pObject) override
ObjectContainerBase overload: Add an object to the container.
std::vector< double > operator()() const override
details::Producer< Signature, Traits_, details::isLegacy< Traits_ > > Producer
void operator()(const EventContext &ctx) const override
void operator()() const override
KeyedDataProducer(const std::string &name, ISvcLocator *svcLoc)
std::tuple< float, float > operator()(const int &input1, const int &input2) const override
std::vector< int > operator()() const override
ContextIntConsumer(const std::string &name, ISvcLocator *svcLoc)
float operator()(const int &input) const override
void operator()(const float &input) const override
void operator()(const EventContext &ctx, const int &i) const override
ContextTransformer(const std::string &name, ISvcLocator *svcLoc)
template class KeyedContainer, KeyedContainer.h
Definition of the templated KeyedObject class.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
void operator()(Gaudi::Functional::vector_of_const_< std::vector< int >> const &intVectors) const override
Header file for std:chrono::duration-based Counters.
IntToFloatData(const std::string &name, ISvcLocator *svcLoc)
details::MultiTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MultiTransformer
struct GAUDI_API vector
Parametrisation class for vector-like implementation.
Gaudi::Accumulators::MsgCounter< MSG::ERROR > m_err
Gaudi::Accumulators::MsgCounter< MSG::WARNING > m_warn
IntDataProducer(const std::string &name, ISvcLocator *svcLoc)
#define DECLARE_COMPONENT(type)
Concatenates a list of input vectors into a single output vector.
details::Transformer< Signature, Traits_, details::isLegacy< Traits_ > > Transformer
IntVectorsMerger(const std::string &name, ISvcLocator *svcLoc)
KeyedObjectManager< hashmap > HashMap
Forward declaration of specialized std::hashmap-like object manager.
int operator()() const override
float operator()(const int &in1, const float &in2) const override
VectorDoubleProducer(const std::string &name, ISvcLocator *svcLoc)
void operator()(const int &input) const override
IntIntToFloatFloatData(const std::string &name, ISvcLocator *svcLoc)
int_container operator()() const override