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