Go to the documentation of this file.
34 using extends::extends;
43 construct<BoundInstance>(
this ) } {}
52 parent->always() <<
"BoundInstance - got: " << i <<
" from " << parent->inputLocation<
int>() <<
endmsg;
62 :
Consumer(
name, svcLoc, KeyValue{
"MyTool",
"MyExampleTool" } ) {}
75 always() <<
"CountingConsumer: incrementing \"This is not an error\" twice" <<
endmsg;
79 always() <<
"CountingConsumer: incrementing \"This is not a warning\" twice" <<
endmsg;
83 always() <<
"CountingConsumer: incrementing \"This is not info\" twice" <<
endmsg;
94 :
Producer(
name, svcLoc, KeyValue(
"OutputLocation",
"/Event/MyInt" ) ) {}
97 info() <<
"executing IntDataProducer, storing " << m_value.value() <<
" into " << outputLocation() <<
endmsg;
109 :
Producer(
name, svcLoc, KeyValue(
"OutputLocation",
"/Event/MyVector" ) ) {}
112 info() <<
"executing VectorDataProducer, storing [3,3,3,3] into " << outputLocation() <<
endmsg;
113 return { 3, 3, 3, 3 };
123 :
Producer(
name, svcLoc, KeyValue(
"OutputLocation",
"/Event/MyKeyed" ) ) {}
131 info() <<
"executing KeyedDataProducer, storing [4,5] into " << outputLocation() <<
endmsg;
141 :
Consumer(
name, svcLoc, KeyValue(
"InputLocation",
"/Event/MyInt" ) ) {}
144 info() <<
"executing IntDataConsumer, consuming " << input <<
" from " << inputLocation() <<
endmsg;
153 :
Transformer(
name, svcLoc, KeyValue(
"InputLocation",
"/Event/MyInt" ),
154 KeyValue(
"OutputLocation",
"/Event/MyFloat" ) ) {}
157 info() <<
"Converting: " << input <<
" from " << inputLocation() <<
" and storing it into " << outputLocation()
169 { KeyValue(
"InputLocation",
"/Event/MyInt" ), KeyValue{
"OtherInput",
"/Event/MyOtherFloat" } },
170 KeyValue(
"OutputLocation",
"/Event/OtherFloat" ) ) {}
172 float operator()(
const int& in1,
const float& in2 )
const override {
173 info() <<
"Converting: " << in1 <<
" from " << inputLocation<int>() <<
" and " << in2 <<
" from "
174 << inputLocation<float>() <<
" and storing it into " << outputLocation() <<
endmsg;
185 { KeyValue(
"InputLocation1", {
"/Event/MyInt" } ),
186 KeyValue(
"InputLocation2", {
"/Event/MyOtherInt" } ) },
187 { KeyValue(
"OutputLocation1", {
"/Event/MyMultiFloat1" } ),
188 KeyValue(
"OutputLocation2", {
"/Event/MyMultiFloat2" } ) } ) {}
191 info() <<
"Number of inputs : " << inputLocationSize() <<
", number of outputs : " << outputLocationSize()
193 info() <<
"Converting " << input1 <<
" from " << inputLocation<0>() <<
" and " << input2 <<
" from "
194 << inputLocation<1>() <<
endmsg;
195 info() <<
"Storing results into " << outputLocation<0>() <<
" and " << outputLocation<1>() <<
endmsg;
210 {
"OutputLocation",
"/Event/MyConcatenatedIntVector" } ) {}
215 auto nelements =
std::accumulate( intVectors.begin(), intVectors.end(), 0,
216 [](
const auto a,
const auto b ) { return a + b.size(); } );
218 out.reserve( nelements );
220 for (
const auto& intVector : intVectors ) {
221 info() <<
"Concatening vector " << intVector <<
endmsg;
222 out.insert(
out.end(), intVector.begin(), intVector.end() );
224 info() <<
"Storing output vector " <<
out <<
" to " << outputLocation() <<
endmsg;
234 :
Consumer(
name, svcLoc, KeyValue(
"InputLocation",
"/Event/MyFloat" ) ) {}
237 info() <<
"executing FloatDataConsumer: " << input <<
endmsg;
248 info() <<
"executing ContextConsumer, got " <<
ctx <<
endmsg;
257 :
Transformer(
name, svcLoc, KeyValue{
"OutputLoc",
"/Event/SomeOtherInt" } ) {}
260 info() <<
"executing ContextConsumer, got " <<
ctx <<
endmsg;
270 :
Consumer(
name, svcLoc, KeyValue(
"InputLocation",
"/Event/MyInt" ) ) {}
273 info() <<
"executing ContextIntConsumer, got context = " <<
ctx <<
", int = " << i <<
endmsg;
282 :
Producer(
name, svcLoc, KeyValue(
"OutputLocation",
"/Event/MyVectorOfDoubles" ) ) {}
285 info() <<
"storing vector<double> into " << outputLocation() <<
endmsg;
286 return { 12.34, 56.78, 90.12, 34.56, 78.90 };
293 :
Gaudi::Functional::MultiScalarTransformer<
297 : MultiScalarTransformer(
name, svcLoc, KeyValue{
"InputDoubles", {
"/Event/MyVectorOfDoubles" } },
298 { KeyValue{
"OutputFractions", {
"/Event/MyVectorOfFractions" } },
299 KeyValue{
"OutputIntegers", {
"/Event/MyVectorOfIntegers" } } } ) {}
301 using MultiScalarTransformer::operator();
306 info() <<
"Converting " << d <<
" -> " << frac <<
", " << i <<
endmsg;
313 :
Gaudi::Functional::MultiScalarTransformer<
317 : MultiScalarTransformer(
name, svcLoc, KeyValue{
"InputDoubles", {
"/Event/MyVectorOfDoubles" } },
318 { KeyValue{
"OutputFractions", {
"/Event/OptMyVectorOfFractions" } },
319 KeyValue{
"OutputIntegers", {
"/Event/OptMyVectorOfIntegers" } } } ) {}
321 using MultiScalarTransformer::operator();
323 std::optional<std::tuple<double, int>>
operator()(
const double& d )
const {
325 info() <<
"Skipping " << d <<
endmsg;
330 info() <<
"Converting " << d <<
" -> " << frac <<
", " << i <<
endmsg;
337 :
Gaudi::Functional::ScalarTransformer<
340 : ScalarTransformer(
name, svcLoc,
341 { KeyValue{
"InputFractions", {
"/Event/MyVectorOfFractions" } },
342 KeyValue{
"InputIntegers", {
"/Event/MyVectorOfIntegers" } } },
343 { KeyValue{
"OutputDoubles", {
"/Event/MyNewVectorOfDoubles" } } } ) {}
345 using ScalarTransformer::operator();
349 info() <<
"Converting " << i <<
", " << frac <<
" -> " << d <<
endmsg;
360 : ScalarTransformer(
name, svcLoc,
361 { KeyValue{
"InputFractions", {
"/Event/MyVectorOfFractions" } },
362 KeyValue{
"InputIntegers", {
"/Event/MyVectorOfIntegers" } } },
363 { KeyValue{
"OutputDoubles", {
"/Event/MyOptVectorOfDoubles" } } } ) {}
365 using ScalarTransformer::operator();
367 std::optional<double>
operator()(
const double& frac,
const int& i )
const {
370 info() <<
"Skipping " << d <<
endmsg;
373 info() <<
"Converting " << i <<
", " << frac <<
" -> " << d <<
endmsg;
399 :
Producer(
name, svcLoc, KeyValue(
"OutputLocation",
"/Event/MyS" ) ) {}
403 for (
int i = 0; i <
j; ++i )
out.insert(
new S{} );
404 info() <<
"storing KeyedContainer of size " <<
out.size() <<
" into " << outputLocation() <<
endmsg;
419 {
"OutputLocation",
"/Event/MyConcatenatedIntFromSVector" } ) {}
425 for (
const auto& SVector : SVectors ) {
426 info() <<
"Concatening range of size " << SVector.size() <<
endmsg;
427 for (
auto*
s : SVector ) {
out.push_back(
s->a ); }
429 info() <<
"Storing output vector " <<
out <<
" to " << outputLocation() <<
endmsg;
444 auto nelements =
std::accumulate( intVectors.begin(), intVectors.end(), 0,
445 [](
const auto a,
const auto b ) { return a + b.size(); } );
446 info() <<
"sum of input sizes: " << nelements <<
endmsg;
448 for (
const auto& intVector : intVectors ) { info() <<
"Consuming vector " << intVector <<
endmsg; }
462 :
Base(
name, svcLoc, {
"InputLocations", {} } ) {}
466 auto nelements =
std::accumulate( intVectors.begin(), intVectors.end(), 0,
467 [](
const auto a,
const auto b ) { return a + b.size(); } );
468 info() <<
"sum of input sizes: " << nelements <<
endmsg;
470 for (
const auto& intVector : intVectors ) { info() <<
"Consuming vector " << intVector <<
endmsg; }
484 :
Producer(
name, pSvcLocator, KeyValue{
"TrackLocation",
"" } ){};
495 const
Gaudi::Functional::vector_of_const_<
std::
vector<
double>>& ),
499 : MergingMultiTransformer{
name,
501 { KeyValues{
"InputInts", {} }, KeyValues{
"InputDoubles", {} } },
502 { KeyValue{
"OutputInts",
"/Event/MySummedInts" },
503 KeyValue{
"OutputDoubles",
"/Event/MySummedDoubles" } } } {}
512 always() <<
" accumulated: " << is <<
endmsg;
515 always() <<
" accumulated: " << ds <<
endmsg;
536 :
Producer(
name, svcLoc, KeyValue(
"OutputLocation",
"/Event/MySharedFoo" ) ) {}
540 info() <<
"executing ShrdPtrProducer, storing shared_ptr<Foo> with payload at " << foo.get() <<
" and value "
541 << foo->i <<
" into " << outputLocation() <<
endmsg;
553 :
Consumer(
name, svcLoc, KeyValue(
"InputLocation",
"/Event/MySharedFoo" ) ) {}
556 info() <<
"executing ShrdPtrConsumer, got shared_ptr<Foo> with payload at " << foo.
get() <<
" with value "
557 << foo->
i <<
" from " << inputLocation() <<
endmsg;
std::vector< int > operator()(const Gaudi::Functional::vector_of_const_< Gaudi::Range_< std::vector< S const * >>> &SVectors) const override
void operator()(const Gaudi::Functional::vector_of_const_< std::vector< int >> &intVectors) const override
SRangesToIntVector(const std::string &name, ISvcLocator *svcLoc)
int operator()(const EventContext &ctx) const override
IntVectorsMergingConsumer(const std::string &name, ISvcLocator *svcLoc)
details::MergingTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MergingTransformer
details::Consumer< Signature, Traits_, details::isLegacy< Traits_ > > Consumer
std::vector< int > operator()(const Gaudi::Functional::vector_of_const_< std::vector< int >> &intVectors) const override
Foo & operator=(const Foo &)=delete
IntFloatToFloatData(const std::string &name, ISvcLocator *svcLoc)
IntVectorsToIntVector(const std::string &name, ISvcLocator *svcLoc)
KeyedObject()=default
Standard Constructor. The object key is preset to the invalid value.
T back_inserter(T... args)
S::Container operator()() const override
ShrdPtrProducer(const std::string &name, ISvcLocator *svcLoc)
VectorDataProducer(const std::string &name, ISvcLocator *svcLoc)
Base class to be used to extend an interface.
details::MergingTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MergingConsumer
details::ToolBinder< Signature, Traits_ > ToolBinder
FloatDataConsumer(const std::string &name, ISvcLocator *svcLoc)
SDataProducer(const std::string &name, ISvcLocator *svcLoc)
void operator()() const override
IntDataConsumer(const std::string &name, ISvcLocator *svcLoc)
std::shared_ptr< Foo > operator()() const override
long add(ContainedObject *pObject) override
ObjectContainerBase overload: Add an object to the container.
ShrdPtrConsumer(const std::string &name, ISvcLocator *svcLoc)
std::vector< double > operator()() const override
void operator()(const std::shared_ptr< Foo > &foo) const override
details::Producer< Signature, Traits_, details::isLegacy< Traits_ > > Producer
void operator()(const EventContext &ctx) const override
void operator()() const override
TwoDMerger(const std::string &name, ISvcLocator *svcLoc)
double * begin(CLHEP::HepVector &v)
KeyedDataProducer(const std::string &name, ISvcLocator *svcLoc)
std::tuple< float, float > operator()(const int &input1, const int &input2) const override
std::vector< int > operator()() const override
Base class from which all concrete algorithm classes should be derived.
ContextIntConsumer(const std::string &name, ISvcLocator *svcLoc)
float operator()(const int &input) const override
const ValueType & value() const
Backward compatibility (.
MyDataRange operator()() const override
void operator()(const float &input) const override
Concatenates a list of input vectors into a single output vector.
void operator()(const EventContext &ctx, const int &i) const override
ContextTransformer(const std::string &name, ISvcLocator *svcLoc)
template class KeyedContainer, KeyedContainer.h
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 of the templated KeyedObject class.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
void operator()(Gaudi::Functional::vector_of_const_< std::vector< int >> const &intVectors) const override
RangeProducer(const std::string &name, ISvcLocator *pSvcLocator)
Base class used to extend a class implementing other interfaces.
Header file for std:chrono::duration-based Counters.
IntToFloatData(const std::string &name, ISvcLocator *svcLoc)
details::MultiTransformer< Signature, Traits_, details::isLegacy< Traits_ > > MultiTransformer
struct GAUDI_API vector
Parametrisation class for vector-like implementation.
IntDataProducer(const std::string &name, ISvcLocator *svcLoc)
Gaudi::Property< int > m_value
#define DECLARE_COMPONENT(type)
Concatenates a list of input vectors into a single output vector.
details::Transformer< Signature, Traits_, details::isLegacy< Traits_ > > Transformer
Foo & operator=(Foo &&)=delete
IntVectorsMerger(const std::string &name, ISvcLocator *svcLoc)
KeyedObjectManager< hashmap > HashMap
Forward declaration of specialized std::hashmap-like object manager.
int operator()() const override
float operator()(const int &in1, const float &in2) const override
VectorDoubleProducer(const std::string &name, ISvcLocator *svcLoc)
void operator()(const int &input) const override
IntIntToFloatFloatData(const std::string &name, ISvcLocator *svcLoc)
int_container operator()() const override