fire v0.19.0
Framework for sImulation and Reconstruction of Events
fire::factory Namespace Reference

used to isolate base templated Factory class More...

Classes

class  Factory
 Factory to dynamically create objects derived from a specific prototype class. More...
 

Functions

void loadLibrary (const std::string &libname)
 load a library by name More...
 

Detailed Description

used to isolate base templated Factory class

This namespace is used to isolate the templated Factory from where other Factories are defined. There should be nothing else in this namespace in order to avoid potential name conflicts.

Function Documentation

◆ loadLibrary()

void fire::factory::loadLibrary ( const std::string libname)

load a library by name

Loading a library by name is similar to linking a shared library to an executable; however, it does not include some assumptions about the library naming that some linkers make.

libname needs to include the 'lib' prefix and the '.so' suffix as well as be "findable" by the linker ld. You can make any library "findable" by passing the full path as 'libname' or you can add the directory that the library is in to LD_LIBRARY_PATH.

We maintain a cache of libraries that are already loaded so that the same library is not loaded twice.

Exceptions
Exceptionif library failed to load The Exception includes the loader error message to help debug.
Parameters
[in]libnamename of library to load