cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
CardsHandlerFactory.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_Modules_CardsHandlerFactory_h
20
#define CepGen_Modules_CardsHandlerFactory_h
21
22
#include "
CepGen/Modules/ModuleFactory.h
"
23
25
#define REGISTER_CARD_HANDLER(name, obj) \
26
namespace cepgen { \
27
namespace card { \
28
struct BUILDERNM(obj) { \
29
BUILDERNM(obj)() { CardsHandlerFactory::get().registerModule<obj>(name); } \
30
}; \
31
static const BUILDERNM(obj) gCard##obj; \
32
} \
33
} \
34
static_assert(true, ""
)
35
36
namespace
cepgen
{
37
class
RunParameters;
38
namespace
card {
39
class
Handler;
40
}
42
DEFINE_FACTORY
(BaseCardsHandlerFactory,
card::Handler
,
"Cards handlers factory"
);
44
struct
CardsHandlerFactory
:
public
BaseCardsHandlerFactory {
45
using
BaseCardsHandlerFactory::BaseCardsHandlerFactory;
46
static
CardsHandlerFactory
&
get
();
49
std::unique_ptr<card::Handler>
buildFromFilename
(
const
std::string& filename)
const
;
50
};
51
}
// namespace cepgen
52
53
#endif
ModuleFactory.h
DEFINE_FACTORY
#define DEFINE_FACTORY(name, obj_type, descr)
Define a new factory instance for the definition of modules.
Definition
ModuleFactory.h:30
cepgen::card::Handler
Base steering card module.
Definition
Handler.h:31
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
cepgen::CardsHandlerFactory
A cards handler factory.
Definition
CardsHandlerFactory.h:44
cepgen::CardsHandlerFactory::buildFromFilename
std::unique_ptr< card::Handler > buildFromFilename(const std::string &filename) const
Build one instance of a cards handler.
Definition
CardsHandlerFactory.cpp:30
cepgen::CardsHandlerFactory::get
static CardsHandlerFactory & get()
Definition
CardsHandlerFactory.cpp:25
CepGen
Modules
CardsHandlerFactory.h
Generated on Mon Jul 29 2024 for CepGen by
1.9.7