The Gaudi Framework  v36r1 (3e2fb5a8)
MakeAndConsume.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #include "GaudiAlg/Consumer.h"
13 #include "GaudiAlg/Producer.h"
15 #include "GaudiAlg/Transformer.h"
18 #include <cmath>
19 #include <numeric>
20 #include <optional>
21 
22 namespace Gaudi::Examples {
23 
24  // using LegacyBaseClass_t = Gaudi::Functional::Traits::BaseClass_t<::Algorithm>;
26 
27  struct CountingConsumer final : Gaudi::Functional::Consumer<void(), BaseClass_t> {
29  mutable Gaudi::Accumulators::MsgCounter<MSG::ERROR> m_err{this, "This is not an error...", 3};
30  mutable Gaudi::Accumulators::MsgCounter<MSG::WARNING> m_warn{this, "This is not a warning...", 2};
31  mutable Gaudi::Accumulators::MsgCounter<MSG::INFO> m_info{this, "This is not info...", 1};
32 
33  void operator()() const override {
34  always() << "CountingConsumer: incrementing \"This is not an error\" twice" << endmsg;
35  ++m_err;
36  m_err += true;
37  m_err += false; // should do nothing...
38  always() << "CountingConsumer: incrementing \"This is not a warning\" twice" << endmsg;
39  ++m_warn;
40  m_warn += true;
41  m_warn += false; // should do nothing...
42  always() << "CountingConsumer: incrementing \"This is not info\" twice" << endmsg;
43  ++m_info;
44  m_info += true;
45  m_info += false; // should do nothing...
46  }
47  };
48  DECLARE_COMPONENT( CountingConsumer )
49 
50  struct IntDataProducer final : Gaudi::Functional::Producer<int(), BaseClass_t> {
51 
53  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/MyInt" ) ) {}
54 
55  int operator()() const override {
56  info() << "executing IntDataProducer, storing " << m_value.value() << " into " << outputLocation() << endmsg;
57  return m_value;
58  }
59 
60  Gaudi::Property<int> m_value{this, "Value", 7, "The integer value to produce."};
61  };
62 
63  DECLARE_COMPONENT( IntDataProducer )
64 
65  struct VectorDataProducer final : Gaudi::Functional::Producer<std::vector<int>(), BaseClass_t> {
66 
68  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/MyVector" ) ) {}
69 
70  std::vector<int> operator()() const override {
71  info() << "executing VectorDataProducer, storing [3,3,3,3] into " << outputLocation() << endmsg;
72  return {3, 3, 3, 3};
73  }
74  };
75 
76  DECLARE_COMPONENT( VectorDataProducer )
77 
79  struct KeyedDataProducer final : Gaudi::Functional::Producer<int_container(), BaseClass_t> {
80 
82  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/MyKeyed" ) ) {}
83 
84  int_container operator()() const override {
85  int_container container;
86  auto a = new KeyedObject<int>{4};
87  container.add( a );
88  auto b = new KeyedObject<int>{5};
89  container.add( b );
90  info() << "executing KeyedDataProducer, storing [4,5] into " << outputLocation() << endmsg;
91  return container;
92  }
93  };
94 
95  DECLARE_COMPONENT( KeyedDataProducer )
96 
97  struct IntDataConsumer final : Gaudi::Functional::Consumer<void( const int& ), BaseClass_t> {
98 
100  : Consumer( name, svcLoc, KeyValue( "InputLocation", "/Event/MyInt" ) ) {}
101 
102  void operator()( const int& input ) const override {
103  info() << "executing IntDataConsumer, consuming " << input << " from " << inputLocation() << endmsg;
104  }
105  };
106 
107  DECLARE_COMPONENT( IntDataConsumer )
108 
109  struct IntToFloatData final : Gaudi::Functional::Transformer<float( const int& ), BaseClass_t> {
110 
112  : Transformer( name, svcLoc, KeyValue( "InputLocation", "/Event/MyInt" ),
113  KeyValue( "OutputLocation", "/Event/MyFloat" ) ) {}
114 
115  float operator()( const int& input ) const override {
116  info() << "Converting: " << input << " from " << inputLocation() << " and storing it into " << outputLocation()
117  << endmsg;
118  return input;
119  }
120  };
121 
122  DECLARE_COMPONENT( IntToFloatData )
123 
124  struct IntFloatToFloatData final : Gaudi::Functional::Transformer<float( const int&, const float& ), BaseClass_t> {
125 
127  : Transformer( name, svcLoc,
128  {KeyValue( "InputLocation", "/Event/MyInt" ), KeyValue{"OtherInput", "/Event/MyOtherFloat"}},
129  KeyValue( "OutputLocation", "/Event/OtherFloat" ) ) {}
130 
131  float operator()( const int& in1, const float& in2 ) const override {
132  info() << "Converting: " << in1 << " from " << inputLocation<int>() << " and " << in2 << " from "
133  << inputLocation<float>() << " and storing it into " << outputLocation() << endmsg;
134  return in1 + in2;
135  }
136  };
137 
138  DECLARE_COMPONENT( IntFloatToFloatData )
139 
141  : Gaudi::Functional::MultiTransformer<std::tuple<float, float>( const int&, const int& ), BaseClass_t> {
144  name, svcLoc,
145  {KeyValue( "InputLocation1", {"/Event/MyInt"} ), KeyValue( "InputLocation2", {"/Event/MyOtherInt"} )},
146  {KeyValue( "OutputLocation1", {"/Event/MyMultiFloat1"} ),
147  KeyValue( "OutputLocation2", {"/Event/MyMultiFloat2"} )} ) {}
148 
149  std::tuple<float, float> operator()( const int& input1, const int& input2 ) const override {
150  info() << "Number of inputs : " << inputLocationSize() << ", number of outputs : " << outputLocationSize()
151  << endmsg;
152  info() << "Converting " << input1 << " from " << inputLocation<0>() << " and " << input2 << " from "
153  << inputLocation<1>() << endmsg;
154  info() << "Storing results into " << outputLocation<0>() << " and " << outputLocation<1>() << endmsg;
155  return std::tuple<float, float>{input1, input2};
156  }
157  };
158 
159  DECLARE_COMPONENT( IntIntToFloatFloatData )
160 
161 
164  : public Gaudi::Functional::MergingTransformer<
165  std::vector<int>( const Gaudi::Functional::vector_of_const_<std::vector<int>>& ), BaseClass_t> {
166 
168  : MergingTransformer( name, svcLoc, {"InputLocations", {}},
169  {"OutputLocation", "/Event/MyConcatenatedIntVector"} ) {}
170 
172  operator()( const Gaudi::Functional::vector_of_const_<std::vector<int>>& intVectors ) const override {
173  // Create a vector and pre-allocate enough space for the number of integers we have
174  auto nelements = std::accumulate( intVectors.begin(), intVectors.end(), 0,
175  []( const auto a, const auto b ) { return a + b.size(); } );
177  out.reserve( nelements );
178  // Concatenate the input vectors to form the output
179  for ( const auto& intVector : intVectors ) {
180  info() << "Concatening vector " << intVector << endmsg;
181  out.insert( out.end(), intVector.begin(), intVector.end() );
182  }
183  info() << "Storing output vector " << out << " to " << outputLocation() << endmsg;
184  return out;
185  }
186  };
187 
188  DECLARE_COMPONENT( IntVectorsToIntVector )
189 
190  struct FloatDataConsumer final : Gaudi::Functional::Consumer<void( const float& ), BaseClass_t> {
191 
193  : Consumer( name, svcLoc, KeyValue( "InputLocation", "/Event/MyFloat" ) ) {}
194 
195  void operator()( const float& input ) const override {
196  info() << "executing FloatDataConsumer: " << input << endmsg;
197  }
198  };
199 
200  DECLARE_COMPONENT( FloatDataConsumer )
201 
202  struct ContextConsumer final : Gaudi::Functional::Consumer<void( const EventContext& ), BaseClass_t> {
203 
205 
206  void operator()( const EventContext& ctx ) const override {
207  info() << "executing ContextConsumer, got " << ctx << endmsg;
208  }
209  };
210 
211  DECLARE_COMPONENT( ContextConsumer )
212 
213  struct ContextTransformer final : Gaudi::Functional::Transformer<int( const EventContext& ), BaseClass_t> {
214 
216  : Transformer( name, svcLoc, KeyValue{"OutputLoc", "/Event/SomeOtherInt"} ) {}
217 
218  int operator()( const EventContext& ctx ) const override {
219  info() << "executing ContextConsumer, got " << ctx << endmsg;
220  return 9;
221  }
222  };
223 
224  DECLARE_COMPONENT( ContextTransformer )
225 
226  struct ContextIntConsumer final : Gaudi::Functional::Consumer<void( const EventContext&, const int& ), BaseClass_t> {
227 
229  : Consumer( name, svcLoc, KeyValue( "InputLocation", "/Event/MyInt" ) ) {}
230 
231  void operator()( const EventContext& ctx, const int& i ) const override {
232  info() << "executing ContextIntConsumer, got context = " << ctx << ", int = " << i << endmsg;
233  }
234  };
235 
236  DECLARE_COMPONENT( ContextIntConsumer )
237 
238  struct VectorDoubleProducer final : Gaudi::Functional::Producer<std::vector<double>(), BaseClass_t> {
239 
241  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/MyVectorOfDoubles" ) ) {}
242 
243  std::vector<double> operator()() const override {
244  info() << "storing vector<double> into " << outputLocation() << endmsg;
245  return {12.34, 56.78, 90.12, 34.56, 78.90};
246  }
247  };
248 
249  DECLARE_COMPONENT( VectorDoubleProducer )
250 
251  struct FrExpTransformer final
252  : Gaudi::Functional::MultiScalarTransformer<
253  FrExpTransformer, std::tuple<std::vector<double>, std::vector<int>>( const std::vector<double>& ),
254  BaseClass_t> {
256  : MultiScalarTransformer( name, svcLoc, KeyValue{"InputDoubles", {"/Event/MyVectorOfDoubles"}},
257  {KeyValue{"OutputFractions", {"/Event/MyVectorOfFractions"}},
258  KeyValue{"OutputIntegers", {"/Event/MyVectorOfIntegers"}}} ) {}
259 
260  using MultiScalarTransformer::operator();
261 
262  std::tuple<double, int> operator()( const double& d ) const {
263  int i;
264  double frac = std::frexp( d, &i );
265  info() << "Converting " << d << " -> " << frac << ", " << i << endmsg;
266  return {frac, i};
267  }
268  };
269  DECLARE_COMPONENT( FrExpTransformer )
270 
271  struct OptFrExpTransformer final
272  : Gaudi::Functional::MultiScalarTransformer<
273  OptFrExpTransformer, std::tuple<std::vector<double>, std::vector<int>>( const std::vector<double>& ),
274  BaseClass_t> {
276  : MultiScalarTransformer( name, svcLoc, KeyValue{"InputDoubles", {"/Event/MyVectorOfDoubles"}},
277  {KeyValue{"OutputFractions", {"/Event/OptMyVectorOfFractions"}},
278  KeyValue{"OutputIntegers", {"/Event/OptMyVectorOfIntegers"}}} ) {}
279 
280  using MultiScalarTransformer::operator();
281 
282  std::optional<std::tuple<double, int>> operator()( const double& d ) const {
283  if ( d < 30. ) {
284  info() << "Skipping " << d << endmsg;
285  return {};
286  }
287  int i;
288  double frac = std::frexp( d, &i );
289  info() << "Converting " << d << " -> " << frac << ", " << i << endmsg;
290  return std::make_tuple( frac, i );
291  }
292  };
293  DECLARE_COMPONENT( OptFrExpTransformer )
294 
295  struct LdExpTransformer final
296  : Gaudi::Functional::ScalarTransformer<
297  LdExpTransformer, std::vector<double>( const std::vector<double>&, const std::vector<int>& ), BaseClass_t> {
299  : ScalarTransformer( name, svcLoc,
300  {KeyValue{"InputFractions", {"/Event/MyVectorOfFractions"}},
301  KeyValue{"InputIntegers", {"/Event/MyVectorOfIntegers"}}},
302  {KeyValue{"OutputDoubles", {"/Event/MyNewVectorOfDoubles"}}} ) {}
303 
304  using ScalarTransformer::operator();
305 
306  double operator()( double frac, int i ) const {
307  double d = std::ldexp( frac, i );
308  info() << "Converting " << i << ", " << frac << " -> " << d << endmsg;
309  return d;
310  }
311  };
312  DECLARE_COMPONENT( LdExpTransformer )
313 
314  struct OptLdExpTransformer final
315  : Gaudi::Functional::ScalarTransformer<OptLdExpTransformer,
316  std::vector<double>( const std::vector<double>&, const std::vector<int>& ),
317  BaseClass_t> {
319  : ScalarTransformer( name, svcLoc,
320  {KeyValue{"InputFractions", {"/Event/MyVectorOfFractions"}},
321  KeyValue{"InputIntegers", {"/Event/MyVectorOfIntegers"}}},
322  {KeyValue{"OutputDoubles", {"/Event/MyOptVectorOfDoubles"}}} ) {}
323 
324  using ScalarTransformer::operator();
325 
326  std::optional<double> operator()( const double& frac, const int& i ) const {
327  double d = std::ldexp( frac, i );
328  if ( i > 6 ) {
329  info() << "Skipping " << d << endmsg;
330  return {};
331  }
332  info() << "Converting " << i << ", " << frac << " -> " << d << endmsg;
333  return d;
334  }
335  };
336  DECLARE_COMPONENT( OptLdExpTransformer )
337 
338  struct VoidConsumer final : Gaudi::Functional::Consumer<void(), BaseClass_t> {
339 
340  using Consumer::Consumer;
341 
342  void operator()() const override { info() << "executing VoidConsumer" << endmsg; }
343  };
344 
345  DECLARE_COMPONENT( VoidConsumer )
346 
347  struct S : public KeyedObject<int> {
349  int a;
353  };
354 
355  struct SDataProducer final : Gaudi::Functional::Producer<S::Container(), BaseClass_t> {
356 
358  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/MyS" ) ) {}
359 
360  S::Container operator()() const override {
361  S::Container out{};
362  for ( int i = 0; i < j; ++i ) out.insert( new S{} );
363  info() << "storing KeyedContainer of size " << out.size() << " into " << outputLocation() << endmsg;
364  return out;
365  }
366  Gaudi::Property<int> j{this, "j", 5};
367  };
368 
369  DECLARE_COMPONENT( SDataProducer )
370 
371  struct SRangesToIntVector final
372  : public Gaudi::Functional::MergingTransformer<
373  std::vector<int>( const Gaudi::Functional::vector_of_const_<Gaudi::Range_<std::vector<S const*>>>& ),
374  BaseClass_t> {
375 
377  : MergingTransformer( name, svcLoc, {"InputRanges", {}},
378  {"OutputLocation", "/Event/MyConcatenatedIntFromSVector"} ) {}
379 
381  const Gaudi::Functional::vector_of_const_<Gaudi::Range_<std::vector<S const*>>>& SVectors ) const override {
383  // Concatenate the input vectors to form the output
384  for ( const auto& SVector : SVectors ) {
385  info() << "Concatening range of size " << SVector.size() << endmsg;
386  for ( auto* s : SVector ) { out.push_back( s->a ); }
387  }
388  info() << "Storing output vector " << out << " to " << outputLocation() << endmsg;
389  return out;
390  }
391  };
392  DECLARE_COMPONENT( SRangesToIntVector )
393 
394  struct IntVectorsMerger final
395  : public Gaudi::Functional::MergingTransformer<
396  void( const Gaudi::Functional::vector_of_const_<std::vector<int>>& ), BaseClass_t> {
397 
399  : MergingTransformer( name, svcLoc, {"InputLocations", {}} ) {}
400 
401  void operator()( const Gaudi::Functional::vector_of_const_<std::vector<int>>& intVectors ) const override {
402  // Create a vector and pre-allocate enough space for the number of integers we have
403  auto nelements = std::accumulate( intVectors.begin(), intVectors.end(), 0,
404  []( const auto a, const auto b ) { return a + b.size(); } );
405  info() << "sum of input sizes: " << nelements << endmsg;
406  // Concatenate the input vectors to form the output
407  for ( const auto& intVector : intVectors ) { info() << "Consuming vector " << intVector << endmsg; }
408  }
409  };
410 
411  DECLARE_COMPONENT( IntVectorsMerger )
412 
414  : public Gaudi::Functional::MergingConsumer<void( Gaudi::Functional::vector_of_const_<std::vector<int>> const& ),
415  BaseClass_t> {
416  using Base =
418  BaseClass_t>;
419 
421  : Base( name, svcLoc, {"InputLocations", {}} ) {}
422 
423  void operator()( Gaudi::Functional::vector_of_const_<std::vector<int>> const& intVectors ) const override {
424  // Create a vector and pre-allocate enough space for the number of integers we have
425  auto nelements = std::accumulate( intVectors.begin(), intVectors.end(), 0,
426  []( const auto a, const auto b ) { return a + b.size(); } );
427  info() << "sum of input sizes: " << nelements << endmsg;
428  // Concatenate the input vectors to form the output
429  for ( const auto& intVector : intVectors ) { info() << "Consuming vector " << intVector << endmsg; }
430  }
431  };
432 
433  DECLARE_COMPONENT( IntVectorsMergingConsumer )
434 
435 } // namespace Gaudi::Examples
Gaudi::Examples::SRangesToIntVector::operator()
std::vector< int > operator()(const Gaudi::Functional::vector_of_const_< Gaudi::Range_< std::vector< S const * >>> &SVectors) const override
Definition: MakeAndConsume.cpp:380
Gaudi::Examples::IntVectorsMerger::operator()
void operator()(const Gaudi::Functional::vector_of_const_< std::vector< int >> &intVectors) const override
Definition: MakeAndConsume.cpp:401
Gaudi::Examples::SRangesToIntVector::SRangesToIntVector
SRangesToIntVector(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:376
Gaudi::Examples::OptLdExpTransformer::OptLdExpTransformer
OptLdExpTransformer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:318
Gaudi::Examples::ContextTransformer::operator()
int operator()(const EventContext &ctx) const override
Definition: MakeAndConsume.cpp:218
Gaudi::Examples::IntVectorsMergingConsumer::IntVectorsMergingConsumer
IntVectorsMergingConsumer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:420
std::make_tuple
T make_tuple(T... args)
Gaudi::Functional::MergingTransformer
details::MergingTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MergingTransformer
Definition: MergingTransformer.h:199
Gaudi::Examples::LdExpTransformer
Definition: MakeAndConsume.cpp:297
Gaudi::Functional::Consumer
details::Consumer< Signature, Traits_, details::isLegacy< Traits_ > > Consumer
Definition: Consumer.h:69
Gaudi::Examples::IntIntToFloatFloatData
Definition: MakeAndConsume.cpp:141
std::string
STL class.
Gaudi::Examples::VoidConsumer
Definition: MakeAndConsume.cpp:338
Gaudi::Examples::OptFrExpTransformer::operator()
std::optional< std::tuple< double, int > > operator()(const double &d) const
Definition: MakeAndConsume.cpp:282
Gaudi::Examples::IntVectorsToIntVector::operator()
std::vector< int > operator()(const Gaudi::Functional::vector_of_const_< std::vector< int >> &intVectors) const override
Definition: MakeAndConsume.cpp:172
Gaudi::Examples::IntFloatToFloatData::IntFloatToFloatData
IntFloatToFloatData(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:126
Gaudi::Examples::IntVectorsToIntVector::IntVectorsToIntVector
IntVectorsToIntVector(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:167
KeyedObject::KeyedObject
KeyedObject()=default
Standard Constructor. The object key is preset to the invalid value.
Gaudi::Examples::IntDataProducer
Definition: MakeAndConsume.cpp:50
Gaudi::Examples::CountingConsumer
Definition: MakeAndConsume.cpp:27
Gaudi::Examples::LdExpTransformer::operator()
double operator()(double frac, int i) const
Definition: MakeAndConsume.cpp:306
gaudirun.s
string s
Definition: gaudirun.py:328
Gaudi::Examples::SDataProducer::j
Gaudi::Property< int > j
Definition: MakeAndConsume.cpp:366
std::vector< int >
ISvcLocator
Definition: ISvcLocator.h:46
Gaudi::Examples::OptFrExpTransformer
Definition: MakeAndConsume.cpp:274
Gaudi::Examples::CountingConsumer::m_info
Gaudi::Accumulators::MsgCounter< MSG::INFO > m_info
Definition: MakeAndConsume.cpp:31
Gaudi::Examples::LdExpTransformer::LdExpTransformer
LdExpTransformer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:298
Gaudi::Examples::SDataProducer::operator()
S::Container operator()() const override
Definition: MakeAndConsume.cpp:360
Gaudi::Examples::IntVectorsMerger
Definition: MakeAndConsume.cpp:396
std::tuple
Containers
Containers namespace.
Definition: KeyedObjectManager.h:28
Gaudi::Functional::details::vector_of_const_
Definition: FunctionalDetails.h:267
Gaudi::Examples::VectorDataProducer::VectorDataProducer
VectorDataProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:67
KeyedContainer.h
Gaudi::Functional::MergingConsumer
details::MergingTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MergingConsumer
Definition: MergingTransformer.h:204
Gaudi::Functional::details::Consumer
Definition: Consumer.h:24
Gaudi::Examples::FloatDataConsumer::FloatDataConsumer
FloatDataConsumer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:192
Gaudi::Examples::ContextTransformer
Definition: MakeAndConsume.cpp:213
Gaudi::Examples::SDataProducer::SDataProducer
SDataProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:357
Gaudi::Examples::VoidConsumer::operator()
void operator()() const override
Definition: MakeAndConsume.cpp:342
Gaudi::Examples::IntDataConsumer::IntDataConsumer
IntDataConsumer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:99
std::frexp
T frexp(T... args)
Gaudi::Examples::ContextIntConsumer
Definition: MakeAndConsume.cpp:226
KeyedContainer::add
long add(ContainedObject *pObject) override
ObjectContainerBase overload: Add an object to the container.
Definition: KeyedContainer.h:599
ScalarTransformer.h
Gaudi::Examples::FrExpTransformer::FrExpTransformer
FrExpTransformer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:255
Gaudi::Examples::OptLdExpTransformer
Definition: MakeAndConsume.cpp:317
Gaudi::Examples::VectorDoubleProducer::operator()
std::vector< double > operator()() const override
Definition: MakeAndConsume.cpp:243
Gaudi::Examples::SRangesToIntVector
Definition: MakeAndConsume.cpp:374
TimingHistograms.name
name
Definition: TimingHistograms.py:23
GaudiPython.Pythonizations.ctx
ctx
Definition: Pythonizations.py:566
Gaudi::Examples
Definition: ConditionAccessorHolder.h:21
Gaudi::Functional::details::MergingTransformer
Definition: MergingTransformer.h:37
Consumer.h
Gaudi::Functional::Producer
details::Producer< Signature, Traits_, details::isLegacy< Traits_ > > Producer
Definition: Producer.h:37
Gaudi::Examples::ContextConsumer::operator()
void operator()(const EventContext &ctx) const override
Definition: MakeAndConsume.cpp:206
Gaudi::Examples::CountingConsumer::operator()
void operator()() const override
Definition: MakeAndConsume.cpp:33
Gaudi::Examples::KeyedDataProducer::KeyedDataProducer
KeyedDataProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:81
Gaudi::Examples::IntIntToFloatFloatData::operator()
std::tuple< float, float > operator()(const int &input1, const int &input2) const override
Definition: MakeAndConsume.cpp:149
Gaudi::Examples::KeyedDataProducer
Definition: MakeAndConsume.cpp:79
Gaudi::Examples::VectorDataProducer::operator()
std::vector< int > operator()() const override
Definition: MakeAndConsume.cpp:70
Producer.h
Gaudi::Examples::ContextIntConsumer::ContextIntConsumer
ContextIntConsumer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:228
Gaudi::Examples::S::a
int a
Definition: MakeAndConsume.cpp:349
Gaudi::Examples::IntToFloatData::operator()
float operator()(const int &input) const override
Definition: MakeAndConsume.cpp:115
Gaudi::Examples::FloatDataConsumer::operator()
void operator()(const float &input) const override
Definition: MakeAndConsume.cpp:195
SharedObjectsContainer
Definition: SharedObjectsContainer.h:39
Gaudi::Examples::ContextIntConsumer::operator()
void operator()(const EventContext &ctx, const int &i) const override
Definition: MakeAndConsume.cpp:231
Gaudi::Examples::ContextTransformer::ContextTransformer
ContextTransformer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:215
Gaudi::Examples::ContextConsumer
Definition: MakeAndConsume.cpp:202
KeyedContainer
template class KeyedContainer, KeyedContainer.h
Definition: KeyedContainer.h:74
std::accumulate
T accumulate(T... args)
Gaudi::Examples::FrExpTransformer::operator()
std::tuple< double, int > operator()(const double &d) const
Definition: MakeAndConsume.cpp:262
Transformer.h
Gaudi::Examples::S
Definition: MakeAndConsume.cpp:347
Gaudi::Functional::details::Producer
Definition: Producer.h:22
KeyedObject
Definition of the templated KeyedObject class.
Definition: KeyedObject.h:39
Gaudi::Examples::VectorDataProducer
Definition: MakeAndConsume.cpp:65
Gaudi::Examples::OptFrExpTransformer::OptFrExpTransformer
OptFrExpTransformer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:275
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
Gaudi::Accumulators::MsgCounter< MSG::ERROR >
Gaudi::Examples::IntVectorsMergingConsumer::operator()
void operator()(Gaudi::Functional::vector_of_const_< std::vector< int >> const &intVectors) const override
Definition: MakeAndConsume.cpp:423
Gaudi::Examples::VectorDoubleProducer
Definition: MakeAndConsume.cpp:238
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
SharedObjectsContainer.h
Gaudi::Examples::IntToFloatData::IntToFloatData
IntToFloatData(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:111
Gaudi ::Functional::MultiTransformer
details::MultiTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MultiTransformer
Definition: Transformer.h:241
Gaudi::Range_
Definition: Range.h:95
Containers::vector
struct GAUDI_API vector
Parametrisation class for vector-like implementation.
Definition: KeyedObjectManager.h:39
Gaudi::Examples::IntVectorsMergingConsumer
Definition: MakeAndConsume.cpp:415
Gaudi::Examples::FloatDataConsumer
Definition: MakeAndConsume.cpp:190
Gaudi::Examples::CountingConsumer::m_err
Gaudi::Accumulators::MsgCounter< MSG::ERROR > m_err
Definition: MakeAndConsume.cpp:29
Gaudi::Examples::CountingConsumer::m_warn
Gaudi::Accumulators::MsgCounter< MSG::WARNING > m_warn
Definition: MakeAndConsume.cpp:30
Gaudi::Examples::IntFloatToFloatData
Definition: MakeAndConsume.cpp:124
Gaudi::Examples::IntDataProducer::IntDataProducer
IntDataProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:52
MergingTransformer.h
std
STL namespace.
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginServiceV1.h:46
EventContext
Definition: EventContext.h:34
Gaudi::Functional::Traits::BaseClass_t
Definition: FunctionalUtilities.h:72
Gaudi::Examples::IntToFloatData
Definition: MakeAndConsume.cpp:109
Gaudi::Examples::SDataProducer
Definition: MakeAndConsume.cpp:355
Gaudi::Examples::IntVectorsToIntVector
Concatenates a list of input vectors into a single output vector.
Definition: MakeAndConsume.cpp:165
Gaudi ::Functional::Transformer
details::Transformer< Signature, Traits_, details::isLegacy< Traits_ > > Transformer
Definition: Transformer.h:238
Gaudi::Examples::IntDataConsumer
Definition: MakeAndConsume.cpp:97
Gaudi::Examples::IntVectorsMerger::IntVectorsMerger
IntVectorsMerger(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:398
std::ldexp
T ldexp(T... args)
Containers::HashMap
KeyedObjectManager< hashmap > HashMap
Forward declaration of specialized std::hashmap-like object manager.
Definition: KeyedObjectManager.h:107
Gaudi::Examples::IntDataProducer::operator()
int operator()() const override
Definition: MakeAndConsume.cpp:55
Gaudi::Examples::IntFloatToFloatData::operator()
float operator()(const int &in1, const float &in2) const override
Definition: MakeAndConsume.cpp:131
Gaudi::Examples::VectorDoubleProducer::VectorDoubleProducer
VectorDoubleProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:240
Gaudi::Examples::FrExpTransformer
Definition: MakeAndConsume.cpp:254
Gaudi::Examples::IntDataConsumer::operator()
void operator()(const int &input) const override
Definition: MakeAndConsume.cpp:102
Gaudi::Examples::IntIntToFloatFloatData::IntIntToFloatFloatData
IntIntToFloatFloatData(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:142
Gaudi::Property< int >
PrepareBase.out
out
Definition: PrepareBase.py:20
Gaudi::Examples::OptLdExpTransformer::operator()
std::optional< double > operator()(const double &frac, const int &i) const
Definition: MakeAndConsume.cpp:326
Gaudi::Examples::KeyedDataProducer::operator()
int_container operator()() const override
Definition: MakeAndConsume.cpp:84