1+ // Copyright CERN and copyright holders of ALICE O2. This software is
2+ // distributed under the terms of the GNU General Public License v3 (GPL
3+ // Version 3), copied verbatim in the file "COPYING".
4+ //
5+ // See http://alice-o2.web.cern.ch/license for full licensing information.
6+ //
7+ // In applying this license CERN does not waive the privileges and immunities
8+ // granted to it by virtue of its status as an Intergovernmental Organization
9+ // or submit itself to any jurisdiction.
10+
11+ #include " Framework/ConfigParamSpec.h"
12+ #include " DataSampling/DataSampling.h"
13+ #include " Framework/CompletionPolicyHelpers.h"
14+ #include < vector>
15+
16+ using namespace o2 ::framework;
17+ using namespace o2 ::utilities;
18+
19+ void customize (std::vector<CompletionPolicy>& policies)
20+ {
21+ DataSampling::CustomizeInfrastructure (policies);
22+ }
23+
24+ void customize (std::vector<ChannelConfigurationPolicy>& policies)
25+ {
26+ DataSampling::CustomizeInfrastructure (policies);
27+ }
28+
29+ void customize (std::vector<ConfigParamSpec>& workflowOptions)
30+ {
31+ workflowOptions.push_back (ConfigParamSpec{" config" , VariantType::String, " " , {" path to the Data Sampling configuration file" }});
32+ workflowOptions.push_back (ConfigParamSpec{" dispatchers" , VariantType::Int, 1 , {" amount of parallel Dispatchers" }});
33+ }
34+
35+ #include " Framework/runDataProcessing.h"
36+
37+ WorkflowSpec defineDataProcessing (ConfigContext const & config)
38+ {
39+ auto configurationPath = config.options ().get <std::string>(" config" );
40+ auto numberOfDispatchers = config.options ().get <int >(" dispatchers" );
41+
42+ WorkflowSpec specs;
43+ DataSampling::GenerateInfrastructure (specs, configurationPath, numberOfDispatchers);
44+ return specs;
45+ }
0 commit comments