Project
Loading...
Searching...
No Matches
test_DataSampling.cxx
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#define BOOST_TEST_MODULE Test Framework DataSampling
12#define BOOST_TEST_MAIN
13#define BOOST_TEST_DYN_LINK
14
15#include <boost/test/unit_test.hpp>
16
21
22#include "Headers/DataHeader.h"
23
24#include <Configuration/ConfigurationFactory.h>
25
26using namespace o2::framework;
27using namespace o2::utilities;
28using namespace o2::configuration;
29
33
34BOOST_AUTO_TEST_CASE(DataSamplingSimpleFlow)
35{
36 WorkflowSpec workflow{
37 {"producer",
38 Inputs{},
39 Outputs{{"TPC", "CLUSTERS"}}},
40 {"processingStage",
41 Inputs{{"dataTPC", "TPC", "CLUSTERS"}},
42 Outputs{{"TPC", "CLUSTERS_P"}}}};
43
44 std::string configFilePath = std::string(getenv("O2_ROOT")) + "/share/tests/test_DataSampling.json";
45 std::cout << "config file : "
46 << "json:/" << configFilePath << std::endl;
47 DataSampling::GenerateInfrastructure(workflow, "json:/" + configFilePath);
48
49 auto disp = std::find_if(workflow.begin(), workflow.end(),
50 [](const DataProcessorSpec& d) {
51 return d.name.find("Dispatcher") != std::string::npos;
52 });
53 BOOST_REQUIRE(disp != workflow.end());
54
55 auto input = std::find_if(disp->inputs.begin(), disp->inputs.end(),
56 [](const InputSpec& in) {
57 return DataSpecUtils::match(in, DataOrigin("TPC"), DataDescription("CLUSTERS"), 0) && in.lifetime == Lifetime::Timeframe;
58 });
59 BOOST_CHECK(input != disp->inputs.end());
60
61 input = std::find_if(disp->inputs.begin(), disp->inputs.end(),
62 [](const InputSpec& in) {
63 return DataSpecUtils::match(in, DataOrigin("TPC"), DataDescription("CLUSTERS_P"), 0) && in.lifetime == Lifetime::Timeframe;
64 });
65 BOOST_CHECK(input != disp->inputs.end());
66
67 // a policy which is switched off
68 input = std::find_if(disp->inputs.begin(), disp->inputs.end(),
69 [](const InputSpec& in) {
70 return DataSpecUtils::match(in, DataOrigin("Y"), DataDescription("Z"), 0) && in.lifetime == Lifetime::Timeframe;
71 });
72 BOOST_CHECK(input == disp->inputs.end());
73
74 auto output = std::find_if(disp->outputs.begin(), disp->outputs.end(),
75 [](const OutputSpec& out) {
76 return DataSpecUtils::match(out, ConcreteDataMatcher{"DS", "tpcclusters0", 0}) && out.lifetime == Lifetime::QA;
77 });
78 BOOST_CHECK(output != disp->outputs.end());
79
80 output = std::find_if(disp->outputs.begin(), disp->outputs.end(),
81 [](const OutputSpec& out) {
82 return DataSpecUtils::match(out, ConcreteDataMatcher{"DS", "tpcclusters1", 0}) && out.lifetime == Lifetime::QA;
83 });
84 BOOST_CHECK(output != disp->outputs.end());
85
86 BOOST_CHECK(disp->algorithm.onInit != nullptr);
87}
88
89BOOST_AUTO_TEST_CASE(DataSamplingParallelFlow)
90{
91 WorkflowSpec workflow{
92 {"producer",
93 Inputs{},
94 {OutputSpec{"TPC", "CLUSTERS", 0},
95 OutputSpec{"TPC", "CLUSTERS", 1},
96 OutputSpec{"TPC", "CLUSTERS", 2}}}};
97
98 auto processingStages = parallel(
100 "processingStage",
101 Inputs{{"dataTPC", "TPC", "CLUSTERS"}},
102 Outputs{{"TPC", "CLUSTERS_P"}}},
103 3,
104 [](DataProcessorSpec& spec, size_t index) {
107 });
108
109 workflow.insert(std::end(workflow), std::begin(processingStages), std::end(processingStages));
110
111 std::string configFilePath = std::string(getenv("O2_ROOT")) + "/share/tests/test_DataSampling.json";
112 DataSampling::GenerateInfrastructure(workflow, "json:/" + configFilePath);
113
114 for (int i = 0; i < 3; ++i) {
115 auto disp = std::find_if(workflow.begin(), workflow.end(),
116 [i](const DataProcessorSpec& d) {
117 return d.name.find("Dispatcher") != std::string::npos;
118 });
119 BOOST_REQUIRE(disp != workflow.end());
120
121 auto input = std::find_if(disp->inputs.begin(), disp->inputs.end(),
122 [i](const InputSpec& in) {
123 return DataSpecUtils::match(in, ConcreteDataMatcher{DataOrigin("TPC"), DataDescription("CLUSTERS"), static_cast<DataHeader::SubSpecificationType>(i)}) && in.lifetime == Lifetime::Timeframe;
124 });
125 BOOST_CHECK(input != disp->inputs.end());
126
127 input = std::find_if(disp->inputs.begin(), disp->inputs.end(),
128 [i](const InputSpec& in) {
129 return DataSpecUtils::match(in, ConcreteDataMatcher{DataOrigin("TPC"), DataDescription("CLUSTERS_P"), static_cast<DataHeader::SubSpecificationType>(i)}) && in.lifetime == Lifetime::Timeframe;
130 });
131 BOOST_CHECK(input != disp->inputs.end());
132
133 auto output = std::find_if(disp->outputs.begin(), disp->outputs.end(),
134 [](const OutputSpec& out) {
135 return DataSpecUtils::match(out, ConcreteDataMatcher{"DS", "tpcclusters0", 0}) && out.lifetime == Lifetime::QA;
136 });
137 BOOST_CHECK(output != disp->outputs.end());
138
139 output = std::find_if(disp->outputs.begin(), disp->outputs.end(),
140 [](const OutputSpec& out) {
141 return DataSpecUtils::match(out, ConcreteDataMatcher{"DS", "tpcclusters1", 0}) && out.lifetime == Lifetime::QA;
142 });
143 BOOST_CHECK(output != disp->outputs.end());
144
145 BOOST_CHECK(disp->algorithm.onInit != nullptr);
146 }
147}
148
149BOOST_AUTO_TEST_CASE(DataSamplingTimePipelineFlow)
150{
151 WorkflowSpec workflow{
152 {"producer",
153 Inputs{},
154 {OutputSpec{"TPC", "CLUSTERS", 0, Lifetime::Timeframe}}},
157 "processingStage",
158 Inputs{
159 {"dataTPC", "TPC", "CLUSTERS", 0, Lifetime::Timeframe}},
160 Outputs{
161 {"TPC", "CLUSTERS_P", 0, Lifetime::Timeframe}}},
162 3)};
163
164 std::string configFilePath = std::string(getenv("O2_ROOT")) + "/share/tests/test_DataSampling.json";
165 DataSampling::GenerateInfrastructure(workflow, "json:/" + configFilePath, 3);
166
167 auto disp = std::find_if(workflow.begin(), workflow.end(),
168 [](const DataProcessorSpec& d) {
169 return d.name.find("Dispatcher") != std::string::npos;
170 });
171
172 BOOST_REQUIRE(disp != workflow.end());
173 BOOST_CHECK_EQUAL(disp->inputs.size(), 4);
174 BOOST_CHECK_EQUAL(disp->outputs.size(), 3);
175 BOOST_CHECK(disp->algorithm.onInit != nullptr);
176 BOOST_CHECK_EQUAL(disp->maxInputTimeslices, 3);
177}
178
179BOOST_AUTO_TEST_CASE(InputSpecsForPolicy)
180{
181 std::string configFilePath = "json:/" + std::string(getenv("O2_ROOT")) + "/share/tests/test_DataSampling.json";
182 std::unique_ptr<ConfigurationInterface> config = ConfigurationFactory::getConfiguration(configFilePath);
183 auto policiesTree = config->getRecursive("dataSamplingPolicies");
184
185 {
186 std::vector<InputSpec> inputs = DataSampling::InputSpecsForPolicy(policiesTree, "tpcclusters");
187
188 BOOST_CHECK_EQUAL(inputs.size(), 2);
189 BOOST_CHECK(DataSpecUtils::match(inputs[0], ConcreteDataTypeMatcher{"DS", "tpcclusters0"}));
190 BOOST_CHECK_EQUAL(inputs[0].binding, "clusters");
191 BOOST_CHECK(DataSpecUtils::match(inputs[1], ConcreteDataTypeMatcher{"DS", "tpcclusters1"}));
192 BOOST_CHECK_EQUAL(inputs[1].binding, "clusters_p");
193 }
194 {
195 std::vector<InputSpec> inputs = DataSampling::InputSpecsForPolicy(policiesTree, "tpcraw");
196
197 BOOST_CHECK_EQUAL(inputs.size(), 1);
198 BOOST_CHECK(DataSpecUtils::match(inputs[0], ConcreteDataTypeMatcher{"TPC", "SMP_RAWDATA"}));
199 BOOST_CHECK_EQUAL(inputs[0].binding, "clusters");
200 }
201}
202
203BOOST_AUTO_TEST_CASE(OutputSpecsForPolicy)
204{
205 std::string configFilePath = "json:/" + std::string(getenv("O2_ROOT")) + "/share/tests/test_DataSampling.json";
206 std::unique_ptr<ConfigurationInterface> config = ConfigurationFactory::getConfiguration(configFilePath);
207 auto policiesTree = config->getRecursive("dataSamplingPolicies");
208
209 {
210 auto outputs = DataSampling::OutputSpecsForPolicy(policiesTree, "tpcclusters");
211
212 BOOST_REQUIRE_EQUAL(outputs.size(), 2);
213 BOOST_CHECK(DataSpecUtils::match(outputs[0], ConcreteDataTypeMatcher{"DS", "tpcclusters0"}));
214 BOOST_CHECK_EQUAL(outputs[0].binding.value, "clusters");
215 BOOST_CHECK(DataSpecUtils::match(outputs[1], ConcreteDataTypeMatcher{"DS", "tpcclusters1"}));
216 BOOST_CHECK_EQUAL(outputs[1].binding.value, "clusters_p");
217 }
218 {
219 auto outputs = DataSampling::OutputSpecsForPolicy(policiesTree, "tpcraw");
220
221 BOOST_REQUIRE_EQUAL(outputs.size(), 1);
222 BOOST_CHECK(DataSpecUtils::match(outputs[0], ConcreteDataTypeMatcher{"TPC", "SMP_RAWDATA"}));
223 BOOST_CHECK_EQUAL(outputs[0].binding.value, "clusters");
224 }
225}
226
227BOOST_AUTO_TEST_CASE(MultinodeUtilities)
228{
229 std::string configFilePath = "json:/" + std::string(getenv("O2_ROOT")) + "/share/tests/test_DataSampling.json";
230 std::unique_ptr<ConfigurationInterface> config = ConfigurationFactory::getConfiguration(configFilePath);
231 auto policiesTree = config->getRecursive("dataSamplingPolicies");
232
233 {
234 BOOST_CHECK_THROW(DataSampling::PortForPolicy(policiesTree, "no such policy"), std::runtime_error);
235 BOOST_CHECK_THROW(DataSampling::MachinesForPolicy(policiesTree, "no such policy"), std::runtime_error);
236 BOOST_CHECK_THROW(DataSampling::BindLocationForPolicy(policiesTree, "no such policy"), std::runtime_error);
237 }
238 {
239 auto port = DataSampling::PortForPolicy(policiesTree, "tpcclusters");
240 BOOST_CHECK(!port.has_value());
241 auto machines = DataSampling::MachinesForPolicy(policiesTree, "tpcclusters");
242 BOOST_CHECK(machines.empty());
243 }
244 {
245 auto port = DataSampling::PortForPolicy(policiesTree, "tpcraw");
246 BOOST_REQUIRE(port.has_value());
247 BOOST_CHECK_EQUAL(port.value(), 1234);
248 auto machines = DataSampling::MachinesForPolicy(policiesTree, "tpcraw");
249 BOOST_CHECK_EQUAL(machines.size(), 2);
250 }
251 {
252 BOOST_CHECK_EQUAL(DataSampling::BindLocationForPolicy(policiesTree, "tpcclusters"), "local");
253 BOOST_CHECK_EQUAL(DataSampling::BindLocationForPolicy(policiesTree, "tpcraw"), "remote");
254 }
255 {
256 // empty host -> match any policy
257 WorkflowSpec workflow;
258 DataSampling::GenerateInfrastructure(workflow, configFilePath, 1, "");
259
260 auto disp = std::find_if(workflow.begin(), workflow.end(),
261 [](const DataProcessorSpec& d) {
262 return d.name.find("Dispatcher") != std::string::npos;
263 });
264 BOOST_REQUIRE(disp != workflow.end());
265
266 auto input1 = std::find_if(disp->inputs.begin(), disp->inputs.end(),
267 [](const InputSpec& in) {
268 return DataSpecUtils::match(in, DataOrigin("TPC"), DataDescription("CLUSTERS"), 0) && in.lifetime == Lifetime::Timeframe;
269 });
270 BOOST_CHECK(input1 != disp->inputs.end());
271 auto input2 = std::find_if(disp->inputs.begin(), disp->inputs.end(),
272 [](const InputSpec& in) {
273 return DataSpecUtils::match(in, DataOrigin("TPC"), DataDescription("CLUSTERS_P"), 0) && in.lifetime == Lifetime::Timeframe;
274 });
275 BOOST_CHECK(input2 != disp->inputs.end());
276 auto input3 = std::find_if(disp->inputs.begin(), disp->inputs.end(),
277 [](const InputSpec& in) {
278 return DataSpecUtils::match(in, DataOrigin("TPC"), DataDescription("RAWDATA"), 0) && in.lifetime == Lifetime::Timeframe;
279 });
280 BOOST_CHECK(input3 != disp->inputs.end());
281 }
282 {
283 // mismatching host -> create only policies with empty machines list
284 WorkflowSpec workflow;
285 DataSampling::GenerateInfrastructure(workflow, configFilePath, 1, "mismatching host");
286
287 auto disp = std::find_if(workflow.begin(), workflow.end(),
288 [](const DataProcessorSpec& d) {
289 return d.name.find("Dispatcher") != std::string::npos;
290 });
291 BOOST_REQUIRE(disp != workflow.end());
292
293 auto input1 = std::find_if(disp->inputs.begin(), disp->inputs.end(),
294 [](const InputSpec& in) {
295 return DataSpecUtils::match(in, DataOrigin("TPC"), DataDescription("CLUSTERS"), 0) && in.lifetime == Lifetime::Timeframe;
296 });
297 BOOST_CHECK(input1 != disp->inputs.end());
298 auto input2 = std::find_if(disp->inputs.begin(), disp->inputs.end(),
299 [](const InputSpec& in) {
300 return DataSpecUtils::match(in, DataOrigin("TPC"), DataDescription("CLUSTERS_P"), 0) && in.lifetime == Lifetime::Timeframe;
301 });
302 BOOST_CHECK(input2 != disp->inputs.end());
303 }
304 {
305 // matching host -> create policies with empty machines list and the ones which match
306 WorkflowSpec workflow;
307 DataSampling::GenerateInfrastructure(workflow, configFilePath, 1, "machineA");
308
309 auto disp = std::find_if(workflow.begin(), workflow.end(),
310 [](const DataProcessorSpec& d) {
311 return d.name.find("Dispatcher") != std::string::npos;
312 });
313 BOOST_REQUIRE(disp != workflow.end());
314
315 auto input1 = std::find_if(disp->inputs.begin(), disp->inputs.end(),
316 [](const InputSpec& in) {
317 return DataSpecUtils::match(in, DataOrigin("TPC"), DataDescription("CLUSTERS"), 0) && in.lifetime == Lifetime::Timeframe;
318 });
319 BOOST_CHECK(input1 != disp->inputs.end());
320 auto input2 = std::find_if(disp->inputs.begin(), disp->inputs.end(),
321 [](const InputSpec& in) {
322 return DataSpecUtils::match(in, DataOrigin("TPC"), DataDescription("CLUSTERS_P"), 0) && in.lifetime == Lifetime::Timeframe;
323 });
324 BOOST_CHECK(input2 != disp->inputs.end());
325 auto input3 = std::find_if(disp->inputs.begin(), disp->inputs.end(),
326 [](const InputSpec& in) {
327 return DataSpecUtils::match(in, DataOrigin("TPC"), DataDescription("RAWDATA"), 0) && in.lifetime == Lifetime::Timeframe;
328 });
329 BOOST_CHECK(input3 != disp->inputs.end());
330 }
331}
332
333BOOST_AUTO_TEST_CASE(DataSamplingEmptyConfig)
334{
335 std::string configFilePath = "json:/" + std::string(getenv("O2_ROOT")) + "/share/tests/test_DataSamplingEmpty.json";
336
337 WorkflowSpec workflow;
339}
340
341BOOST_AUTO_TEST_CASE(DataSamplingOverlappingInputs)
342{
343 {
344 // policy3 includes 1 and 2, so we should have only one inputspec for data, one for timer
345 Dispatcher dispatcher("dispatcher", "");
346 auto policy1 = std::make_unique<DataSamplingPolicy>("policy1");
347 policy1->registerPath({"vcxz", "TST", "AAAA", 0}, {{"erwv"}, "DS", "AAAA"});
348
349 auto policy2 = std::make_unique<DataSamplingPolicy>("policy2");
350 policy2->registerPath({"fdsa", "TST", "AAAA", 0}, {{"fdsf"}, "DS", "BBBB"});
351
352 auto policy3 = std::make_unique<DataSamplingPolicy>("policy3");
353 policy3->registerPath({"asdf", {"TST", "AAAA"}}, {{"erwv"}, "DS", "CCCC"});
354
355 dispatcher.registerPolicy(std::move(policy1));
356 dispatcher.registerPolicy(std::move(policy2));
357 dispatcher.registerPolicy(std::move(policy3));
358
359 auto inputs = dispatcher.getInputSpecs();
360
361 BOOST_REQUIRE_EQUAL(inputs.size(), 2);
362 BOOST_CHECK_EQUAL(inputs[0], (InputSpec{"asdf", {"TST", "AAAA"}}));
363 BOOST_CHECK_EQUAL(inputs[1], (InputSpec{"timer-stats", "DS", "TIMER-dispatcher", 0, Lifetime::Timer}));
364 }
365
366 {
367 // policy3 includes 1 and 2, so we should have only one inputspec for data, one for timer
368 // same as before, but different order of registration
369 Dispatcher dispatcher("dispatcher", "");
370 auto policy1 = std::make_unique<DataSamplingPolicy>("policy1");
371 policy1->registerPath({"vcxz", "TST", "AAAA", 0}, {{"erwv"}, "DS", "AAAA"});
372
373 auto policy2 = std::make_unique<DataSamplingPolicy>("policy2");
374 policy2->registerPath({"fdsa", "TST", "AAAA", 0}, {{"fdsf"}, "DS", "BBBB"});
375
376 auto policy3 = std::make_unique<DataSamplingPolicy>("policy3");
377 policy3->registerPath({"asdf", {"TST", "AAAA"}}, {{"erwv"}, "DS", "CCCC"});
378
379 dispatcher.registerPolicy(std::move(policy3));
380 dispatcher.registerPolicy(std::move(policy1));
381 dispatcher.registerPolicy(std::move(policy2));
382
383 auto inputs = dispatcher.getInputSpecs();
384
385 BOOST_REQUIRE_EQUAL(inputs.size(), 2);
386 BOOST_CHECK_EQUAL(inputs[0], (InputSpec{"asdf", {"TST", "AAAA"}}));
387 BOOST_CHECK_EQUAL(inputs[1], (InputSpec{"timer-stats", "DS", "TIMER-dispatcher", 0, Lifetime::Timer}));
388 }
389
390 {
391 // three different inputs + timer
392 Dispatcher dispatcher("dispatcher", "");
393 auto policy1 = std::make_unique<DataSamplingPolicy>("policy1");
394 policy1->registerPath({"vcxz", "TST", "AAAA", 0}, {{"erwv"}, "DS", "AAAA"});
395
396 auto policy2 = std::make_unique<DataSamplingPolicy>("policy2");
397 policy2->registerPath({"sfsd", "TST", "BBBB", 0}, {{"fdsf"}, "DS", "BBBB"});
398
399 auto policy3 = std::make_unique<DataSamplingPolicy>("policy3");
400 policy3->registerPath({"asdf", {"TST", "CCCC"}}, {{"erwv"}, "DS", "CCCC"});
401
402 dispatcher.registerPolicy(std::move(policy1));
403 dispatcher.registerPolicy(std::move(policy2));
404 dispatcher.registerPolicy(std::move(policy3));
405
406 auto inputs = dispatcher.getInputSpecs();
407
408 BOOST_REQUIRE_EQUAL(inputs.size(), 4);
409 BOOST_CHECK_EQUAL(inputs[0], (InputSpec{"vcxz", "TST", "AAAA"}));
410 BOOST_CHECK_EQUAL(inputs[1], (InputSpec{"sfsd", "TST", "BBBB"}));
411 BOOST_CHECK_EQUAL(inputs[2], (InputSpec{"asdf", {"TST", "CCCC"}}));
412 BOOST_CHECK_EQUAL(inputs[3], (InputSpec{"timer-stats", "DS", "TIMER-dispatcher", 0, Lifetime::Timer}));
413 }
414
415 {
416 // two policies with one common concrete data spec
417 Dispatcher dispatcher("dispatcher", "");
418 auto policy1 = std::make_unique<DataSamplingPolicy>("policy1");
419 policy1->registerPath({"random", "TST", "AAAA", 0}, {{"erwv"}, "DS", "XYZ", 0});
420
421 auto policy2 = std::make_unique<DataSamplingPolicy>("policy2");
422 policy2->registerPath({"random0", "TST", "AAAA", 0}, {{"fdsf"}, "DS", "BBBB", 0});
423 policy2->registerPath({"random1", "TST", "AAAA", 1}, {{"fdsf"}, "DS", "BBBB", 1});
424
425 dispatcher.registerPolicy(std::move(policy1));
426 dispatcher.registerPolicy(std::move(policy2));
427
428 auto inputs = dispatcher.getInputSpecs();
429
430 BOOST_REQUIRE_EQUAL(inputs.size(), 3);
431 BOOST_CHECK_EQUAL(inputs[0], (InputSpec{"random0", "TST", "AAAA", 0}));
432 BOOST_CHECK_EQUAL(inputs[1], (InputSpec{"random1", "TST", "AAAA", 1}));
433 BOOST_CHECK_EQUAL(inputs[2], (InputSpec{"timer-stats", "DS", "TIMER-dispatcher", 0, Lifetime::Timer}));
434 }
435}
std::string binding
A declaration of O2 Data Sampling Policy.
Definition of O2 Data Sampling, v1.0.
Declaration of Dispatcher for O2 Data Sampling.
int32_t i
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events d
void output(const std::map< std::string, ChannelStat > &channels)
Definition rawdump.cxx:197
static std::string BindLocationForPolicy(const boost::property_tree::ptree &policiesTree, const std::string &policyName)
Says if remote part (e.g. QC server) should bind the inter-machine channel, according to the configur...
static std::optional< uint16_t > PortForPolicy(const boost::property_tree::ptree &policiesTree, const std::string &policyName)
Provides the port to be used for a proxy of given DataSamplingPolicy. Expects the "dataSamplingPolici...
static void GenerateInfrastructure(framework::WorkflowSpec &workflow, const std::string &policiesSource, size_t threads=1, const std::string &host="")
Generates data sampling infrastructure.
static std::vector< framework::InputSpec > InputSpecsForPolicy(const boost::property_tree::ptree &policiesTree, const std::string &policyName)
Provides InputSpecs to receive data for given DataSamplingPolicy. Expects the "dataSamplingPolicies" ...
static std::vector< std::string > MachinesForPolicy(const boost::property_tree::ptree &policiesTree, const std::string &policyName)
Provides the machines where given DataSamplingPolicy is enabled. Expects the "dataSamplingPolicies" t...
static std::vector< framework::OutputSpec > OutputSpecsForPolicy(const boost::property_tree::ptree &policiesTree, const std::string &policyName)
Provides OutputSpecs of given DataSamplingPolicy. Expects the "dataSamplingPolicies" tree.
void registerPolicy(std::unique_ptr< DataSamplingPolicy > &&)
Register a Data Sampling Policy.
framework::Inputs getInputSpecs()
Assembles InputSpecs of all registered policies in a single vector, removing overlapping entries.
GLuint index
Definition glcorearb.h:781
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
WorkflowSpec parallel(DataProcessorSpec original, size_t maxIndex, std::function< void(DataProcessorSpec &, size_t id)> amendCallback)
std::vector< DataProcessorSpec > WorkflowSpec
DataProcessorSpec timePipeline(DataProcessorSpec original, size_t count)
std::vector< InputSpec > Inputs
std::vector< OutputSpec > Outputs
Descriptor< gSizeDataDescriptionString > DataDescription
Definition DataHeader.h:554
BOOST_AUTO_TEST_CASE(Descriptor_test)
Descriptor< gSizeDataOriginString > DataOrigin
Definition DataHeader.h:553
A header which contains some meta-data generated by Data Sampling.
static void updateMatchingSubspec(InputSpec &in, header::DataHeader::SubSpecificationType subSpec)
static bool match(InputSpec const &spec, ConcreteDataMatcher const &target)
enum Lifetime lifetime
Definition InputSpec.h:73
the main header struct
Definition DataHeader.h:623
BOOST_CHECK_NO_THROW(algorithm::merge(target, other))
BOOST_CHECK(tree)
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())