DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
#include <PluginServiceV2.h>
Public Types | |
using | DefaultFactory = Details::DefaultFactory< T, F > |
Public Member Functions | |
DeclareFactory (typename F::FactoryType f=DefaultFactory{}, Details::Registry::Properties props={}) | |
DeclareFactory (const std::string &id, typename F::FactoryType f=DefaultFactory{}, Details::Registry::Properties props={}) | |
DeclareFactory (Details::Registry::Properties props) | |
Static Private Member Functions | |
static std::string | libraryName () |
Helper to record the name of the library that declare the factory. More... | |
Helper to declare the factory implementation for a user defined type T
.
The basic use is:
which is the equivalent of DECLARE_COMPONENT( MyComponent )
.
It's possible to specify a custom factory type (instead of the default type alias MyComponent::Factory
):
We can pass arguments to the constructor to use a custom factory function, or a special id, or properties:
Definition at line 85 of file PluginServiceV2.h.
using Gaudi::PluginService::v2::DeclareFactory< T, F >::DefaultFactory = Details::DefaultFactory<T, F> |
Definition at line 86 of file PluginServiceV2.h.
|
inline |
Definition at line 88 of file PluginServiceV2.h.
|
inline |
Definition at line 91 of file PluginServiceV2.h.
|
inline |
Definition at line 100 of file PluginServiceV2.h.
|
inlinestaticprivate |
Helper to record the name of the library that declare the factory.
Definition at line 105 of file PluginServiceV2.h.