LDMX Software
|
Global store to access magnetic field objects. More...
#include <MagneticFieldStore.h>
Public Types | |
typedef std::map< std::string, G4MagneticField * > | MagFieldMap |
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 | magFields_ |
Map of names to magnetic fields. | |
Global store to access magnetic field objects.
Definition at line 19 of file MagneticFieldStore.h.
typedef std::map<std::string, G4MagneticField*> simcore::MagneticFieldStore::MagFieldMap |
Map of names to magnetic fields.
Definition at line 24 of file MagneticFieldStore.h.
|
inline |
Destructor.
Cleans up all stored G4MagneticFields
Definition at line 40 of file MagneticFieldStore.h.
References magFields_.
|
inline |
Add a magnetic field by name.
name | The name of the magnetic field. |
magField | The magnetic field definition. |
Definition at line 60 of file MagneticFieldStore.h.
References magFields_.
Referenced by simcore::geo::AuxInfoReader::createMagneticField().
|
inlinestatic |
Get the global instance of the magnetic field store.
Definition at line 30 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 51 of file MagneticFieldStore.h.
References magFields_.
Referenced by simcore::geo::AuxInfoReader::assignAuxInfoToVolumes().
|
private |
Map of names to magnetic fields.
Definition at line 68 of file MagneticFieldStore.h.
Referenced by addMagneticField(), getMagneticField(), and ~MagneticFieldStore().