cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
BoostTreeUtils.h
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2020-2024 Laurent Forthomme
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef CepGenAddOns_BoostWrapper_BoostTreeUtils_h
20#define CepGenAddOns_BoostWrapper_BoostTreeUtils_h
21
22#include <boost/property_tree/ptree.hpp>
23
24namespace cepgen {
25 class RunParameters;
26 class ParametersDescription;
27} // namespace cepgen
28
29namespace boost {
30 namespace pt = property_tree;
31 namespace cepgen {
32 static constexpr const char* DAUGH_KEY = "DAUGHTER";
33 static constexpr const char* MIN_KEY = "min";
34 static constexpr const char* MAX_KEY = "max";
35
36 void add(::cepgen::ParametersList&, const std::string&, const pt::ptree&);
37
38 pt::ptree pack(const ::cepgen::RunParameters&);
39 pt::ptree pack(const ::cepgen::ParametersDescription&);
40 pt::ptree pack(const ::cepgen::ParametersList&);
41 template <typename T>
42 pt::ptree pack(const std::vector<T>&);
43 template <>
44 pt::ptree pack(const std::vector<::cepgen::ParametersList>&);
45 template <>
46 pt::ptree pack(const std::vector<double>&);
47 pt::ptree pack(const ::cepgen::Limits&);
48
49 ::cepgen::ParametersList unpack(const pt::ptree&);
50 } // namespace cepgen
51} // namespace boost
52
53#endif
::cepgen::ParametersList unpack(const pt::ptree &tree)
static constexpr const char * MIN_KEY
static constexpr const char * MAX_KEY
static constexpr const char * DAUGH_KEY
pt::ptree pack(const ::cepgen::RunParameters &)
void add(::cepgen::ParametersList &base, const std::string &name, const pt::ptree &tree)
Common namespace for this Monte Carlo generator.