Project
Loading...
Searching...
No Matches
ConfigurationOptionsRetriever.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
#include "
ConfigurationOptionsRetriever.h
"
12
13
#include "Configuration/ConfigurationInterface.h"
14
#include "
Framework/ConfigParamSpec.h
"
15
#include "
PropertyTreeHelpers.h
"
16
17
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
18
#include <boost/program_options.hpp>
19
#include <boost/property_tree/ptree.hpp>
20
#include <boost/property_tree/json_parser.hpp>
21
22
#include <string>
23
#include <vector>
24
#include <iostream>
25
26
using namespace
o2::framework
;
27
using namespace
o2::configuration
;
28
namespace
bpo
=
boost::program_options
;
29
namespace
bpt = boost::property_tree;
30
31
namespace
o2::framework
32
{
33
34
ConfigurationOptionsRetriever::ConfigurationOptionsRetriever
(
ConfigurationInterface
* cfg,
35
std::string
const
& mainKey)
36
: mCfg{cfg},
37
mMainKey{mainKey}
38
{
39
}
40
41
void
ConfigurationOptionsRetriever::update
(std::vector<ConfigParamSpec>
const
& schema,
42
boost::property_tree::ptree& store,
43
boost::property_tree::ptree& provenance)
44
{
45
boost::property_tree::ptree in;
46
try
{
47
in = mCfg->getRecursive(mMainKey);
48
}
catch
(...) {
49
in.clear();
50
}
51
PropertyTreeHelpers::populate
(schema, store, in, provenance,
"configuration:"
+ mMainKey);
52
}
53
54
}
// namespace o2::framework
ConfigParamSpec.h
ConfigurationOptionsRetriever.h
ConfigurationInterface
o2::configuration::ConfigurationInterface ConfigurationInterface
Definition
DataProcessingDevice.cxx:96
PropertyTreeHelpers.h
o2::framework::ConfigurationOptionsRetriever::update
void update(std::vector< ConfigParamSpec > const &schema, boost::property_tree::ptree &store, boost::property_tree::ptree &provenance) override
Definition
ConfigurationOptionsRetriever.cxx:41
o2::framework::ConfigurationOptionsRetriever::ConfigurationOptionsRetriever
ConfigurationOptionsRetriever(configuration::ConfigurationInterface *cfg, std::string const &mainKey)
Definition
ConfigurationOptionsRetriever.cxx:34
boost::program_options
Definition
BoostOptionsRetriever.h:24
o2::configuration
Definition
ConfigurationOptionsRetriever.h:23
o2::framework
Defining PrimaryVertex explicitly as messageable.
Definition
TFIDInfo.h:20
o2::framework::PropertyTreeHelpers::populate
static void populate(std::vector< ConfigParamSpec > const &schema, boost::property_tree::ptree &tree, boost::program_options::variables_map const &vmap, boost::property_tree::ptree &provenance)
Definition
PropertyTreeHelpers.cxx:138
Framework
Core
src
ConfigurationOptionsRetriever.cxx
Generated on Tue Feb 25 2025 23:16:39 for Project by
1.9.8