11 gFieldMap =
new map<string, GField *>;
12 gFieldMgrMap =
new map<string, G4FieldManager *>;
14 GManager gFieldManager(
"GMagneto", verbosity);
19 for (
auto &field_definition: field_definition_array) {
20 string name = field_definition.name;
22 if (verbosity >= GVERBOSITY_SUMMARY) { G4cout << field_definition << G4endl; }
24 if (gFieldMap->find(name) == gFieldMap->end()) {
25 (*gFieldMap)[name] = gFieldManager.LoadAndRegisterObjectFromLibrary<
GField>( field_definition.gfieldPluginName());
27 (*gFieldMgrMap)[name] = (*gFieldMap)[name]->create_FieldManager();
Abstract base class representing a magnetic field.
virtual void load_field_definitions(GFieldDefinition gfd)
Sets the field definition for the field.
GMagneto(GOptions *gopts)
Constructs a GMagneto object and loads field definitions from options.
vector< GFieldDefinition > get_GFieldDefinition(GOptions *gopts)