Project
Loading...
Searching...
No Matches
ccdb-populator-workflow.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
13#include "CCDBPopulatorSpec.h"
16
17using namespace o2::framework;
18
19// we need to add workflow options before including Framework/runDataProcessing
20void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
21{
22 // option allowing to set parameters
23 std::vector<o2::framework::ConfigParamSpec> options{
24 {"name-extention", VariantType::String, "", {"optional extention of device name"}},
25 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}};
26
27 std::swap(workflowOptions, options);
28}
29
30// we need to add workflow options before including Framework/runDataProcessing
31void customize(std::vector<o2::framework::CompletionPolicy>& policies)
32{
33 // we customize the pipeline processors to consume data as it comes
36 auto& pol = policies.emplace_back(CompletionPolicyHelpers::defineByName("ccdb-populator.*", CompletionPolicy::CompletionOp::Consume));
37 pol.order = CompletionPolicy::CompletionOrder::Slot;
38}
39
40// ------------------------------------------------------------------
41
43
45{
46 WorkflowSpec specs;
47 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
48 specs.emplace_back(getCCDBPopulatorDeviceSpec(o2::base::NameConf::getCCDBServer(), configcontext.options().get<std::string>("name-extention")));
49 return specs;
50}
Definition of the Names Generator class.
void customize(std::vector< o2::framework::ConfigParamSpec > &workflowOptions)
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
static std::string getCCDBServer()
Definition NameConf.cxx:110
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
Helper class which holds commonly used policies.
static CompletionPolicy defineByName(std::string const &name, CompletionPolicy::CompletionOp op)