|
29 | 29 | #include "Framework/OutputObjHeader.h" |
30 | 30 | #include "Framework/TableTreeHelpers.h" |
31 | 31 | #include "Framework/StringHelpers.h" |
| 32 | +#include "Framework/ChannelSpec.h" |
| 33 | +#include "Framework/ExternalFairMQDeviceProxy.h" |
32 | 34 |
|
33 | 35 | #include "TFile.h" |
34 | 36 | #include "TTree.h" |
@@ -574,6 +576,30 @@ DataProcessorSpec |
574 | 576 | return spec; |
575 | 577 | } |
576 | 578 |
|
| 579 | +DataProcessorSpec CommonDataProcessors::getGlobalFairMQSink(std::vector<InputSpec> const& danglingOutputInputs) |
| 580 | +{ |
| 581 | + |
| 582 | + // we build the default channel configuration from the binding of the first input |
| 583 | + // in order to have more than one we would need to possibility to have support for |
| 584 | + // vectored options |
| 585 | + // use the OutputChannelSpec as a tool to create the default configuration for the out-of-band channel |
| 586 | + OutputChannelSpec externalChannelSpec; |
| 587 | + externalChannelSpec.name = "output_0_0"; |
| 588 | + externalChannelSpec.type = ChannelType::Push; |
| 589 | + externalChannelSpec.method = ChannelMethod::Bind; |
| 590 | + externalChannelSpec.hostname = "localhost"; |
| 591 | + externalChannelSpec.port = 0; |
| 592 | + externalChannelSpec.listeners = 0; |
| 593 | + // in principle, protocol and transport are two different things but fur simplicity |
| 594 | + // we use ipc when shared memory is selected and the normal tcp url whith zeromq, |
| 595 | + // this is for building the default configuration which can be simply changed from the |
| 596 | + // command line |
| 597 | + externalChannelSpec.protocol = ChannelProtocol::IPC; |
| 598 | + std::string defaultChannelConfig = formatExternalChannelConfiguration(externalChannelSpec); |
| 599 | + // at some point the formatting tool might add the transport as well so we have to check |
| 600 | + return specifyFairMQDeviceOutputProxy("internal-dpl-output-proxy", danglingOutputInputs, defaultChannelConfig.c_str()); |
| 601 | +} |
| 602 | + |
577 | 603 | DataProcessorSpec CommonDataProcessors::getDummySink(std::vector<InputSpec> const& danglingOutputInputs) |
578 | 604 | { |
579 | 605 | return DataProcessorSpec{ |
|
0 commit comments