|
BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
A holder for loaded aperture points files. More...
#include <BDSAperturePointsLoader.hh>

Public Member Functions | |
| void | ClearCachedFiles () |
| Delete all cached points from memory and clear the map of files loaded. | |
| std::vector< G4TwoVector > * | FindCachedFile (const G4String &fileNameAndUnits) const |
| Retrieve a cached files. Will return nullptr if not found. | |
| void | CacheFile (const G4String &fileNameAndUnits, std::vector< G4TwoVector > *contents) |
| Add an entry to the cache. | |
Static Public Member Functions | |
| static BDSAperturePointsCache * | Instance () |
| Access the singleton instance. | |
Private Attributes | |
| std::map< G4String, std::vector< G4TwoVector > * > | cachedFiles |
Static Private Attributes | |
| static BDSAperturePointsCache * | instance = nullptr |
A holder for loaded aperture points files.
This is a separate class from the loader as the loader is templated and this would result in a different cache for each format loaded.
Singleton.
Definition at line 67 of file BDSAperturePointsLoader.hh.
| BDSAperturePointsCache::~BDSAperturePointsCache | ( | ) |
Definition at line 190 of file BDSAperturePointsLoader.cc.
| void BDSAperturePointsCache::CacheFile | ( | const G4String & | fileNameAndUnits, |
| std::vector< G4TwoVector > * | contents | ||
| ) |
Add an entry to the cache.
Definition at line 212 of file BDSAperturePointsLoader.cc.
Referenced by BDS::LoadAperturePoints().

| void BDSAperturePointsCache::ClearCachedFiles | ( | ) |
Delete all cached points from memory and clear the map of files loaded.
Definition at line 195 of file BDSAperturePointsLoader.cc.
Referenced by BDSIM::~BDSIM(), and BDSIMLink::~BDSIMLink().

| std::vector< G4TwoVector > * BDSAperturePointsCache::FindCachedFile | ( | const G4String & | fileNameAndUnits | ) | const |
Retrieve a cached files. Will return nullptr if not found.
Definition at line 202 of file BDSAperturePointsLoader.cc.
Referenced by BDS::LoadAperturePoints().

|
static |
Access the singleton instance.
Definition at line 183 of file BDSAperturePointsLoader.cc.
Referenced by BDS::LoadAperturePoints(), BDSIM::~BDSIM(), and BDSIMLink::~BDSIMLink().

|
private |
Definition at line 90 of file BDSAperturePointsLoader.hh.
|
staticprivate |
Definition at line 88 of file BDSAperturePointsLoader.hh.