cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
Handler.h
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
#ifndef CepGen_Cards_Handler_h
20
#define CepGen_Cards_Handler_h
21
22
#include <memory>
23
24
#include "
CepGen/Modules/NamedModule.h
"
25
26
namespace
cepgen
{
27
class
RunParameters;
29
namespace
card {
31
class
Handler
:
public
NamedModule
<Handler> {
32
public
:
33
explicit
Handler
(
const
ParametersList
&);
34
virtual
~Handler
() =
default
;
35
36
static
ParametersDescription
description
();
37
39
inline
virtual
Handler
&
parseCommands
(
const
std::vector<std::string>&) {
return
*
this
; }
41
inline
virtual
Handler
&
parseFile
(
const
std::string&) {
return
*
this
; }
42
inline
virtual
void
write
(
const
std::string&)
const
{}
43
44
virtual
Handler
&
setRunParameters
(
const
RunParameters
*);
45
inline
const
RunParameters
*
runParameters
()
const
{
return
rt_params_.get(); }
46
inline
std::unique_ptr<RunParameters>&
runParameters
() {
return
rt_params_; }
47
48
protected
:
49
const
std::string
filename_
;
50
51
private
:
52
std::unique_ptr<RunParameters> rt_params_{
nullptr
};
53
};
54
}
// namespace card
55
}
// namespace cepgen
56
57
#endif
NamedModule.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::runParameters
const RunParameters * runParameters() const
Parsed runtime parameters.
Definition
Handler.h:45
cepgen::card::Handler::filename_
const std::string filename_
Input filename.
Definition
Handler.h:49
cepgen::card::Handler::runParameters
std::unique_ptr< RunParameters > & runParameters()
Parsed runtime parameters.
Definition
Handler.h:46
cepgen::card::Handler::~Handler
virtual ~Handler()=default
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::parseCommands
virtual Handler & parseCommands(const std::vector< std::string > &)
Read configuration from command strings.
Definition
Handler.h:39
cepgen::card::Handler::write
virtual void write(const std::string &) const
Write steering card from configuration.
Definition
Handler.h:42
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
CepGen
Cards
Handler.h
Generated on Mon Jul 29 2024 for CepGen by
1.9.7