DetectorDescription
DDCMS
interface
DDPlugins.h
Go to the documentation of this file.
1
#ifndef DETECTOR_DESCRIPTION_DD_PLUGINS_H
2
#define DETECTOR_DESCRIPTION_DD_PLUGINS_H
3
4
#include "
DetectorDescription/DDCMS/interface/DDAlgoArguments.h
"
5
#include "DD4hep/Factories.h"
6
#include "DD4hep/Plugins.h"
7
8
namespace
dd4hep
{
9
10
template
<
typename
T>
11
class
DDCMSDetElementFactory
:
public
dd4hep::PluginFactoryBase {
12
public
:
13
static
long
create
(
dd4hep::Detector
&
detector
,
cms::DDParsingContext
& context, dd4hep::xml::Handle_t element);
14
};
15
}
// namespace dd4hep
16
17
namespace
{
18
template
<
typename
P,
typename
S>
19
class
Factory;
20
DD4HEP_PLUGIN_FACTORY_ARGS_3(
long
,
dd4hep::Detector
*,
cms::DDParsingContext
*, ns::xml_h*) {
21
return
dd4hep::DDCMSDetElementFactory<P>::create
(*
a0
, *a1, *
a2
);
22
}
23
}
// namespace
24
25
#define DECLARE_DDCMS_DETELEMENT(name, func) \
26
DD4HEP_OPEN_PLUGIN(dd4hep, ddcms_det_element_##name) { \
27
typedef DDCMSDetElementFactory<ddcms_det_element_##name> _IMP; \
28
template <> \
29
long _IMP::create(dd4hep::Detector& d, cms::DDParsingContext& c, xml::Handle_t e) { \
30
return func(d, c, e); \
31
} \
32
DD4HEP_PLUGINSVC_FACTORY( \
33
ddcms_det_element_##name, name, long(dd4hep::Detector*, cms::DDParsingContext*, ns::xml_h*), __LINE__) \
34
}
35
36
#endif
dd4hep::DDCMSDetElementFactory
Definition:
DDPlugins.h:11
cms::DDParsingContext
Definition:
DDParsingContext.h:13
testProducerWithPsetDescEmpty_cfi.a2
a2
Definition:
testProducerWithPsetDescEmpty_cfi.py:35
dd4hep::DDCMSDetElementFactory::create
static long create(dd4hep::Detector &detector, cms::DDParsingContext &context, dd4hep::xml::Handle_t element)
DDAlgoArguments.h
align::Detector
Definition:
StructureType.h:86
dd4hep
Definition:
DDPlugins.h:8
hgcalTestNeighbor_cfi.detector
detector
Definition:
hgcalTestNeighbor_cfi.py:6
a0
static constexpr float a0
Definition:
L1EGammaCrystalsEmulatorProducer.cc:81
Generated for CMSSW Reference Manual by
1.8.16