Project
Loading...
Searching...
No Matches
o2::framework::WorkflowHelpers Struct Reference

A set of internal helper classes to manipulate a Workflow. More...

#include <WorkflowHelpers.h>

Static Public Member Functions

static std::vector< TopoIndexInfotopologicalSort (size_t nodeCount, int const *edgeIn, int const *edgeOut, size_t byteStride, size_t edgesCount)
 
static WorkflowParsingState verifyWorkflow (const WorkflowSpec &workflow)
 
static void injectServiceDevices (WorkflowSpec &workflow, ConfigContext &ctx)
 
static void adjustTopology (WorkflowSpec &workflow, ConfigContext const &ctx)
 
static void constructGraph (const WorkflowSpec &workflow, std::vector< DeviceConnectionEdge > &logicalEdges, std::vector< OutputSpec > &outputs, std::vector< LogicalForwardInfo > &availableForwardsInfo)
 
static void sortEdges (std::vector< size_t > &inEdgeIndex, std::vector< size_t > &outEdgeIndex, const std::vector< DeviceConnectionEdge > &edges)
 
static std::vector< EdgeActioncomputeOutEdgeActions (const std::vector< DeviceConnectionEdge > &edges, const std::vector< size_t > &index)
 
static std::vector< EdgeActioncomputeInEdgeActions (const std::vector< DeviceConnectionEdge > &edges, const std::vector< size_t > &index)
 
static std::tuple< std::vector< InputSpec >, std::vector< bool > > analyzeOutputs (WorkflowSpec const &workflow)
 
static std::vector< InputSpeccomputeDanglingOutputs (WorkflowSpec const &workflow)
 returns only dangling outputs
 
static void validateEdges (WorkflowSpec const &workflow, std::vector< DataProcessorPoliciesInfo > const &policiesInfos, std::vector< DeviceConnectionEdge > const &edges, std::vector< OutputSpec > const &outputs)
 

Detailed Description

A set of internal helper classes to manipulate a Workflow.

Definition at line 157 of file WorkflowHelpers.h.

Member Function Documentation

◆ adjustTopology()

void o2::framework::WorkflowHelpers::adjustTopology ( WorkflowSpec workflow,
ConfigContext const &  ctx 
)
static

If we get here all the inputs are sporadic and there is at least one sporadic input apart from the timers.

Definition at line 669 of file WorkflowHelpers.cxx.

◆ analyzeOutputs()

std::tuple< std::vector< InputSpec >, std::vector< bool > > o2::framework::WorkflowHelpers::analyzeOutputs ( WorkflowSpec const &  workflow)
static

Given workflow it gathers all the OutputSpec and in addition provides the information whether and output is dangling and/or of type AOD An Output is dangling if it does not have a corresponding InputSpec.

Returns
a vector of InputSpec of all outputs and a vector of bool wether the output is dangling

Prepare an index to do the iterations quickly.

Definition at line 991 of file WorkflowHelpers.cxx.

◆ computeDanglingOutputs()

std::vector< InputSpec > o2::framework::WorkflowHelpers::computeDanglingOutputs ( WorkflowSpec const &  workflow)
static

returns only dangling outputs

Definition at line 1056 of file WorkflowHelpers.cxx.

◆ computeInEdgeActions()

std::vector< EdgeAction > o2::framework::WorkflowHelpers::computeInEdgeActions ( const std::vector< DeviceConnectionEdge > &  edges,
const std::vector< size_t > &  index 
)
static

Definition at line 888 of file WorkflowHelpers.cxx.

◆ computeOutEdgeActions()

std::vector< EdgeAction > o2::framework::WorkflowHelpers::computeOutEdgeActions ( const std::vector< DeviceConnectionEdge > &  edges,
const std::vector< size_t > &  index 
)
static

Definition at line 869 of file WorkflowHelpers.cxx.

◆ constructGraph()

void o2::framework::WorkflowHelpers::constructGraph ( const WorkflowSpec workflow,
std::vector< DeviceConnectionEdge > &  logicalEdges,
std::vector< OutputSpec > &  outputs,
std::vector< LogicalForwardInfo > &  availableForwardsInfo 
)
static

Definition at line 754 of file WorkflowHelpers.cxx.

◆ injectServiceDevices()

void o2::framework::WorkflowHelpers::injectServiceDevices ( WorkflowSpec workflow,
ConfigContext ctx 
)
static

Analyze all ouputs

Definition at line 157 of file WorkflowHelpers.cxx.

◆ sortEdges()

void o2::framework::WorkflowHelpers::sortEdges ( std::vector< size_t > &  inEdgeIndex,
std::vector< size_t > &  outEdgeIndex,
const std::vector< DeviceConnectionEdge > &  edges 
)
static

Definition at line 909 of file WorkflowHelpers.cxx.

◆ topologicalSort()

std::vector< TopoIndexInfo > o2::framework::WorkflowHelpers::topologicalSort ( size_t  nodeCount,
int const *  edgeIn,
int const *  edgeOut,
size_t  byteStride,
size_t  edgesCount 
)
static

Topological sort for a graph of nodeCount nodes.

edgeIn pointer to the index of the input node for the first edge edgeOut pointer to the index of the out node for the first edge stride distance (in bytes) between the first and the second element the array holding the edges

Returns
an index vector for the nodeCount nodes, where the order is a topological sort according to the information provided in edges. The first element of the pair is the index in the nodes array, the second one is the layer in the topological sort.

Definition at line 52 of file WorkflowHelpers.cxx.

◆ validateEdges()

void o2::framework::WorkflowHelpers::validateEdges ( WorkflowSpec const &  workflow,
std::vector< DataProcessorPoliciesInfo > const &  policiesInfos,
std::vector< DeviceConnectionEdge > const &  edges,
std::vector< OutputSpec > const &  outputs 
)
static

Validate that the nodes at the ends of the edges of the graph are actually compatible with each other. For example we should make sure that Lifetime::Timeframe inputs of one node is not connected to an Output of Lifetime::Sporadic of another node.

Definition at line 1113 of file WorkflowHelpers.cxx.

◆ verifyWorkflow()

WorkflowParsingState o2::framework::WorkflowHelpers::verifyWorkflow ( const WorkflowSpec workflow)
static

Definition at line 935 of file WorkflowHelpers.cxx.


The documentation for this struct was generated from the following files: