cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
EventHandler.h
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2023-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_EventFilter_EventHandler_h
20
#define CepGen_EventFilter_EventHandler_h
21
22
#include "
CepGen/Modules/NamedModule.h
"
23
24
namespace
cepgen
{
25
class
Event;
26
class
RunParameters;
30
class
EventHandler
:
public
NamedModule
<EventHandler> {
31
public
:
32
explicit
EventHandler
(
const
ParametersList
&);
33
virtual
~EventHandler
();
34
35
static
ParametersDescription
description
();
36
37
void
initialise
(
const
RunParameters
&);
38
const
RunParameters
&
runParameters
()
const
;
39
41
template
<
typename
T>
42
T*
engine
() {
43
return
static_cast<
T*
>
(
enginePtr
());
44
}
45
46
protected
:
47
virtual
void
initialise
() = 0;
48
virtual
void
*
enginePtr
();
49
50
private
:
51
const
RunParameters
* run_params_{
nullptr
};
// NOT owning
52
bool
initialised_{
false
};
53
};
54
}
// namespace cepgen
55
56
#endif
NamedModule.h
cepgen::EventHandler
Class template for modules interacting with events.
Definition
EventHandler.h:30
cepgen::EventHandler::engine
T * engine()
Retrieve the engine object.
Definition
EventHandler.h:42
cepgen::EventHandler::enginePtr
virtual void * enginePtr()
Engine object.
Definition
EventHandler.cpp:50
cepgen::EventHandler::description
static ParametersDescription description()
Definition
EventHandler.cpp:30
cepgen::EventHandler::~EventHandler
virtual ~EventHandler()
Definition
EventHandler.cpp:26
cepgen::EventHandler::initialise
virtual void initialise()=0
cepgen::EventHandler::runParameters
const RunParameters & runParameters() const
List of run parameters.
Definition
EventHandler.cpp:44
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
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
CepGen
EventFilter
EventHandler.h
Generated on Mon Jul 29 2024 for CepGen by
1.9.7