Project
Loading...
Searching...
No Matches
dataSamplingStandalone.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
15#include <vector>
16
17using namespace o2::framework;
18using namespace o2::utilities;
19
20void customize(std::vector<CompletionPolicy>& policies)
21{
23}
24
25void customize(std::vector<ChannelConfigurationPolicy>& policies)
26{
28}
29
30void customize(std::vector<ConfigParamSpec>& workflowOptions)
31{
32 workflowOptions.push_back(ConfigParamSpec{"config", VariantType::String, "", {"path to the Data Sampling configuration file"}});
33 workflowOptions.push_back(ConfigParamSpec{"dispatchers", VariantType::Int, 1, {"amount of parallel Dispatchers"}});
34}
35
37
39{
40 auto configurationPath = config.options().get<std::string>("config");
41 auto numberOfDispatchers = config.options().get<int>("dispatchers");
42
43 WorkflowSpec specs;
44 DataSampling::GenerateInfrastructure(specs, configurationPath, numberOfDispatchers);
45 return specs;
46}
Definition of O2 Data Sampling, v1.0.
ConfigParamRegistry & options() const
static void CustomizeInfrastructure(std::vector< framework::CompletionPolicy > &)
Configures dispatcher to consume any data immediately.
static void GenerateInfrastructure(framework::WorkflowSpec &workflow, const std::string &policiesSource, size_t threads=1, const std::string &host="")
Generates data sampling infrastructure.
void customize(std::vector< CompletionPolicy > &policies)
WorkflowSpec defineDataProcessing(ConfigContext const &config)
This function hooks up the the workflow specifications into the DPL driver.
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
A header which contains some meta-data generated by Data Sampling.