19 #include <momemta/Configuration.h> 20 #include <momemta/ConfigurationReader.h> 21 #include <momemta/ParameterSet.h> 23 #include <ExecutionPath.h> 48 modules = other.modules;
49 if (other.global_parameters)
50 global_parameters.reset(other.global_parameters->clone());
51 if (other.cuba_configuration)
52 cuba_configuration.reset(other.cuba_configuration->clone());
53 integrands = other.integrands;
55 n_dimensions = other.n_dimensions;
56 inputs = other.inputs;
60 modules = std::move(other.modules);
61 global_parameters = std::move(other.global_parameters);
62 cuba_configuration = std::move(other.cuba_configuration);
63 integrands = std::move(other.integrands);
64 paths = std::move(other.paths);
65 n_dimensions = other.n_dimensions;
66 inputs = std::move(other.inputs);
70 std::swap(*
this, other);
79 return *cuba_configuration;
83 return *global_parameters;
105 c.global_parameters->freeze();
106 c.cuba_configuration->freeze();
107 for (
auto& module: c.modules) {
108 module.parameters->freeze();
110 module.parameters->setGlobalParameters(*c.global_parameters);
116 auto insert_internal_module = [&c](
const std::string&
type,
117 const std::string&
name,
124 c.modules.push_back(internal_module);
128 insert_internal_module(
"_cuba",
"cuba",
ParameterSet());
131 for (
const auto& input: inputs) {
132 insert_internal_module(
"_input", input,
ParameterSet());
138 pset.
set(
"integrands", integrands);
139 insert_internal_module(
"_momemta",
"momemta", pset);
Configuration(const Configuration &)
Copy constructor.
size_t getNDimensions() const
std::string name
Name of the module (user-defined from the configuration file)
const ParameterSet & getGlobalParameters() const
std::shared_ptr< ParameterSet > parameters
Module's parameters, as parsed from the configuration file.
std::enable_if< std::is_same< T, bool >::value||std::is_same< T, InputTag >::value >::type set(const std::string &name, const T &value)
Change the value of a given parameter. If the parameter does not exist, it's first created...
std::vector< std::shared_ptr< ExecutionPath > > getPaths() const
const ParameterSet & getCubaConfiguration() const
std::vector< InputTag > getIntegrands() const
std::vector< std::string > getInputs() const
A class encapsulating a lua table.
A frozen snapshot of the configuration file.
A module declaration, defined from the configuration file.
const std::vector< ModuleDecl > & getModules() const