MarlinTrk  2.2.0
Factory.h
1 #ifndef MarlinTrk_Factory_h
2 #define MarlinTrk_Factory_h
3 
4 #include "IMarlinTrkSystem.h"
5 #include "gear/GEAR.h"
6 #include "gear/GearMgr.h"
7 
8 #include <string>
9 #include <map>
10 
11 namespace MarlinTrk{
12 
23  class Factory {
24 
25  public:
26 
27  virtual ~Factory() {}
28 
38  static IMarlinTrkSystem* createMarlinTrkSystem(const std::string& systemType,
39  const gear::GearMgr* gearMgr,
40  const std::string& options ) ;
41 
42 
52  static IMarlinTrkSystem* getMarlinTrkSystem(const std::string& systemType) ;
53 
54 
65 
66 
67  static Factory* instance() ;
68 
69  protected:
70 
71  typedef std::map< std::string, IMarlinTrkSystem*> TrkSystemMap ;
72 
73  Factory() : _currentTrkSystem(0){}
74 
75  IMarlinTrkSystem* _currentTrkSystem ;
76 
77  TrkSystemMap _map ;
78 
79  } ;
80 
81 } // end of MarlinTrk namespace
82 
83 #endif
84 
Factory methods for creating the MarlinTrkSystem of a certain type: KalTest, DDKalTest, aidaTT,... Currently implemented: KalTest, DDKalTest.
Definition: Factory.h:23
static IMarlinTrkSystem * getCurrentMarlinTrkSystem()
Return the current MarlinTrkSystem, i.e.
Definition: Factory.cc:92
Base class for tracking system implementations in MarlinTrk.
Definition: IMarlinTrkSystem.h:45
static IMarlinTrkSystem * getMarlinTrkSystem(const std::string &systemType)
Return the MarlinTrkSystem of the given type - only valid after a preceeding call to createMarlinTrkS...
Definition: Factory.cc:70
static IMarlinTrkSystem * createMarlinTrkSystem(const std::string &systemType, const gear::GearMgr *gearMgr, const std::string &options)
Create the MarlinTrkSystem instance of the specified type: KalTest, DDKalTest, aidaTT,... Returns 0 if type not implemented...
Definition: Factory.cc:15