FWCore
Framework
interface
ModuleFactory.h
Go to the documentation of this file.
1
#ifndef FWCore_Framework_ModuleFactory_h
2
#define FWCore_Framework_ModuleFactory_h
3
// -*- C++ -*-
4
//
5
// Package: Framework
6
// Class : ModuleFactory
7
//
16
//
17
// Author: Chris Jones
18
// Created: Wed May 25 18:01:31 EDT 2005
19
//
20
21
// system include files
22
#include <memory>
23
#include <string>
24
25
// user include files
26
#include "
FWCore/Framework/interface/ComponentFactory.h
"
27
#include "
FWCore/ParameterSet/interface/ParameterSetDescriptionFillerPluginFactory.h
"
28
29
// forward declarations
30
namespace
edm
{
31
class
ParameterSet
;
32
33
namespace
eventsetup {
34
class
DataProxyProvider;
35
class
EventSetupsController;
36
37
struct
ModuleMakerTraits
{
38
typedef
DataProxyProvider
base_type
;
39
40
static
std::string
name
();
41
static
void
addTo
(
EventSetupProvider
& iProvider,
42
std::shared_ptr<DataProxyProvider> iComponent,
43
ParameterSet
const
&,
44
bool
);
45
static
void
replaceExisting
(
EventSetupProvider
& iProvider, std::shared_ptr<DataProxyProvider> iComponent);
46
static
std::shared_ptr<base_type>
getComponentAndRegisterProcess
(
EventSetupsController
& esController,
47
ParameterSet
const
& iConfiguration);
48
static
void
putComponent
(
EventSetupsController
& esController,
49
ParameterSet
const
& iConfiguration,
50
std::shared_ptr<base_type>
const
& component);
51
};
52
template
<
class
TType>
53
struct
ModuleMaker
:
public
ComponentMaker
<edm::eventsetup::ModuleMakerTraits, TType> {};
54
55
typedef
ComponentFactory<ModuleMakerTraits>
ModuleFactory
;
56
typedef
edmplugin::PluginFactory<edm::eventsetup::ComponentMakerBase<ModuleMakerTraits>
*()>
ModulePluginFactory
;
57
}
// namespace eventsetup
58
}
// namespace edm
59
60
#define DEFINE_FWK_EVENTSETUP_MODULE(type) \
61
DEFINE_EDM_PLUGIN(edm::eventsetup::ModulePluginFactory, edm::eventsetup::ModuleMaker<type>, #type); \
62
DEFINE_DESC_FILLER_FOR_ESPRODUCERS(type)
63
64
#endif
edm::eventsetup::DataProxyProvider
Definition:
DataProxyProvider.h:64
edm::eventsetup::ModuleMaker
Definition:
ModuleFactory.h:53
ComponentFactory.h
edm::eventsetup::ModuleMakerTraits::name
static std::string name()
Definition:
ModuleFactory.cc:29
edm::eventsetup::ModuleFactory
ComponentFactory< ModuleMakerTraits > ModuleFactory
Definition:
ModuleFactory.h:55
edm::eventsetup::ModuleMakerTraits::putComponent
static void putComponent(EventSetupsController &esController, ParameterSet const &iConfiguration, std::shared_ptr< base_type > const &component)
Definition:
ModuleFactory.cc:47
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::eventsetup::ModuleMakerTraits::replaceExisting
static void replaceExisting(EventSetupProvider &iProvider, std::shared_ptr< DataProxyProvider > iComponent)
Definition:
ModuleFactory.cc:37
ParameterSetDescriptionFillerPluginFactory.h
edm::eventsetup::ComponentMaker
Definition:
ComponentMaker.h:57
edm::eventsetup::EventSetupProvider
Definition:
EventSetupProvider.h:50
edm::eventsetup::ModuleMakerTraits
Definition:
ModuleFactory.h:37
edm::eventsetup::ModuleMakerTraits::addTo
static void addTo(EventSetupProvider &iProvider, std::shared_ptr< DataProxyProvider > iComponent, ParameterSet const &, bool)
Definition:
ModuleFactory.cc:30
edm::eventsetup::ModuleMakerTraits::getComponentAndRegisterProcess
static std::shared_ptr< base_type > getComponentAndRegisterProcess(EventSetupsController &esController, ParameterSet const &iConfiguration)
Definition:
ModuleFactory.cc:42
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
ParameterSet
Definition:
Functions.h:16
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
edm::eventsetup::ModuleMakerTraits::base_type
DataProxyProvider base_type
Definition:
ModuleFactory.h:38
edm::eventsetup::EventSetupsController
Definition:
EventSetupsController.h:80
edm::eventsetup::ComponentFactory
Definition:
ComponentFactory.h:43
Generated for CMSSW Reference Manual by
1.8.16