2 #include "GaudiKernel/GaudiException.h"
3 #include "GaudiKernel/IService.h"
4 #include "GaudiKernel/ISvcLocator.h"
5 #include "GaudiKernel/IAlgManager.h"
6 #include "GaudiKernel/ISvcManager.h"
7 #include "GaudiKernel/IIncidentSvc.h"
8 #include "GaudiKernel/ModuleIncident.h"
9 #include "GaudiKernel/MsgStream.h"
11 #include "GaudiKernel/System.h"
13 #include "GaudiKernel/IAlgorithm.h"
38 void* libHandle =
nullptr;
44 catch (
const std::exception & excpt )
48 log <<
MSG::ERROR <<
"Exception whilst loading " << module <<
" : " << excpt.what() <<
endmsg;
61 if (fireIncident && !module.empty()) {
63 const bool CREATEIF(
true);
Definition of the MsgStream class used to transmit messages.
Define general base for Gaudi exception.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
StatusCode loadModule(const std::string &module, bool fireIncident=true) override
bool isSuccess() const
Test for a status code of SUCCESS.
bool isFailure() const
Test for a status code of FAILURE.
GAUDI_API const std::string & moduleNameFull()
Get the full name of the (executable/DLL) file.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
SmartIF< IMessageSvc > m_msgsvc
unsigned long addRef() override
Reference Interface instance.
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
fired when a module (DLL) is loaded
StatusCode queryInterface(const InterfaceID &iid, void **pinterface) override
implementation of IInterface::queryInterface
bool isValid() const
Allow for check if smart pointer is valid.
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
GAUDI_API unsigned long loadDynamicLib(const std::string &name, ImageHandle *handle)
Load dynamic link library.
DLLClassManager(IInterface *iface)
SmartIF< ISvcLocator > m_svclocator
StatusCode queryInterface(const InterfaceID &ti, void **pp) override
Implementation of IInterface::queryInterface.
SmartIF< IInterface > m_pOuter
The interface implemented by the IncidentSvc service.
virtual StatusCode queryInterface(const InterfaceID &ti, void **pp)=0
Set the void** to the pointer to the requested interface of the instance.