11#ifndef O2_FRAMEWORK_DATAPROCESSINGHELPERS_H_
12#define O2_FRAMEWORK_DATAPROCESSINGHELPERS_H_
17#include <fairmq/FwdDecls.h>
23struct ServiceRegistryRef;
24struct ForwardChannelInfo;
25struct ForwardChannelState;
26struct OutputChannelInfo;
27struct OutputChannelSpec;
28struct OutputChannelState;
29struct ProcessingPolicies;
31struct FairMQDeviceProxy;
58 bool copy,
bool consume);
61 bool copy,
bool consume);
Defining PrimaryVertex explicitly as messageable.
Generic helpers for DataProcessing releated functions.
static bool hasOnlyGenerated(DeviceSpec const &spec)
check if spec is a source devide
static TransitionHandlingState updateStateTransition(ServiceRegistryRef const &ref, ProcessingPolicies const &policies)
starts the EoS timers and returns the new TransitionHandlingState in case as new state is requested
static std::vector< fair::mq::Parts > routeForwardedMessageSet(FairMQDeviceProxy &proxy, std::vector< MessageSet > ¤tSetOfInputs, bool copy, bool consume)
Helper to route messages for forwarding.
static void switchState(ServiceRegistryRef const &ref, StreamingState newState)
change the device StreamingState to newState
static void sendEndOfStream(ServiceRegistryRef const &ref, OutputChannelSpec const &channel)
static bool sendOldestPossibleTimeframe(ServiceRegistryRef const &ref, ForwardChannelInfo const &info, ForwardChannelState &state, size_t timeslice)
static void cleanForwardedMessages(std::span< fair::mq::MessagePtr > ¤tSetOfInputs, bool consume)
static void broadcastOldestPossibleTimeslice(ServiceRegistryRef const &ref, size_t timeslice)
Broadcast the oldest possible timeslice to all channels in output.
static void routeForwardedMessages(FairMQDeviceProxy &proxy, std::span< fair::mq::MessagePtr > ¤tSetOfInputs, std::vector< fair::mq::Parts > &forwardedParts, bool copy, bool consume)
Helper to route messages for forwarding.
Forward channel information.
Output channel information.