Abstract base class for loading a GSystem from a specific source.
More...
#include <systemFactory.h>
Concrete factories implement two core steps:
- material loading (so volumes can reference material names);
- geometry loading (volumes and placement metadata).
The public orchestration method loadSystem():
- logs the start of loading;
- seeds
possibleLocationOfFiles with default search locations;
- invokes the concrete material-loading step;
- invokes the concrete geometry-loading step.
Search-path behavior:
"." is always added first.
- GEMC installation root (from gutilities) is added.
system->get_dbhost() is also added, which can act as either a DB name or a directory hint depending on the concrete factory.
Definition at line 34 of file systemFactory.h.
◆ ~GSystemFactory()
| GSystemFactory::~GSystemFactory |
( |
| ) |
|
|
overridedefault |
◆ GSystemFactory()
| GSystemFactory::GSystemFactory |
( |
const std::shared_ptr< GOptions > & | g | ) |
|
|
inlineexplicit |
- Parameters
-
| g | Shared options/configuration instance. |
Definition at line 44 of file systemFactory.h.
◆ addPossibleFileLocation()
| void GSystemFactory::addPossibleFileLocation |
( |
const std::string & | fl | ) |
|
|
inline |
- Parameters
-
| fl | Directory path to append. |
Factories may accumulate locations from multiple sources (YAML directories, install roots, user-specified paths). Locations are searched in insertion order.
Definition at line 129 of file systemFactory.h.
◆ closeSystem()
| virtual void GSystemFactory::closeSystem |
( |
| ) |
|
|
inlinevirtual |
Concrete factories override this when they own external resources (e.g. open sqlite handles, file streams, cached state).
The base implementation clears possibleLocationOfFiles.
Definition at line 89 of file systemFactory.h.
◆ loadSystem()
| void GSystemFactory::loadSystem |
( |
GSystem * | system | ) |
|
|
inline |
- Parameters
-
| system | Target system instance to populate. |
Sequence:
- initialize default search locations;
- load materials first (so geometry can reference material names);
- load geometry (volumes) second.
The base class does not enforce additional invariants beyond calling order. Concrete factories are responsible for:
- validating input files / database connectivity;
- logging and erroring out on unrecoverable conditions;
- leaving the system in a consistent state on success.
Definition at line 63 of file systemFactory.h.
◆ possibleLocationOfFiles
| std::vector<std::string> GSystemFactory::possibleLocationOfFiles |
|
protected |
The documentation for this class was generated from the following file: