DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Classes | Functions
Gaudi::PluginService::v1::Details Namespace Reference

Classes

class  Factory
 
class  Logger
 Simple logging class, just to provide a default implementation. More...
 
class  Registry
 In-memory database of the loaded factories. More...
 

Functions

GAUDIPS_API void * getCreator (const std::string &id, const std::string &type)
 
template<typename F >
getCreator (const std::string &id)
 
GAUDIPS_API std::string demangle (const std::type_info &id)
 
template<typename T >
std::string demangle ()
 Return a canonical name for the template argument. More...
 
GAUDIPS_API Loggerlogger ()
 Return the current logger instance. More...
 
GAUDIPS_API void setLogger (Logger *logger)
 
std::string demangle (const std::string &id)
 

Function Documentation

◆ demangle() [1/3]

template<typename T >
std::string Gaudi::PluginService::v1::Details::demangle ( )
inline

Return a canonical name for the template argument.

Definition at line 78 of file PluginServiceDetailsV1.h.

◆ demangle() [2/3]

std::string Gaudi::PluginService::v1::Details::demangle ( const std::string &  id)

Definition at line 120 of file PluginServiceV1.cpp.

◆ demangle() [3/3]

std::string Gaudi::PluginService::v1::Details::demangle ( const std::type_info &  id)

Return a canonical name for type_info object (implementation borrowed from GaudiKernel/System).

Definition at line 134 of file PluginServiceV1.cpp.

◆ getCreator() [1/2]

template<typename F >
F Gaudi::PluginService::v1::Details::getCreator ( const std::string &  id)
inline

Convoluted implementation of getCreator with an embedded reinterpret_cast, used to avoid the warning

warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object

It is an ugly trick but works.
See:

Definition at line 62 of file PluginServiceDetailsV1.h.

◆ getCreator() [2/2]

void * Gaudi::PluginService::v1::Details::getCreator ( const std::string &  id,
const std::string &  type 
)

Function used to load a specific factory function.

Returns
the pointer to the factory function.

Definition at line 116 of file PluginServiceV1.cpp.

◆ logger()

Logger & Gaudi::PluginService::v1::Details::logger ( )

Return the current logger instance.

Definition at line 326 of file PluginServiceV1.cpp.

◆ setLogger()

void Gaudi::PluginService::v1::Details::setLogger ( Logger logger)

Set the logger instance to use. It must be a new instance and the ownership is passed to the function.

Definition at line 327 of file PluginServiceV1.cpp.