The GENIE Algorithm Factory. More...
#include <AlgFactory.h>
Classes | |
struct | Cleaner |
singleton cleaner More... | |
Public Member Functions | |
const Algorithm * | GetAlgorithm (const AlgId &algid) |
const Algorithm * | GetAlgorithm (string name, string conf="Default") |
Algorithm * | AdoptAlgorithm (const AlgId &algid) const |
Algorithm * | AdoptAlgorithm (string name, string conf="Default") const |
void | ForceReconfiguration (bool ignore_alg_opt_out=false) |
void | Print (ostream &stream) const |
print algorithm factory More... | |
Static Public Member Functions | |
static AlgFactory * | Instance () |
Private Member Functions | |
AlgFactory () | |
AlgFactory (const AlgFactory &alg_factory) | |
virtual | ~AlgFactory () |
Algorithm * | InstantiateAlgorithm (string name, string config) const |
Private Attributes | |
map< string, Algorithm * > | fAlgPool |
'algorithm key' (namespace::name/config) -> 'algorithmic object' map More... | |
Static Private Attributes | |
static AlgFactory * | fInstance = 0 |
sinleton's self More... | |
Friends | |
struct | Cleaner |
ostream & | operator<< (ostream &stream, const AlgFactory &algf) |
The GENIE Algorithm Factory.
May 12, 2004
Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org
Definition at line 39 of file AlgFactory.h.
|
private |
Definition at line 37 of file AlgFactory.cxx.
|
private |
|
privatevirtual |
Definition at line 42 of file AlgFactory.cxx.
Like GetAlgorithm() but the algorithm is not placed at the AlgFactory pool and its ownership is transfered to the caller
Hands over an algorithm instance that is owned by the client. The client can alter this object (eg. reconfigure) but the AlgFactory does not keep track of it and the client is responsible for deleting it.
Definition at line 116 of file AlgFactory.cxx.
Definition at line 125 of file AlgFactory.cxx.
void AlgFactory::ForceReconfiguration | ( | bool | ignore_alg_opt_out = false | ) |
Forces a reconfiguration of all algorithms kept at the factory pool. The algorithms look up their nominal configuration from the config pool. Use that to propagate modifications made directly at the config pool.
Definition at line 131 of file AlgFactory.cxx.
Instantiates, configures and returns a pointer to the specified algorithm. The algorithm is placed at the AlgFactory pool (is owned by the factory) from where it will be looked up at subsequent calls.
Manages the instantiation and "storage/retrieval" of algorithms. These algorithms are owned by the factory and it hands over (to the client) a "const Algorithm *" that can be dynamically casted to the requested Algorithm Interface (eg. XSecAlgorithmI, Decayer, PdfModelI, etc...)
Definition at line 75 of file AlgFactory.cxx.
Definition at line 85 of file AlgFactory.cxx.
|
static |
Definition at line 64 of file AlgFactory.cxx.
method instantiating (based on TClass * TROOT::GetClass(name)) & configuring algorithmic objects
Instantiate the requested object based on the registration of its TClass through the generated ROOT dictionaries The class of any object instantiated here must have a LinkDef entry.
Definition at line 151 of file AlgFactory.cxx.
void AlgFactory::Print | ( | ostream & | stream | ) | const |
print algorithm factory
Definition at line 183 of file AlgFactory.cxx.
|
friend |
Definition at line 89 of file AlgFactory.h.
|
friend |
Definition at line 28 of file AlgFactory.cxx.
'algorithm key' (namespace::name/config) -> 'algorithmic object' map
Definition at line 77 of file AlgFactory.h.
|
staticprivate |
sinleton's self
Definition at line 74 of file AlgFactory.h.