7#ifndef SIMCORE_MAGNETICFIELDSTORE_H_
8#define SIMCORE_MAGNETICFIELDSTORE_H_
11#include "G4MagneticField.hh"
42 delete nameField.second;
Global store to access magnetic field objects.
std::map< std::string, G4MagneticField * > MagFieldMap
Map of names to magnetic fields.
~MagneticFieldStore()
Destructor.
MagFieldMap magFields_
Map of names to magnetic fields.
static MagneticFieldStore * getInstance()
Get the global instance of the magnetic field store.
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.