cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
ConfigWriter.h
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2021-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_PythonWrapper_ConfigWriter_h
20#define CepGenAddOns_PythonWrapper_ConfigWriter_h
21
23
24namespace cepgen {
25 class RunParameters;
26 class ParametersDescription;
27 namespace python {
29 class ConfigWriter final : public SteeredObject<ConfigWriter> {
30 public:
33
35
38
39 std::string operator()() const;
40
41 private:
42 inline std::string offset(size_t num) { return std::string(num * tab_len_, ' '); }
43 mutable std::ostringstream os_;
44 const size_t tab_len_;
45 };
46 } // namespace python
47} // namespace cepgen
48
49#endif
A description object for parameters collection.
List of parameters used to start and run the simulation job.
Base user-steerable object.
Toolbox to dump user-steered configuration into Python scripts.
std::string operator()() const
Retrieve the configuration as a string.
ConfigWriter & operator<<(const RunParameters &)
Feed a full run parameters block.
static ParametersDescription description()
Common namespace for this Monte Carlo generator.