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
12
#include "
Framework/DataProcessorSpec.h
"
13
#include "
CCDBPopulatorSpec.h
"
14
#include "
CommonUtils/ConfigurableParam.h
"
15
#include "
CommonUtils/NameConf.h
"
16
#include <regex>
17
18
using namespace
o2::framework
;
19
20
// we need to add workflow options before including Framework/runDataProcessing
21
void
customize
(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
22
{
23
// option allowing to set parameters
24
std::vector<o2::framework::ConfigParamSpec> options{
25
{
"name-extention"
, VariantType::String,
""
, {
"optional extention of device name"
}},
26
{
"configKeyValues"
, VariantType::String,
""
, {
"Semicolon separated key=value strings"
}}};
27
28
std::swap(workflowOptions, options);
29
}
30
31
// we need to add workflow options before including Framework/runDataProcessing
32
void
customize
(std::vector<o2::framework::CompletionPolicy>& policies)
33
{
34
// we customize the pipeline processors to consume data as it comes
35
using
CompletionPolicy
=
o2::framework::CompletionPolicy
;
36
using
CompletionPolicyHelpers
=
o2::framework::CompletionPolicyHelpers
;
37
auto
matcher = [](
o2::framework::DeviceSpec
const
& device) ->
bool
{
38
return
std::regex_match(device.name.begin(), device.name.end(), std::regex(
"ccdb-populator.*"
));
39
};
40
auto
& pol = policies.emplace_back(
CompletionPolicyHelpers::consumeWhenAll
(
"ccdb-populator-consume-all"
, matcher));
41
pol.order = CompletionPolicy::CompletionOrder::Slot;
42
}
43
44
// ------------------------------------------------------------------
45
46
#include "
Framework/runDataProcessing.h
"
47
48
WorkflowSpec
defineDataProcessing
(
ConfigContext
const
& configcontext)
49
{
50
WorkflowSpec
specs;
51
o2::conf::ConfigurableParam::updateFromString
(configcontext.
options
().
get
<std::string>(
"configKeyValues"
));
52
specs.emplace_back(getCCDBPopulatorDeviceSpec(
o2::base::NameConf::getCCDBServer
(), configcontext.
options
().
get
<std::string>(
"name-extention"
)));
53
return
specs;
54
}
CCDBPopulatorSpec.h
ConfigurableParam.h
DataProcessorSpec.h
NameConf.h
Definition of the Names Generator class.
customize
void customize(std::vector< o2::framework::ConfigParamSpec > &workflowOptions)
Definition
ccdb-populator-workflow.cxx:21
defineDataProcessing
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
Definition
ccdb-populator-workflow.cxx:48
o2::base::NameConf::getCCDBServer
static std::string getCCDBServer()
Definition
NameConf.cxx:115
o2::conf::ConfigurableParam::updateFromString
static void updateFromString(std::string const &)
Definition
ConfigurableParam.cxx:999
o2::framework::ConfigContext
Definition
ConfigContext.h:24
o2::framework::ConfigContext::options
ConfigParamRegistry & options() const
Definition
ConfigContext.h:28
o2::framework::ConfigParamRegistry::get
T get(const char *key) const
Definition
ConfigParamRegistry.h:98
o2::framework
Defining ITS Vertex explicitly as messageable.
Definition
Cartesian.h:288
o2::framework::WorkflowSpec
std::vector< DataProcessorSpec > WorkflowSpec
Definition
HBFUtilsInitializer.h:39
runDataProcessing.h
o2::framework::CompletionPolicyHelpers
Helper class which holds commonly used policies.
Definition
CompletionPolicyHelpers.h:25
o2::framework::CompletionPolicyHelpers::consumeWhenAll
static CompletionPolicy consumeWhenAll(const char *name, CompletionPolicy::Matcher matcher)
Default Completion policy. When all the parts of a record have arrived, consume them.
Definition
CompletionPolicyHelpers.cxx:112
o2::framework::CompletionPolicy
Definition
CompletionPolicy.h:34
o2::framework::DeviceSpec
Definition
DeviceSpec.h:48
Detectors
Calibration
workflow
ccdb-populator-workflow.cxx
Generated on Mon Aug 24 2026 09:27:13 for Project by
1.9.8