A set of internal helper classes to manipulate a Workflow.
More...
#include <WorkflowHelpers.h>
|
| static std::vector< TopoIndexInfo > | topologicalSort (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 | injectAODWriter (WorkflowSpec &workflow, ConfigContext const &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< EdgeAction > | computeOutEdgeActions (const std::vector< DeviceConnectionEdge > &edges, const std::vector< size_t > &index) |
| |
| static std::vector< EdgeAction > | computeInEdgeActions (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< InputSpec > | computeDanglingOutputs (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) |
| |
A set of internal helper classes to manipulate a Workflow.
Definition at line 157 of file WorkflowHelpers.h.
◆ adjustTopology()
If we get here all the inputs are sporadic and there is at least one sporadic input apart from the timers.
Definition at line 593 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 944 of file WorkflowHelpers.cxx.
◆ computeDanglingOutputs()
| std::vector< InputSpec > o2::framework::WorkflowHelpers::computeDanglingOutputs |
( |
WorkflowSpec const & |
workflow | ) |
|
|
static |
◆ computeInEdgeActions()
| std::vector< EdgeAction > o2::framework::WorkflowHelpers::computeInEdgeActions |
( |
const std::vector< DeviceConnectionEdge > & |
edges, |
|
|
const std::vector< size_t > & |
index |
|
) |
| |
|
static |
◆ computeOutEdgeActions()
| std::vector< EdgeAction > o2::framework::WorkflowHelpers::computeOutEdgeActions |
( |
const std::vector< DeviceConnectionEdge > & |
edges, |
|
|
const std::vector< size_t > & |
index |
|
) |
| |
|
static |
◆ constructGraph()
◆ injectAODWriter()
◆ injectServiceDevices()
◆ sortEdges()
| void o2::framework::WorkflowHelpers::sortEdges |
( |
std::vector< size_t > & |
inEdgeIndex, |
|
|
std::vector< size_t > & |
outEdgeIndex, |
|
|
const std::vector< DeviceConnectionEdge > & |
edges |
|
) |
| |
|
static |
◆ 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()
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 1066 of file WorkflowHelpers.cxx.
◆ verifyWorkflow()
The documentation for this struct was generated from the following files: