cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
Handler.cpp
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2013-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
#include "
CepGen/Cards/Handler.h
"
20
#include "
CepGen/Core/RunParameters.h
"
21
#include "
CepGen/Modules/CardsHandlerFactory.h
"
22
23
namespace
cepgen
{
24
namespace
card {
25
Handler::Handler
(
const
ParametersList
& params)
26
:
NamedModule
(params), filename_(steer<std::string>(
"filename"
)), rt_params_(new
RunParameters
) {
27
if
(!
filename_
.empty())
28
parseFile
(
filename_
);
29
}
30
31
Handler
&
Handler::setRunParameters
(
const
RunParameters
* params) {
32
rt_params_.reset(
const_cast<
RunParameters
*
>
(params));
33
return
*
this
;
34
}
35
36
ParametersDescription
Handler::description
() {
37
auto
desc =
ParametersDescription
();
38
desc.setDescription(
"Generic steering cards handler"
);
39
desc.add<std::string>(
"filename"
,
""
).setDescription(
"Steering card to parse"
);
40
return
desc;
41
}
42
}
// namespace card
43
}
// namespace cepgen
CardsHandlerFactory.h
Handler.h
RunParameters.h
cepgen::NamedModule
Base runtime module object.
Definition
NamedModule.h:28
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::card::Handler
Base steering card module.
Definition
Handler.h:31
cepgen::card::Handler::setRunParameters
virtual Handler & setRunParameters(const RunParameters *)
Specify runtime parameters.
Definition
Handler.cpp:31
cepgen::card::Handler::filename_
const std::string filename_
Input filename.
Definition
Handler.h:49
cepgen::card::Handler::parseFile
virtual Handler & parseFile(const std::string &)
Read configuration from steering card.
Definition
Handler.h:41
cepgen::card::Handler::description
static ParametersDescription description()
Definition
Handler.cpp:36
cepgen::card::Handler::Handler
Handler(const ParametersList &)
Build a configuration from an external steering card.
Definition
Handler.cpp:25
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
CepGen
Cards
Handler.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7