1 #ifndef GAUDIPLUGINSERVICE_INTERFACE_DD4HEP_H
2 #define GAUDIPLUGINSERVICE_INTERFACE_DD4HEP_H
22 #if __cplusplus >= 201703
25 # include <boost/any.hpp>
28 using boost::any_cast;
29 using boost::bad_any_cast;
34 #pragma clang diagnostic push
35 #pragma clang diagnostic ignored "-Wkeyword-macro"
36 #pragma clang diagnostic pop
39 #if GAUDI_PLUGIN_SERVICE_VERSION == 2
40 #define GAUDI_PLUGIN_SERVICE_V2 1
42 #elif GAUDI_PLUGIN_SERVICE_VERSION == 1
43 #define private public
44 #define GAUDI_PLUGIN_SERVICE_V1 1
49 #define MAKE_GAUDI_PLUGIN_SERVICE_ENTRY(n,v) dd4hep_pluginmgr_##n##_V##v
50 #define MAKE_FUNC(name,version) MAKE_GAUDI_PLUGIN_SERVICE_ENTRY(name,version)
64 #if GAUDI_PLUGIN_SERVICE_VERSION==2
67 const Details::Registry::FactoryInfo&
info = Details::Registry::instance().getInfo(
id,
true);
70 #elif GAUDI_PLUGIN_SERVICE_VERSION==1
77 #if GAUDI_PLUGIN_SERVICE_VERSION==2
81 Details::Registry::Properties props = {};
82 std::string lib_name =
"";
83 Details::Registry::instance().add(
id, {std::move(lib_name), std::move( stub ), std::move( props )} );
85 #elif GAUDI_PLUGIN_SERVICE_VERSION==1
88 Gaudi::PluginService::Details::Registry::instance().add(
id, std::any_cast<void*>(stub), sig, ret,
id);