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
22
#include "
CepGen/Core/SteeredObject.h
"
23
24
namespace
cepgen
{
25
class
RunParameters;
26
class
ParametersDescription;
27
namespace
python
{
29
class
ConfigWriter
final :
public
SteeredObject
<ConfigWriter> {
30
public
:
31
ConfigWriter
(
const
ParametersList
&);
32
~ConfigWriter
();
33
34
static
ParametersDescription
description
();
35
36
ConfigWriter
&
operator<<
(
const
RunParameters
&);
37
ConfigWriter
&
operator<<
(
const
ParametersDescription
&);
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
SteeredObject.h
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::RunParameters
List of parameters used to start and run the simulation job.
Definition
RunParameters.h:41
cepgen::SteeredObject
Base user-steerable object.
Definition
SteeredObject.h:41
cepgen::python::ConfigWriter
Toolbox to dump user-steered configuration into Python scripts.
Definition
ConfigWriter.h:29
cepgen::python::ConfigWriter::operator()
std::string operator()() const
Retrieve the configuration as a string.
Definition
ConfigWriter.cpp:178
cepgen::python::ConfigWriter::operator<<
ConfigWriter & operator<<(const RunParameters &)
Feed a full run parameters block.
Definition
ConfigWriter.cpp:96
cepgen::python::ConfigWriter::description
static ParametersDescription description()
Definition
ConfigWriter.cpp:180
cepgen::python::ConfigWriter::~ConfigWriter
~ConfigWriter()
Definition
ConfigWriter.cpp:89
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
python
Definition
__init__.py:1
CepGenAddOns
PythonWrapper
ConfigWriter.h
Generated on Mon Jul 29 2024 for CepGen by
1.9.7