Project
Loading...
Searching...
No Matches
WorkflowSpec.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11#ifndef O2_FRAMEWORK_WORKFLOWSPEC_H_
12#define O2_FRAMEWORK_WORKFLOWSPEC_H_
13
16
17#include <vector>
18#include <functional>
19#include <cstddef>
20
21namespace o2::framework
22{
23using WorkflowSpec = std::vector<DataProcessorSpec>;
24
29 size_t maxIndex,
30 std::function<void(DataProcessorSpec&, size_t id)> amendCallback);
31
36 size_t maxIndex,
37 std::function<void(DataProcessorSpec&, size_t id)> amendCallback);
38
73 size_t nPipelines,
74 std::function<size_t()> getNumberOfSubspecs,
75 std::function<size_t(size_t)> getSubSpec);
76
82 size_t maxIndex,
83 std::function<void(InputSpec&, size_t)> amendCallback);
84
90 size_t maxIndex,
91 std::function<void(InputSpec&, size_t)> amendCallback);
92
101 size_t count);
102
111std::vector<InputSpec> select(char const* matcher = "");
112
113namespace workflow
114{
115
126WorkflowSpec combine(const char* name, std::vector<DataProcessorSpec> const& specs, bool doIt);
127
128template <typename T, typename... ARGS>
129WorkflowSpec concat(T&& t, ARGS&&... args)
130{
131 if constexpr (sizeof...(args) == 0) {
132 return t;
133 } else {
134 auto rest = concat(std::forward<ARGS>(args)...);
135 // insert rest at the end of t
136 t.insert(t.end(), rest.begin(), rest.end());
137 return t;
138 }
139}
140} // namespace workflow
141
142} // namespace o2::framework
143
144#endif // O2_FRAMEWORK_WORKFLOWSPEC_H_
GLint GLsizei count
Definition glcorearb.h:399
GLuint const GLchar * name
Definition glcorearb.h:781
WorkflowSpec concat(T &&t, ARGS &&... args)
WorkflowSpec combine(const char *name, std::vector< DataProcessorSpec > const &specs, bool doIt)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
WorkflowSpec parallelPipeline(const WorkflowSpec &specs, size_t nPipelines, std::function< size_t()> getNumberOfSubspecs, std::function< size_t(size_t)> getSubSpec)
WorkflowSpec parallel(DataProcessorSpec original, size_t maxIndex, std::function< void(DataProcessorSpec &, size_t id)> amendCallback)
Inputs mergeInputs(InputSpec original, size_t maxIndex, std::function< void(InputSpec &, size_t)> amendCallback)
std::vector< DataProcessorSpec > WorkflowSpec
DataProcessorSpec timePipeline(DataProcessorSpec original, size_t count)
std::vector< InputSpec > select(char const *matcher="")
std::vector< InputSpec > Inputs
o2::framework::WorkflowSpec WorkflowSpec
size_t nPipelines