|
LDMX Software
|
Global store to access magnetic field objects. More...
#include <MagneticFieldStore.h>
Public Types | |
| using | MagFieldMap = std::map<std::string, G4MagneticField*> |
| Map of names to magnetic fields. | |
Public Member Functions | |
| ~MagneticFieldStore () | |
| Destructor. | |
| G4MagneticField * | getMagneticField (const std::string &name) |
| Get a magnetic field by name. | |
| void | addMagneticField (const std::string &name, G4MagneticField *magField) |
| Add a magnetic field by name. | |
Static Public Member Functions | |
| static MagneticFieldStore * | getInstance () |
| Get the global instance of the magnetic field store. | |
Private Attributes | |
| MagFieldMap | mag_fields_ |
| Map of names to magnetic fields. | |
Global store to access magnetic field objects.
Definition at line 21 of file MagneticFieldStore.h.
| using simcore::MagneticFieldStore::MagFieldMap = std::map<std::string, G4MagneticField*> |
Map of names to magnetic fields.
Definition at line 26 of file MagneticFieldStore.h.
|
inline |
Destructor.
Cleans up all stored G4MagneticFields
Definition at line 42 of file MagneticFieldStore.h.
References mag_fields_.
|
inline |
Add a magnetic field by name.
| name | The name of the magnetic field. |
| magField | The magnetic field definition. |
Definition at line 62 of file MagneticFieldStore.h.
References mag_fields_.
Referenced by simcore::geo::AuxInfoReader::createMagneticField().
|
inlinestatic |
Get the global instance of the magnetic field store.
Definition at line 32 of file MagneticFieldStore.h.
Referenced by simcore::geo::AuxInfoReader::assignAuxInfoToVolumes(), and simcore::geo::AuxInfoReader::createMagneticField().
|
inline |
Get a magnetic field by name.
| name | The name of the magnetic field. |
Definition at line 53 of file MagneticFieldStore.h.
References mag_fields_.
Referenced by simcore::geo::AuxInfoReader::assignAuxInfoToVolumes().
|
private |
Map of names to magnetic fields.
Definition at line 70 of file MagneticFieldStore.h.
Referenced by addMagneticField(), getMagneticField(), and ~MagneticFieldStore().