16#include <fairmq/Device.h>
28 fair::mq::Parts parts;
29 fair::mq::MessagePtr payload(device.NewMessage());
31 sih.
state = InputChannelState::Completed;
39 auto channelAlloc = o2::pmr::getTransportAllocator(device.GetChannel(channel, 0).Transport());
43 parts.AddPart(std::move(
header));
44 parts.AddPart(std::move(payload));
45 device.Send(parts, channel, 0);
53 .outputs = {
OutputSpec{
"TST",
"A", 0, Lifetime::OutOfBand}},
56 for (
auto& channel : service.
device()->GetChannels()) {
57 LOG(info) << channel.first;
59 std::this_thread::sleep_for(std::chrono::seconds(rand() % 2));
60 auto msg = service.
device()->NewMessageFor(
"downstream", 0, 1000);
72 auto channelAlloc = o2::pmr::getTransportAllocator(service.
device()->GetChannels()[
"downstream"][0].Transport());
73 fair::mq::MessagePtr headerMessage =
o2::pmr::getMessage(std::move(headerStack), channelAlloc);
76 out.AddPart(std::move(headerMessage));
77 out.AddPart(std::move(
msg));
80 service.
device()->Send(out,
"downstream", 0);
std::vector< std::string > header
virtual fair::mq::Device * device()=0
Defining ITS Vertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
AlgorithmSpec::ProcessCallback adaptStateless(LAMBDA l)
fair::mq::MessagePtr getMessage(ContainerT &&container, FairMQMemoryResource *targetResource=nullptr)
void sendEndOfStream(fair::mq::Device &device, std::string channel)
WorkflowSpec defineDataProcessing(ConfigContext const &)
This function hooks up the the workflow specifications into the DPL driver.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
uint64_t const void const *restrict const msg