MarlinTrk
02.08
|
Factory methods for creating the MarlinTrkSystem of a certain type: DDKalTest, aidaTT,...
Currently implemented: DDKalTest, aidaTT.
More...
#include <Factory.h>
Public Member Functions | |
virtual | ~Factory () |
Factory (const Factory &)=delete | |
Factory const & | operator= (const Factory &)=delete |
Static Public Member Functions | |
static IMarlinTrkSystem * | createMarlinTrkSystem (const std::string &systemType, const gear::GearMgr *gearMgr, const std::string &options) |
Create the MarlinTrkSystem instance of the specified type: DDKalTest, aidaTT,... Returns 0 if type not implemented... More... | |
static IMarlinTrkSystem * | getMarlinTrkSystem (const std::string &systemType) |
Return the MarlinTrkSystem of the given type - only valid after a preceeding call to createMarlinTrkSystem() for that type, otherwise an exception is thrown. More... | |
static IMarlinTrkSystem * | getCurrentMarlinTrkSystem () |
Return the current MarlinTrkSystem, i.e. More... | |
static Factory * | instance () |
Protected Types | |
typedef std::map< std::string, IMarlinTrkSystem * > | TrkSystemMap |
Protected Member Functions | |
Factory () | |
Protected Attributes | |
IMarlinTrkSystem * | _currentTrkSystem =nullptr |
TrkSystemMap | _map {} |
Factory methods for creating the MarlinTrkSystem of a certain type: DDKalTest, aidaTT,...
Currently implemented: DDKalTest, aidaTT.
The returned instance for a given type is cached, thus:
DO NOT DELETE THE POINTER at the end of your software module (Marlin processor) !
|
protected |
|
inlinevirtual |
|
delete |
|
static |
Create the MarlinTrkSystem instance of the specified type:
DDKalTest, aidaTT,...
Returns 0 if type not implemented...
DO NOT DELETE THE POINTER at the end of your software module (Marlin processor) !
Definition at line 14 of file Factory.cc.
References _currentTrkSystem, _map, std::map< K, T >::end(), std::endl(), std::map< K, T >::find(), std::map< K, T >::insert(), instance(), std::make_pair(), and std::stringstream::str().
|
static |
Return the current MarlinTrkSystem, i.e.
the one returned in the last call to createMarlinTrkSystem() or getMarlinTrkSystem() preceeding this call. To be used in cases where the concrete type of the tracking system does not matter - or when it is savely initialized in the enclosing software module (e.e. the Marlin processor).
DO NOT DELETE THE POINTER at the end of your software module (Marlin processor) !
Definition at line 87 of file Factory.cc.
References _currentTrkSystem, std::endl(), instance(), and std::stringstream::str().
Referenced by MarlinTrk::finaliseLCIOTrack().
|
static |
Return the MarlinTrkSystem of the given type - only valid after a preceeding call to createMarlinTrkSystem() for that type, otherwise an exception is thrown.
This is useful for several modules (e.g. Marlin processors) using the same IMarlinTrkSystem. It is the users responsibility to make sure one module has created it.
DO NOT DELETE THE POINTER at the end of your software module (Marlin processor) !
Definition at line 65 of file Factory.cc.
References _currentTrkSystem, _map, std::map< K, T >::end(), std::endl(), std::map< K, T >::find(), instance(), and std::stringstream::str().
|
static |
Definition at line 105 of file Factory.cc.
Referenced by createMarlinTrkSystem(), getCurrentMarlinTrkSystem(), and getMarlinTrkSystem().
|
protected |
Definition at line 84 of file Factory.h.
Referenced by createMarlinTrkSystem(), getCurrentMarlinTrkSystem(), and getMarlinTrkSystem().
|
protected |
Definition at line 86 of file Factory.h.
Referenced by createMarlinTrkSystem(), getMarlinTrkSystem(), and ~Factory().