Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (d98a2936)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MakeAndConsume.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 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 <Gaudi/Accumulators.h>
19 #include <GaudiKernel/AlgTool.h>
20 #include <GaudiKernel/IAlgTool.h>
21 #include <GaudiKernel/IBinder.h>
24 #include <cmath>
25 #include <numeric>
26 #include <optional>
27 
28 namespace Gaudi::TestSuite {
29 
30  struct IMyTool : extend_interfaces<IAlgTool> {
32  virtual void operator()() const = 0;
33  };
34 
35  struct MyExampleTool : extends<AlgTool, IMyTool> {
36  using extends::extends;
37  void operator()() const override { always() << m_message.value() << endmsg; }
38  Gaudi::Property<std::string> m_message{ this, "Message", "Boring Default Message" };
39  };
40  DECLARE_COMPONENT( MyExampleTool )
41 
42  struct MyConsumerTool final : Gaudi::Functional::ToolBinder<Gaudi::Interface::Bind::Box<IMyTool>( const int& )> {
43  MyConsumerTool( std::string type, std::string name, const IInterface* parent )
44  : ToolBinder{ std::move( type ), std::move( name ), parent, KeyValue{ "MyInt", "/Event/MyInt" },
45  construct<BoundInstance>( this ) } {}
46 
47  class BoundInstance final : public Gaudi::Interface::Bind::Stub<IMyTool> {
49  int i;
50 
51  public:
52  BoundInstance( MyConsumerTool const* parent, const int& i ) : parent{ parent }, i{ i } {}
53  void operator()() const override {
54  parent->always() << "BoundInstance - got: " << i << " from " << parent->inputLocation<int>() << endmsg;
55  }
56  };
57  };
58  DECLARE_COMPONENT( MyConsumerTool )
59 
60  using BaseClass_t = Gaudi::Functional::Traits::BaseClass_t<Gaudi::Algorithm>;
61 
62  struct ToolConsumer final : Gaudi::Functional::Consumer<void( IMyTool const& ), BaseClass_t> {
63  ToolConsumer( const std::string& name, ISvcLocator* svcLoc )
64  : Consumer( name, svcLoc, KeyValue{ "MyTool", "MyExampleTool" } ) {}
65 
66  void operator()( IMyTool const& tool ) const override { tool(); }
67  };
68  DECLARE_COMPONENT( ToolConsumer )
69 
70  struct CountingConsumer final : Gaudi::Functional::Consumer<void(), BaseClass_t> {
72  mutable Gaudi::Accumulators::MsgCounter<MSG::ERROR> m_err{ this, "This is not an error...", 3 };
73  mutable Gaudi::Accumulators::MsgCounter<MSG::WARNING> m_warn{ this, "This is not a warning...", 2 };
74  mutable Gaudi::Accumulators::MsgCounter<MSG::INFO> m_info{ this, "This is not info...", 1 };
75 
76  void operator()() const override {
77  always() << "CountingConsumer: incrementing \"This is not an error\" twice" << endmsg;
78  ++m_err;
79  m_err += true;
80  m_err += false; // should do nothing...
81  always() << "CountingConsumer: incrementing \"This is not a warning\" twice" << endmsg;
82  ++m_warn;
83  m_warn += true;
84  m_warn += false; // should do nothing...
85  always() << "CountingConsumer: incrementing \"This is not info\" twice" << endmsg;
86  ++m_info;
87  m_info += true;
88  m_info += false; // should do nothing...
89  }
90  };
91  DECLARE_COMPONENT( CountingConsumer )
92 
93  struct IntDataProducer final : Gaudi::Functional::Producer<int(), BaseClass_t> {
94 
95  IntDataProducer( const std::string& name, ISvcLocator* svcLoc )
96  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/MyInt" ) ) {}
97 
98  int operator()() const override {
99  info() << "executing IntDataProducer, storing " << m_value.value() << " into " << outputLocation() << endmsg;
100  return m_value;
101  }
102 
103  Gaudi::Property<int> m_value{ this, "Value", 7, "The integer value to produce." };
104  };
105 
106  DECLARE_COMPONENT( IntDataProducer )
107 
108  struct VectorDataProducer final : Gaudi::Functional::Producer<std::vector<int>(), BaseClass_t> {
109 
110  Gaudi::Property<std::vector<int>> m_data{ this, "Data", { 3, 3, 3, 3 } };
111 
112  VectorDataProducer( const std::string& name, ISvcLocator* svcLoc )
113  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/MyVector" ) ) {}
114 
115  std::vector<int> operator()() const override {
116  info() << "executing VectorDataProducer, storing " << m_data.value() << " into " << outputLocation() << endmsg;
117  return m_data;
118  }
119  };
120 
121  DECLARE_COMPONENT( VectorDataProducer )
122 
124  struct KeyedDataProducer final : Gaudi::Functional::Producer<int_container(), BaseClass_t> {
125 
126  KeyedDataProducer( const std::string& name, ISvcLocator* svcLoc )
127  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/MyKeyed" ) ) {}
128 
129  int_container operator()() const override {
130  int_container container;
131  auto a = new KeyedObject<int>{ 4 };
132  container.add( a );
133  auto b = new KeyedObject<int>{ 5 };
134  container.add( b );
135  info() << "executing KeyedDataProducer, storing [4,5] into " << outputLocation() << endmsg;
136  return container;
137  }
138  };
139 
140  DECLARE_COMPONENT( KeyedDataProducer )
141 
142  struct IntDataConsumer final : Gaudi::Functional::Consumer<void( const int& ), BaseClass_t> {
143 
144  IntDataConsumer( const std::string& name, ISvcLocator* svcLoc )
145  : Consumer( name, svcLoc, KeyValue( "InputLocation", "/Event/MyInt" ) ) {}
146 
147  void operator()( const int& input ) const override {
148  info() << "executing IntDataConsumer, consuming " << input << " from " << inputLocation() << endmsg;
149  }
150  };
151 
152  DECLARE_COMPONENT( IntDataConsumer )
153 
154  struct IntToFloatData final : Gaudi::Functional::Transformer<float( const int& ), BaseClass_t> {
155 
156  IntToFloatData( const std::string& name, ISvcLocator* svcLoc )
157  : Transformer( name, svcLoc, KeyValue( "InputLocation", "/Event/MyInt" ),
158  KeyValue( "OutputLocation", "/Event/MyFloat" ) ) {}
159 
160  float operator()( const int& input ) const override {
161  info() << "Converting: " << input << " from " << inputLocation() << " and storing it into " << outputLocation()
162  << endmsg;
163  return input;
164  }
165  };
166 
167  DECLARE_COMPONENT( IntToFloatData )
168 
169  struct IntFloatToFloatData final : Gaudi::Functional::Transformer<float( const int&, const float& ), BaseClass_t> {
170 
171  IntFloatToFloatData( const std::string& name, ISvcLocator* svcLoc )
172  : Transformer( name, svcLoc,
173  { KeyValue( "InputLocation", "/Event/MyInt" ), KeyValue{ "OtherInput", "/Event/MyOtherFloat" } },
174  KeyValue( "OutputLocation", "/Event/OtherFloat" ) ) {}
175 
176  float operator()( const int& in1, const float& in2 ) const override {
177  info() << "Converting: " << in1 << " from " << inputLocation<int>() << " and " << in2 << " from "
178  << inputLocation<float>() << " and storing it into " << outputLocation() << endmsg;
179  return in1 + in2;
180  }
181  };
182 
183  DECLARE_COMPONENT( IntFloatToFloatData )
184 
186  : Gaudi::Functional::MultiTransformer<std::tuple<float, float>( const int&, const int& ), BaseClass_t> {
187  IntIntToFloatFloatData( const std::string& name, ISvcLocator* svcLoc )
188  : MultiTransformer( name, svcLoc,
189  { KeyValue( "InputLocation1", { "/Event/MyInt" } ),
190  KeyValue( "InputLocation2", { "/Event/MyOtherInt" } ) },
191  { KeyValue( "OutputLocation1", { "/Event/MyMultiFloat1" } ),
192  KeyValue( "OutputLocation2", { "/Event/MyMultiFloat2" } ) } ) {}
193 
194  std::tuple<float, float> operator()( const int& input1, const int& input2 ) const override {
195  info() << "Number of inputs : " << inputLocationSize() << ", number of outputs : " << outputLocationSize()
196  << endmsg;
197  info() << "Converting " << input1 << " from " << inputLocation<0>() << " and " << input2 << " from "
198  << inputLocation<1>() << endmsg;
199  info() << "Storing results into " << outputLocation<0>() << " and " << outputLocation<1>() << endmsg;
200  return std::tuple<float, float>{ input1, input2 };
201  }
202  };
203 
204  DECLARE_COMPONENT( IntIntToFloatFloatData )
205 
206 
209  : public Gaudi::Functional::MergingTransformer<
210  std::vector<int>( const Gaudi::Functional::vector_of_const_<std::vector<int>>& ), BaseClass_t> {
211 
212  IntVectorsToIntVector( const std::string& name, ISvcLocator* svcLoc )
213  : MergingTransformer( name, svcLoc, { "InputLocations", {} },
214  { "OutputLocation", "/Event/MyConcatenatedIntVector" } ) {}
215 
216  std::vector<int>
217  operator()( const Gaudi::Functional::vector_of_const_<std::vector<int>>& intVectors ) const override {
218  // Create a vector and pre-allocate enough space for the number of integers we have
219  auto nelements = std::accumulate( intVectors.begin(), intVectors.end(), 0,
220  []( const auto a, const auto b ) { return a + b.size(); } );
221  std::vector<int> out;
222  out.reserve( nelements );
223  // Concatenate the input vectors to form the output
224  for ( auto& intVector : intVectors ) {
225  info() << "Concatening vector " << intVector << endmsg;
226  out.insert( out.end(), intVector.begin(), intVector.end() );
227  // intVector.clear(); // should not be possible!!! and does indeed not compile ;-)
228  }
229  info() << "Storing output vector " << out << " to " << outputLocation() << endmsg;
230  return out;
231  }
232  };
233 
234  DECLARE_COMPONENT( IntVectorsToIntVector )
235 
237  : public Gaudi::Functional::MergingTransformer<
238  std::vector<int>( const Gaudi::Functional::vector_of_const_<std::vector<int>*>& ), BaseClass_t> {
239 
240  PIntVectorsToIntVector( const std::string& name, ISvcLocator* svcLoc )
241  : MergingTransformer( name, svcLoc, { "InputLocations", {} },
242  { "OutputLocation", "/Event/MyConcatenatedIntVector" } ) {}
243 
244  std::vector<int>
245  operator()( const Gaudi::Functional::vector_of_const_<std::vector<int>*>& intVectors ) const override {
246  // Create a vector and pre-allocate enough space for the number of integers we have
247  auto nelements = std::accumulate( intVectors.begin(), intVectors.end(), 0,
248  []( const auto a, const auto b ) { return a + ( b ? b->size() : 0 ); } );
249  std::vector<int> out;
250  out.reserve( nelements );
251  // Concatenate the input vectors to form the output
252  for ( auto& intVector : intVectors ) {
253  info() << "Concatening vector " << intVector << endmsg;
254  if ( intVector ) {
255  out.insert( out.end(), intVector->begin(), intVector->end() );
256  // intVector->clear(); // should not be possible!!! and does indeed not compile ;-)
257  }
258  }
259  info() << "Storing output vector " << out << " to " << outputLocation() << endmsg;
260  return out;
261  }
262  };
263 
264  DECLARE_COMPONENT( PIntVectorsToIntVector )
265 
266  struct FloatDataConsumer final : Gaudi::Functional::Consumer<void( const float& ), BaseClass_t> {
267 
268  FloatDataConsumer( const std::string& name, ISvcLocator* svcLoc )
269  : Consumer( name, svcLoc, KeyValue( "InputLocation", "/Event/MyFloat" ) ) {}
270 
271  void operator()( const float& input ) const override {
272  info() << "executing FloatDataConsumer: " << input << endmsg;
273  }
274  };
275 
276  DECLARE_COMPONENT( FloatDataConsumer )
277 
278  struct ContextConsumer final : Gaudi::Functional::Consumer<void( const EventContext& ), BaseClass_t> {
279 
281 
282  void operator()( const EventContext& ctx ) const override {
283  info() << "executing ContextConsumer, got " << ctx << endmsg;
284  }
285  };
286 
287  DECLARE_COMPONENT( ContextConsumer )
288 
289  struct ContextTransformer final : Gaudi::Functional::Transformer<int( const EventContext& ), BaseClass_t> {
290 
291  ContextTransformer( const std::string& name, ISvcLocator* svcLoc )
292  : Transformer( name, svcLoc, KeyValue{ "OutputLoc", "/Event/SomeOtherInt" } ) {}
293 
294  int operator()( const EventContext& ctx ) const override {
295  info() << "executing ContextConsumer, got " << ctx << endmsg;
296  return 9;
297  }
298  };
299 
300  DECLARE_COMPONENT( ContextTransformer )
301 
302  struct ContextIntConsumer final : Gaudi::Functional::Consumer<void( const EventContext&, const int& ), BaseClass_t> {
303 
304  ContextIntConsumer( const std::string& name, ISvcLocator* svcLoc )
305  : Consumer( name, svcLoc, KeyValue( "InputLocation", "/Event/MyInt" ) ) {}
306 
307  void operator()( const EventContext& ctx, const int& i ) const override {
308  info() << "executing ContextIntConsumer, got context = " << ctx << ", int = " << i << endmsg;
309  }
310  };
311 
312  DECLARE_COMPONENT( ContextIntConsumer )
313 
314  struct VectorDoubleProducer final : Gaudi::Functional::Producer<std::vector<double>(), BaseClass_t> {
315 
316  VectorDoubleProducer( const std::string& name, ISvcLocator* svcLoc )
317  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/MyVectorOfDoubles" ) ) {}
318 
319  std::vector<double> operator()() const override {
320  info() << "storing vector<double> into " << outputLocation() << endmsg;
321  return { 12.34, 56.78, 90.12, 34.56, 78.90 };
322  }
323  };
324 
325  DECLARE_COMPONENT( VectorDoubleProducer )
326 
327  struct FrExpTransformer final
328  : Gaudi::Functional::MultiScalarTransformer<
329  FrExpTransformer, std::tuple<std::vector<double>, std::vector<int>>( const std::vector<double>& ),
330  BaseClass_t> {
331  FrExpTransformer( const std::string& name, ISvcLocator* svcLoc )
332  : MultiScalarTransformer( name, svcLoc, KeyValue{ "InputDoubles", { "/Event/MyVectorOfDoubles" } },
333  { KeyValue{ "OutputFractions", { "/Event/MyVectorOfFractions" } },
334  KeyValue{ "OutputIntegers", { "/Event/MyVectorOfIntegers" } } } ) {}
335 
336  using MultiScalarTransformer::operator();
337 
338  std::tuple<double, int> operator()( const double& d ) const {
339  int i;
340  double frac = std::frexp( d, &i );
341  info() << "Converting " << d << " -> " << frac << ", " << i << endmsg;
342  return { frac, i };
343  }
344  };
345  DECLARE_COMPONENT( FrExpTransformer )
346 
347  struct OptFrExpTransformer final
348  : Gaudi::Functional::MultiScalarTransformer<
349  OptFrExpTransformer, std::tuple<std::vector<double>, std::vector<int>>( const std::vector<double>& ),
350  BaseClass_t> {
351  OptFrExpTransformer( const std::string& name, ISvcLocator* svcLoc )
352  : MultiScalarTransformer( name, svcLoc, KeyValue{ "InputDoubles", { "/Event/MyVectorOfDoubles" } },
353  { KeyValue{ "OutputFractions", { "/Event/OptMyVectorOfFractions" } },
354  KeyValue{ "OutputIntegers", { "/Event/OptMyVectorOfIntegers" } } } ) {}
355 
356  using MultiScalarTransformer::operator();
357 
358  std::optional<std::tuple<double, int>> operator()( const double& d ) const {
359  if ( d < 30. ) {
360  info() << "Skipping " << d << endmsg;
361  return {};
362  }
363  int i;
364  double frac = std::frexp( d, &i );
365  info() << "Converting " << d << " -> " << frac << ", " << i << endmsg;
366  return std::make_tuple( frac, i );
367  }
368  };
369  DECLARE_COMPONENT( OptFrExpTransformer )
370 
371  struct LdExpTransformer final
372  : Gaudi::Functional::ScalarTransformer<
373  LdExpTransformer, std::vector<double>( const std::vector<double>&, const std::vector<int>& ), BaseClass_t> {
374  LdExpTransformer( const std::string& name, ISvcLocator* svcLoc )
375  : ScalarTransformer( name, svcLoc,
376  { KeyValue{ "InputFractions", { "/Event/MyVectorOfFractions" } },
377  KeyValue{ "InputIntegers", { "/Event/MyVectorOfIntegers" } } },
378  { KeyValue{ "OutputDoubles", { "/Event/MyNewVectorOfDoubles" } } } ) {}
379 
380  using ScalarTransformer::operator();
381 
382  double operator()( double frac, int i ) const {
383  double d = std::ldexp( frac, i );
384  info() << "Converting " << i << ", " << frac << " -> " << d << endmsg;
385  return d;
386  }
387  };
388  DECLARE_COMPONENT( LdExpTransformer )
389 
390  struct OptLdExpTransformer final
391  : Gaudi::Functional::ScalarTransformer<OptLdExpTransformer,
392  std::vector<double>( const std::vector<double>&, const std::vector<int>& ),
393  BaseClass_t> {
394  OptLdExpTransformer( const std::string& name, ISvcLocator* svcLoc )
395  : ScalarTransformer( name, svcLoc,
396  { KeyValue{ "InputFractions", { "/Event/MyVectorOfFractions" } },
397  KeyValue{ "InputIntegers", { "/Event/MyVectorOfIntegers" } } },
398  { KeyValue{ "OutputDoubles", { "/Event/MyOptVectorOfDoubles" } } } ) {}
399 
400  using ScalarTransformer::operator();
401 
402  std::optional<double> operator()( const double& frac, const int& i ) const {
403  double d = std::ldexp( frac, i );
404  if ( i > 6 ) {
405  info() << "Skipping " << d << endmsg;
406  return {};
407  }
408  info() << "Converting " << i << ", " << frac << " -> " << d << endmsg;
409  return d;
410  }
411  };
412  DECLARE_COMPONENT( OptLdExpTransformer )
413 
414  struct VoidConsumer final : Gaudi::Functional::Consumer<void(), BaseClass_t> {
415 
416  using Consumer::Consumer;
417 
418  void operator()() const override { info() << "executing VoidConsumer" << endmsg; }
419  };
420 
421  DECLARE_COMPONENT( VoidConsumer )
422 
423  struct S : public KeyedObject<int> {
425  int a;
426  using ConstVector = std::vector<S const*>;
429  };
430 
431  struct SDataProducer final : Gaudi::Functional::Producer<S::Container(), BaseClass_t> {
432 
433  SDataProducer( const std::string& name, ISvcLocator* svcLoc )
434  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/MyS" ) ) {}
435 
436  S::Container operator()() const override {
437  S::Container out{};
438  for ( int i = 0; i < j; ++i ) out.insert( new S{} );
439  info() << "storing KeyedContainer of size " << out.size() << " into " << outputLocation() << endmsg;
440  return out;
441  }
442  Gaudi::Property<int> j{ this, "j", 5 };
443  };
444 
445  DECLARE_COMPONENT( SDataProducer )
446 
447  struct SRangesToIntVector final
448  : public Gaudi::Functional::MergingTransformer<
449  std::vector<int>( const Gaudi::Functional::vector_of_const_<Gaudi::Range_<std::vector<S const*>>>& ),
450  BaseClass_t> {
451 
452  SRangesToIntVector( const std::string& name, ISvcLocator* svcLoc )
453  : MergingTransformer( name, svcLoc, { "InputRanges", {} },
454  { "OutputLocation", "/Event/MyConcatenatedIntFromSVector" } ) {}
455 
456  std::vector<int> operator()(
457  const Gaudi::Functional::vector_of_const_<Gaudi::Range_<std::vector<S const*>>>& SVectors ) const override {
458  std::vector<int> out;
459  // Concatenate the input vectors to form the output
460  for ( const auto& SVector : SVectors ) {
461  info() << "Concatening range of size " << SVector.size() << endmsg;
462  for ( auto* s : SVector ) { out.push_back( s->a ); }
463  }
464  info() << "Storing output vector " << out << " to " << outputLocation() << endmsg;
465  return out;
466  }
467  };
468  DECLARE_COMPONENT( SRangesToIntVector )
469 
471  : public Gaudi::Functional::MergingTransformer<void( const Gaudi::Functional::vector_of_const_<
472  std::optional<Gaudi::NamedRange_<std::vector<S const*>>>>& ),
473  BaseClass_t> {
474 
475  OptionalSRangesMerger( const std::string& name, ISvcLocator* svcLoc )
476  : MergingTransformer( name, svcLoc, { "InputRanges", {} } ) {}
477 
478  void
479  operator()( const Gaudi::Functional::vector_of_const_<std::optional<Gaudi::NamedRange_<std::vector<S const*>>>>&
480  OptSVectors ) const override {
481  // Loop over the optional ranges checking if the opt has a value
482  for ( const auto& OptSVector : OptSVectors ) {
483  if ( OptSVector.has_value() ) {
484  auto SVector = OptSVector.value();
485  info() << "Consuming vector of size: " << SVector.size() << endmsg;
486  } else {
487  info() << "Skipping empty optional range" << endmsg;
488  }
489  }
490  }
491  };
492  DECLARE_COMPONENT( OptionalSRangesMerger )
493 
494  struct IntVectorsMerger final
495  : public Gaudi::Functional::MergingTransformer<
496  void( const Gaudi::Functional::vector_of_const_<std::vector<int>>& ), BaseClass_t> {
497 
498  IntVectorsMerger( const std::string& name, ISvcLocator* svcLoc )
499  : MergingTransformer( name, svcLoc, { "InputLocations", {} } ) {}
500 
501  void operator()( const Gaudi::Functional::vector_of_const_<std::vector<int>>& intVectors ) const override {
502  // Create a vector and pre-allocate enough space for the number of integers we have
503  auto nelements = std::accumulate( intVectors.begin(), intVectors.end(), 0,
504  []( const auto a, const auto b ) { return a + b.size(); } );
505  info() << "sum of input sizes: " << nelements << endmsg;
506  // Concatenate the input vectors to form the output
507  for ( const auto& intVector : intVectors ) { info() << "Consuming vector " << intVector << endmsg; }
508  }
509  };
510 
511  DECLARE_COMPONENT( IntVectorsMerger )
512 
514  : public Gaudi::Functional::MergingConsumer<void( Gaudi::Functional::vector_of_const_<std::vector<int>> const& ),
515  BaseClass_t> {
516  using Base =
518  BaseClass_t>;
519 
520  IntVectorsMergingConsumer( const std::string& name, ISvcLocator* svcLoc )
521  : Base( name, svcLoc, { "InputLocations", {} } ) {}
522 
523  void operator()( Gaudi::Functional::vector_of_const_<std::vector<int>> const& intVectors ) const override {
524  // Create a vector and pre-allocate enough space for the number of integers we have
525  auto nelements = std::accumulate( intVectors.begin(), intVectors.end(), 0,
526  []( const auto a, const auto b ) { return a + b.size(); } );
527  info() << "sum of input sizes: " << nelements << endmsg;
528  // Concatenate the input vectors to form the output
529  for ( const auto& intVector : intVectors ) { info() << "Consuming vector " << intVector << endmsg; }
530  }
531  };
532 
533  DECLARE_COMPONENT( IntVectorsMergingConsumer )
534 
535  struct MyData {
536  using ConstVector = std::vector<const MyData*>;
537  };
539 
540  struct RangeProducer : Gaudi::Functional::Producer<MyDataRange()> {
541 
542  RangeProducer( const std::string& name, ISvcLocator* pSvcLocator )
543  : Producer( name, pSvcLocator, KeyValue{ "TrackLocation", "" } ){};
544 
545  MyDataRange operator()() const override { return {}; }
546  };
547  DECLARE_COMPONENT( RangeProducer )
548 
549 
551  struct TwoDMerger final : public Gaudi::Functional::MergingMultiTransformer<
552  std::tuple<std::vector<int>, std::vector<double>>(
553  const Gaudi::Functional::vector_of_const_<std::vector<int>>&,
554  const Gaudi::Functional::vector_of_const_<std::vector<double>>& ),
555  BaseClass_t> {
556 
557  TwoDMerger( const std::string& name, ISvcLocator* svcLoc )
558  : MergingMultiTransformer{ name,
559  svcLoc,
560  { KeyValues{ "InputInts", {} }, KeyValues{ "InputDoubles", {} } },
561  { KeyValue{ "OutputInts", "/Event/MySummedInts" },
562  KeyValue{ "OutputDoubles", "/Event/MySummedDoubles" } } } {}
563 
564  std::tuple<std::vector<int>, std::vector<double>>
565  operator()( const Gaudi::Functional::vector_of_const_<std::vector<int>>& intVectors,
566  const Gaudi::Functional::vector_of_const_<std::vector<double>>& doubleVectors ) const override {
567  auto r = std::tuple{ std::vector<int>{}, std::vector<double>{} };
568  auto& [is, ds] = r;
569  std::transform( begin( intVectors ), end( intVectors ), std::back_inserter( is ),
570  []( const std::vector<int>& vi ) { return std::accumulate( begin( vi ), end( vi ), 0 ); } );
571  always() << " accumulated: " << is << endmsg;
572  std::transform( begin( doubleVectors ), end( doubleVectors ), std::back_inserter( ds ),
573  []( const std::vector<double>& vd ) { return std::accumulate( begin( vd ), end( vd ), 0. ); } );
574  always() << " accumulated: " << ds << endmsg;
575  return r;
576  }
577  };
578 
579  DECLARE_COMPONENT( TwoDMerger )
580 
581  struct Foo {
582  int i;
583 
584  Foo( int i ) : i{ i } {}
585  Foo( Foo&& ) = delete;
586  Foo& operator=( Foo&& ) = delete;
587  Foo( const Foo& ) = delete;
588  Foo& operator=( const Foo& ) = delete;
589  ~Foo(){};
590  };
591 
592  struct ShrdPtrProducer final : Gaudi::Functional::Producer<std::shared_ptr<Foo>(), BaseClass_t> {
593 
594  ShrdPtrProducer( const std::string& name, ISvcLocator* svcLoc )
595  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/MySharedFoo" ) ) {}
596 
597  std::shared_ptr<Foo> operator()() const override {
598  auto foo = std::make_shared<Foo>( m_value.value() );
599  info() << "executing ShrdPtrProducer, storing shared_ptr<Foo> with payload at " << foo.get() << " and value "
600  << foo->i << " into " << outputLocation() << endmsg;
601  return foo;
602  }
603 
604  Gaudi::Property<int> m_value{ this, "Value", 7, "The integer value to produce." };
605  };
606 
607  DECLARE_COMPONENT( ShrdPtrProducer )
608 
609  struct ShrdPtrConsumer final : Gaudi::Functional::Consumer<void( std::shared_ptr<Foo> const& ), BaseClass_t> {
610 
611  ShrdPtrConsumer( const std::string& name, ISvcLocator* svcLoc )
612  : Consumer( name, svcLoc, KeyValue( "InputLocation", "/Event/MySharedFoo" ) ) {}
613 
614  void operator()( const std::shared_ptr<Foo>& foo ) const override {
615  info() << "executing ShrdPtrConsumer, got shared_ptr<Foo> with payload at " << foo.get() << " with value "
616  << foo->i << " from " << inputLocation() << endmsg;
617  }
618  };
619 
620  DECLARE_COMPONENT( ShrdPtrConsumer )
621 
622 
625  struct IntVectorsToInts final
626  : public Gaudi::Functional::SplittingMergingTransformer<
627  std::vector<int>( const Gaudi::Functional::vector_of_const_<std::vector<int>>& ), BaseClass_t> {
628 
629  Gaudi::Property<std::vector<std::pair<int, int>>> m_mapping{ this, "Mapping", {} };
630 
631  IntVectorsToInts( const std::string& name, ISvcLocator* svcLoc )
632  : SplittingMergingTransformer( name, svcLoc, { "InputLocations", {} }, { "OutputLocations", {} } ) {}
633 
634  std::vector<int>
635  operator()( const Gaudi::Functional::vector_of_const_<std::vector<int>>& intVectors ) const override {
636  int l = 0;
637  for ( const auto& iv : intVectors ) { info() << "loaded " << iv << " from " << inputLocation( l++ ) << endmsg; }
638  std::vector<int> out( outputLocationSize(), 0 );
639  for ( const auto& [l, r] : m_mapping.value() ) {
640  out[l] = std::accumulate( intVectors.at( r ).begin(), intVectors.at( r ).end(), out[l] );
641  }
642  l = 0;
643  for ( const auto& o : out ) { info() << "storing " << o << " in " << outputLocation( l++ ) << endmsg; }
644  return out;
645  }
646  };
647  DECLARE_COMPONENT( IntVectorsToInts )
648 
649  struct Eventually {
650  Gaudi::Algorithm const* parent = nullptr;
651  void ( *action )( Gaudi::Algorithm const* ) = nullptr;
652  Eventually( Gaudi::Algorithm const* p, void ( *a )( Gaudi::Algorithm const* ) ) : parent{ p }, action{ a } {}
653  Eventually( Eventually const& ) = delete;
654  Eventually& operator=( Eventually const& ) = delete;
656  : parent{ std::exchange( other.parent, nullptr ) }, action{ std::exchange( other.action, nullptr ) } {}
658  parent = std::exchange( other.parent, nullptr );
659  action = std::exchange( other.action, nullptr );
660  return *this;
661  }
663  if ( action ) action( parent );
664  }
665  };
666 
667  struct OpaqueProducer final
669  Eventually(),
670  Gaudi::Functional::Traits::use_<BaseClass_t, Gaudi::Functional::Traits::WriteOpaqueFor<Eventually>>> {
671 
672  OpaqueProducer( const std::string& name, ISvcLocator* svcLoc )
673  : Producer( name, svcLoc, KeyValue( "OutputLocation", "/Event/Eventually" ) ) {}
674 
675  Eventually operator()() const override {
676  always() << "creating Eventually" << endmsg;
677  return Eventually{ this, []( Gaudi::Algorithm const* me ) {
678  me->always() << "My Eventually is about to be destroyed" << endmsg;
679  } };
680  }
681  };
682 
683  DECLARE_COMPONENT( OpaqueProducer )
684 
685  static_assert( std::ranges::forward_range<Gaudi::Functional::vector_of_const_<void*>> );
686  static_assert( std::ranges::forward_range<Gaudi::Functional::vector_of_const_<int>> );
687  static_assert( std::ranges::forward_range<Gaudi::Functional::vector_of_const_<std::vector<int>*>> );
688  static_assert( std::ranges::forward_range<Gaudi::Functional::vector_of_const_<std::vector<int>>> );
689  static_assert( std::same_as<typename Gaudi::Functional::vector_of_const_<std::vector<int>*>::value_type,
690  std::vector<int> const*> );
691  static_assert( std::same_as<typename Gaudi::Functional::vector_of_const_<std::vector<int>>::value_type,
692  std::vector<int> const> );
693  static_assert(
694  std::same_as<typename Gaudi::Functional::vector_of_const_<Gaudi::Range_<std::vector<void*>>>::value_type,
695  Gaudi::Range_<std::vector<void*>> const> );
696 
697 } // namespace Gaudi::TestSuite
Gaudi::TestSuite::RangeProducer::RangeProducer
RangeProducer(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MakeAndConsume.cpp:542
Gaudi::TestSuite::LdExpTransformer::LdExpTransformer
LdExpTransformer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:374
Gaudi::TestSuite::IntVectorsMergingConsumer::IntVectorsMergingConsumer
IntVectorsMergingConsumer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:520
Gaudi::TestSuite::OpaqueProducer::OpaqueProducer
OpaqueProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:672
Gaudi::Functional::MergingTransformer
details::MergingTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MergingTransformer
Definition: MergingTransformer.h:234
Gaudi::TestSuite::Eventually::~Eventually
~Eventually()
Definition: MakeAndConsume.cpp:662
Gaudi::Functional::Consumer
details::Consumer< Signature, Traits_, details::isLegacy< Traits_ > > Consumer
Definition: Consumer.h:69
Gaudi::TestSuite::IntVectorsToInts::operator()
std::vector< int > operator()(const Gaudi::Functional::vector_of_const_< std::vector< int >> &intVectors) const override
Definition: MakeAndConsume.cpp:635
Gaudi::TestSuite::VectorDataProducer::operator()
std::vector< int > operator()() const override
Definition: MakeAndConsume.cpp:115
Gaudi::TestSuite::ContextTransformer::ContextTransformer
ContextTransformer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:291
Gaudi::TestSuite::CountingConsumer
Definition: MakeAndConsume.cpp:70
Gaudi::TestSuite::TwoDMerger::TwoDMerger
TwoDMerger(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:557
Gaudi::TestSuite::IMyTool::DeclareInterfaceID
DeclareInterfaceID(IMyTool, 1, 0)
Gaudi::TestSuite::KeyedDataProducer::KeyedDataProducer
KeyedDataProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:126
Gaudi::NamedRange_
Definition: NamedRange.h:42
Gaudi::TestSuite::VectorDoubleProducer::VectorDoubleProducer
VectorDoubleProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:316
GaudiPartProp.decorators.std
std
Definition: decorators.py:32
Gaudi::TestSuite::IntToFloatData::IntToFloatData
IntToFloatData(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:156
Gaudi::TestSuite::IMyTool
Definition: MakeAndConsume.cpp:30
Gaudi::TestSuite::SRangesToIntVector::operator()
std::vector< int > operator()(const Gaudi::Functional::vector_of_const_< Gaudi::Range_< std::vector< S const * >>> &SVectors) const override
Definition: MakeAndConsume.cpp:456
Gaudi::TestSuite::IntDataProducer::IntDataProducer
IntDataProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:95
KeyedObject::KeyedObject
KeyedObject()=default
Standard Constructor. The object key is preset to the invalid value.
Gaudi::TestSuite::TwoDMerger::operator()
std::tuple< std::vector< int >, std::vector< double > > operator()(const Gaudi::Functional::vector_of_const_< std::vector< int >> &intVectors, const Gaudi::Functional::vector_of_const_< std::vector< double >> &doubleVectors) const override
Definition: MakeAndConsume.cpp:565
Gaudi::TestSuite::MyConsumerTool
Definition: MakeAndConsume.cpp:42
Gaudi::TestSuite::ShrdPtrConsumer::operator()
void operator()(const std::shared_ptr< Foo > &foo) const override
Definition: MakeAndConsume.cpp:614
Gaudi::TestSuite::IntVectorsMergingConsumer::operator()
void operator()(Gaudi::Functional::vector_of_const_< std::vector< int >> const &intVectors) const override
Definition: MakeAndConsume.cpp:523
gaudirun.s
string s
Definition: gaudirun.py:346
Gaudi::TestSuite::LdExpTransformer::operator()
double operator()(double frac, int i) const
Definition: MakeAndConsume.cpp:382
Gaudi::TestSuite::ShrdPtrConsumer
Definition: MakeAndConsume.cpp:609
Gaudi::TestSuite::IntVectorsToInts
transform a vector of vector of int to a vector of int, where the output vector of in is scattered in...
Definition: MakeAndConsume.cpp:627
ISvcLocator
Definition: ISvcLocator.h:42
Gaudi::TestSuite::MyConsumerTool::BoundInstance::operator()
void operator()() const override
Definition: MakeAndConsume.cpp:53
Gaudi::TestSuite::Eventually::Eventually
Eventually(Eventually const &)=delete
Gaudi::TestSuite::SDataProducer::j
Gaudi::Property< int > j
Definition: MakeAndConsume.cpp:442
Gaudi::TestSuite::FloatDataConsumer::FloatDataConsumer
FloatDataConsumer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:268
Gaudi::TestSuite::Foo::operator=
Foo & operator=(const Foo &)=delete
Gaudi::TestSuite::OptFrExpTransformer::operator()
std::optional< std::tuple< double, int > > operator()(const double &d) const
Definition: MakeAndConsume.cpp:358
Gaudi::TestSuite::ShrdPtrConsumer::ShrdPtrConsumer
ShrdPtrConsumer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:611
Gaudi::TestSuite::OptFrExpTransformer::OptFrExpTransformer
OptFrExpTransformer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:351
Gaudi::TestSuite::ContextConsumer
Definition: MakeAndConsume.cpp:278
Gaudi::TestSuite::VoidConsumer
Definition: MakeAndConsume.cpp:414
Gaudi::TestSuite::OpaqueProducer::operator()
Eventually operator()() const override
Definition: MakeAndConsume.cpp:675
Containers
Definition: KeyedObjectManager.h:21
Gaudi::TestSuite::FrExpTransformer::FrExpTransformer
FrExpTransformer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:331
Gaudi::TestSuite::VoidConsumer::operator()
void operator()() const override
Definition: MakeAndConsume.cpp:418
Gaudi::Functional::details::vector_of_const_
Definition: details.h:359
Gaudi::TestSuite::MyConsumerTool::BoundInstance::i
int i
Definition: MakeAndConsume.cpp:49
extend_interfaces
Base class to be used to extend an interface.
Definition: extend_interfaces.h:14
KeyedContainer.h
Gaudi::TestSuite::Eventually::Eventually
Eventually(Gaudi::Algorithm const *p, void(*a)(Gaudi::Algorithm const *))
Definition: MakeAndConsume.cpp:652
Gaudi::TestSuite::MyData::ConstVector
std::vector< const MyData * > ConstVector
Definition: MakeAndConsume.cpp:536
Gaudi::TestSuite::MyConsumerTool::BoundInstance
Definition: MakeAndConsume.cpp:47
Gaudi::TestSuite::OptionalSRangesMerger::operator()
void operator()(const Gaudi::Functional::vector_of_const_< std::optional< Gaudi::NamedRange_< std::vector< S const * >>>> &OptSVectors) const override
Definition: MakeAndConsume.cpp:479
Gaudi::TestSuite::MyData
Definition: MakeAndConsume.cpp:535
Gaudi::Functional::details::Consumer
Definition: Consumer.h:24
Gaudi::Functional::ToolBinder
details::ToolBinder< Signature, Traits_ > ToolBinder
Definition: ToolBinder.h:83
Gaudi::TestSuite::FrExpTransformer::operator()
std::tuple< double, int > operator()(const double &d) const
Definition: MakeAndConsume.cpp:338
Gaudi::TestSuite::SDataProducer
Definition: MakeAndConsume.cpp:431
Gaudi::TestSuite::ShrdPtrProducer
Definition: MakeAndConsume.cpp:592
Gaudi::TestSuite::IntDataProducer
Definition: MakeAndConsume.cpp:93
ToolBinder.h
Gaudi::TestSuite::PIntVectorsToIntVector::PIntVectorsToIntVector
PIntVectorsToIntVector(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:240
KeyedContainer::add
long add(ContainedObject *pObject) override
ObjectContainerBase overload: Add an object to the container.
Definition: KeyedContainer.h:581
Gaudi::TestSuite::VectorDataProducer::VectorDataProducer
VectorDataProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:112
Gaudi::TestSuite::IntIntToFloatFloatData::IntIntToFloatFloatData
IntIntToFloatFloatData(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:187
ScalarTransformer.h
Gaudi::TestSuite::IMyTool::operator()
virtual void operator()() const =0
bug_34121.tool
tool
Definition: bug_34121.py:18
Gaudi::Utils::begin
AttribStringParser::Iterator begin(const AttribStringParser &parser)
Definition: AttribStringParser.h:135
Gaudi::TestSuite::S::a
int a
Definition: MakeAndConsume.cpp:425
Gaudi::TestSuite::OpaqueProducer
Definition: MakeAndConsume.cpp:670
Gaudi::TestSuite::IntDataConsumer::operator()
void operator()(const int &input) const override
Definition: MakeAndConsume.cpp:147
GaudiPython.Pythonizations.ctx
ctx
Definition: Pythonizations.py:578
Gaudi::TestSuite::Foo
Definition: MakeAndConsume.cpp:581
Gaudi::Functional::details::MergingTransformer
Definition: MergingTransformer.h:48
Gaudi::TestSuite::OptionalSRangesMerger::OptionalSRangesMerger
OptionalSRangesMerger(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:475
Consumer.h
Gaudi::TestSuite::Eventually
Definition: MakeAndConsume.cpp:649
Gaudi::TestSuite::ToolConsumer
Definition: MakeAndConsume.cpp:62
Gaudi::TestSuite::OptLdExpTransformer::OptLdExpTransformer
OptLdExpTransformer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:394
Gaudi::Functional::Producer
details::Producer< Signature, Traits_, details::isLegacy< Traits_ > > Producer
Definition: Producer.h:37
Gaudi::TestSuite::OptFrExpTransformer
Definition: MakeAndConsume.cpp:350
Gaudi::TestSuite::Eventually::Eventually
Eventually(Eventually &&other)
Definition: MakeAndConsume.cpp:655
Gaudi::TestSuite::FrExpTransformer
Definition: MakeAndConsume.cpp:330
IAlgTool.h
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:87
Producer.h
Gaudi::TestSuite::IntVectorsToIntVector
Concatenates a list of input vectors into a single output vector.
Definition: MakeAndConsume.cpp:210
Gaudi::TestSuite::Eventually::operator=
Eventually & operator=(Eventually &&other)
Definition: MakeAndConsume.cpp:657
Gaudi::TestSuite::ContextTransformer::operator()
int operator()(const EventContext &ctx) const override
Definition: MakeAndConsume.cpp:294
Gaudi::Property::value
const ValueType & value() const
Definition: Property.h:229
Gaudi::TestSuite::FloatDataConsumer::operator()
void operator()(const float &input) const override
Definition: MakeAndConsume.cpp:271
Gaudi::TestSuite::IntVectorsMerger::IntVectorsMerger
IntVectorsMerger(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:498
Gaudi::TestSuite::IntFloatToFloatData::operator()
float operator()(const int &in1, const float &in2) const override
Definition: MakeAndConsume.cpp:176
Gaudi::TestSuite::IntDataProducer::operator()
int operator()() const override
Definition: MakeAndConsume.cpp:98
Gaudi::TestSuite::IntVectorsToInts::IntVectorsToInts
IntVectorsToInts(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:631
Gaudi::TestSuite::IntVectorsToIntVector::operator()
std::vector< int > operator()(const Gaudi::Functional::vector_of_const_< std::vector< int >> &intVectors) const override
Definition: MakeAndConsume.cpp:217
SharedObjectsContainer
Definition: SharedObjectsContainer.h:31
Gaudi::TestSuite::IntFloatToFloatData::IntFloatToFloatData
IntFloatToFloatData(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:171
Gaudi::TestSuite::ShrdPtrProducer::operator()
std::shared_ptr< Foo > operator()() const override
Definition: MakeAndConsume.cpp:597
Gaudi::TestSuite::OptLdExpTransformer::operator()
std::optional< double > operator()(const double &frac, const int &i) const
Definition: MakeAndConsume.cpp:402
KeyedContainer
template class KeyedContainer, KeyedContainer.h
Definition: KeyedContainer.h:61
Gaudi::TestSuite::Foo::i
int i
Definition: MakeAndConsume.cpp:582
Transformer.h
Gaudi::Functional::details::Producer
Definition: Producer.h:22
KeyedObject
Definition of the templated KeyedObject class.
Definition: KeyedObject.h:37
Gaudi::TestSuite::IntToFloatData
Definition: MakeAndConsume.cpp:154
Gaudi::TestSuite
Definition: ConditionAccessorHolder.h:21
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:198
Gaudi::Accumulators::MsgCounter< MSG::ERROR >
Gaudi::TestSuite::KeyedDataProducer
Definition: MakeAndConsume.cpp:124
Gaudi::TestSuite::SRangesToIntVector
Definition: MakeAndConsume.cpp:450
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:19
Gaudi::Interface::Bind::Stub
Definition: IBinder.h:86
Gaudi::TestSuite::ToolConsumer::operator()
void operator()(IMyTool const &tool) const override
Definition: MakeAndConsume.cpp:66
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
Gaudi::TestSuite::FloatDataConsumer
Definition: MakeAndConsume.cpp:266
SharedObjectsContainer.h
Gaudi::TestSuite::MyConsumerTool::BoundInstance::BoundInstance
BoundInstance(MyConsumerTool const *parent, const int &i)
Definition: MakeAndConsume.cpp:52
Gaudi::TestSuite::ContextTransformer
Definition: MakeAndConsume.cpp:289
IBinder.h
Gaudi::TestSuite::Foo::Foo
Foo(int i)
Definition: MakeAndConsume.cpp:584
Gaudi::TestSuite::IntDataConsumer::IntDataConsumer
IntDataConsumer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:144
Gaudi::TestSuite::IntVectorsMerger
Definition: MakeAndConsume.cpp:496
Gaudi::TestSuite::PIntVectorsToIntVector::operator()
std::vector< int > operator()(const Gaudi::Functional::vector_of_const_< std::vector< int > * > &intVectors) const override
Definition: MakeAndConsume.cpp:245
Gaudi ::Functional::MultiTransformer
details::MultiTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MultiTransformer
Definition: Transformer.h:231
Gaudi::TestSuite::OptionalSRangesMerger
Definition: MakeAndConsume.cpp:473
Gaudi::TestSuite::ShrdPtrProducer::m_value
Gaudi::Property< int > m_value
Definition: MakeAndConsume.cpp:604
Gaudi::TestSuite::IntIntToFloatFloatData::operator()
std::tuple< float, float > operator()(const int &input1, const int &input2) const override
Definition: MakeAndConsume.cpp:194
Gaudi::Range_
Definition: Range.h:81
Gaudi::TestSuite::Foo::operator=
Foo & operator=(Foo &&)=delete
Containers::vector
struct GAUDI_API vector
Parametrisation class for vector-like implementation.
Definition: KeyedObjectManager.h:31
Gaudi::TestSuite::MyConsumerTool::BoundInstance::parent
MyConsumerTool const * parent
Definition: MakeAndConsume.cpp:48
Gaudi::TestSuite::IntFloatToFloatData
Definition: MakeAndConsume.cpp:169
Accumulators.h
gaudirun.type
type
Definition: gaudirun.py:160
Gaudi::TestSuite::LdExpTransformer
Definition: MakeAndConsume.cpp:373
Gaudi::TestSuite::IntToFloatData::operator()
float operator()(const int &input) const override
Definition: MakeAndConsume.cpp:160
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
gaudirun.l
dictionary l
Definition: gaudirun.py:583
Gaudi::TestSuite::MyExampleTool::m_message
Gaudi::Property< std::string > m_message
Definition: MakeAndConsume.cpp:38
Gaudi::TestSuite::S::ConstVector
std::vector< S const * > ConstVector
Definition: MakeAndConsume.cpp:426
Gaudi::TestSuite::S
Definition: MakeAndConsume.cpp:423
MergingTransformer.h
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginServiceV1.h:45
Gaudi::Functional::SplittingMergingTransformer
details::SplittingMergingTransformer< Signature, Traits_, false > SplittingMergingTransformer
Definition: SplittingMergingTransformer.h:125
Gaudi::TestSuite::SDataProducer::operator()
S::Container operator()() const override
Definition: MakeAndConsume.cpp:436
IInterface
Definition: IInterface.h:225
Gaudi::TestSuite::SRangesToIntVector::SRangesToIntVector
SRangesToIntVector(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:452
EventContext
Definition: EventContext.h:34
Gaudi::Functional::Traits::BaseClass_t
Definition: utilities.h:37
Gaudi::TestSuite::IntVectorsMerger::operator()
void operator()(const Gaudi::Functional::vector_of_const_< std::vector< int >> &intVectors) const override
Definition: MakeAndConsume.cpp:501
Gaudi::TestSuite::IntVectorsToIntVector::IntVectorsToIntVector
IntVectorsToIntVector(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:212
Gaudi::TestSuite::VectorDoubleProducer::operator()
std::vector< double > operator()() const override
Definition: MakeAndConsume.cpp:319
Gaudi::TestSuite::OptLdExpTransformer
Definition: MakeAndConsume.cpp:393
Gaudi ::Functional::Transformer
details::Transformer< Signature, Traits_, details::isLegacy< Traits_ > > Transformer
Definition: Transformer.h:228
Gaudi::TestSuite::IntVectorsMergingConsumer
Definition: MakeAndConsume.cpp:515
Gaudi::TestSuite::ShrdPtrProducer::ShrdPtrProducer
ShrdPtrProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:594
AlgTool.h
SplittingMergingTransformer.h
Gaudi::TestSuite::KeyedDataProducer::operator()
int_container operator()() const override
Definition: MakeAndConsume.cpp:129
Gaudi::TestSuite::Foo::Foo
Foo(const Foo &)=delete
gaudirun.action
action
Definition: gaudirun.py:153
IOTest.end
end
Definition: IOTest.py:125
Gaudi::TestSuite::RangeProducer::operator()
MyDataRange operator()() const override
Definition: MakeAndConsume.cpp:545
Gaudi::TestSuite::MyExampleTool::operator()
void operator()() const override
Definition: MakeAndConsume.cpp:37
Gaudi::TestSuite::MyConsumerTool::MyConsumerTool
MyConsumerTool(std::string type, std::string name, const IInterface *parent)
Definition: MakeAndConsume.cpp:43
Gaudi::TestSuite::Foo::Foo
Foo(Foo &&)=delete
Gaudi::TestSuite::SDataProducer::SDataProducer
SDataProducer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:433
Gaudi::TestSuite::Foo::~Foo
~Foo()
Definition: MakeAndConsume.cpp:589
Containers::HashMap
KeyedObjectManager< hashmap > HashMap
Forward declaration of specialized std::hashmap-like object manager.
Definition: KeyedObjectManager.h:99
Gaudi::TestSuite::ToolConsumer::ToolConsumer
ToolConsumer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:63
Gaudi::TestSuite::ContextConsumer::operator()
void operator()(const EventContext &ctx) const override
Definition: MakeAndConsume.cpp:282
Gaudi::TestSuite::RangeProducer
Definition: MakeAndConsume.cpp:540
Gaudi::TestSuite::VectorDoubleProducer
Definition: MakeAndConsume.cpp:314
Gaudi::TestSuite::ContextIntConsumer::ContextIntConsumer
ContextIntConsumer(const std::string &name, ISvcLocator *svcLoc)
Definition: MakeAndConsume.cpp:304
Gaudi::Accumulators::accumulate
void accumulate(Counter &counter, const Container &container, Fun f=Identity{})
A helper function for accumulating data from a container into a counter This is internally using buff...
Definition: Accumulators.h:1227
Gaudi::TestSuite::ContextIntConsumer
Definition: MakeAndConsume.cpp:302
Gaudi::Functional::MergingConsumer
details::MergingTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MergingConsumer
Definition: MergingTransformer.h:238
Gaudi::TestSuite::IntIntToFloatFloatData
Definition: MakeAndConsume.cpp:186
Gaudi::TestSuite::CountingConsumer::operator()
void operator()() const override
Definition: MakeAndConsume.cpp:76
Gaudi::Property< std::string >
Gaudi::TestSuite::ContextIntConsumer::operator()
void operator()(const EventContext &ctx, const int &i) const override
Definition: MakeAndConsume.cpp:307
Gaudi::TestSuite::MyExampleTool
Definition: MakeAndConsume.cpp:35
Gaudi::TestSuite::VectorDataProducer
Definition: MakeAndConsume.cpp:108
Gaudi::TestSuite::PIntVectorsToIntVector
Definition: MakeAndConsume.cpp:238
Gaudi::TestSuite::Eventually::operator=
Eventually & operator=(Eventually const &)=delete
Gaudi::TestSuite::TwoDMerger
Concatenates a list of input vectors into a single output vector.
Definition: MakeAndConsume.cpp:555
Gaudi::TestSuite::IntDataConsumer
Definition: MakeAndConsume.cpp:142
Gaudi::Functional::details::out
OptOut && out
Definition: details.h:179