Lightweight configuration carrier used to load and configure a GField plugin.
More...
#include <gfield.h>
|
| | GFieldDefinition ()=default |
| | Default constructor.
|
| |
| void | add_map_parameter (const std::string &key, const std::string &value) |
| | Add or overwrite a parameter in the field-parameter map.
|
| |
| std::string | gfieldPluginName () const |
| | Derive the plugin name for the field definition.
|
| |
|
| std::string | name |
| | Field name key used by GMagneto maps.
|
| |
| std::string | integration_stepper |
| | Integration stepper name (string) used when creating the G4ChordFinder.
|
| |
| double | minimum_step = 0.0 |
| | Minimum step size used when constructing the G4ChordFinder (Geant4 length units).
|
| |
| std::string | type |
| | Field type discriminator used to derive the plugin factory name (e.g. "multipoles").
|
| |
| std::map< std::string, std::string > | field_parameters |
| | Field parameters stored as string expressions (often including unit expressions).
|
| |
A GFieldDefinition is typically built from user options (see gfields::get_GFieldDefinition()). It is then passed to a concrete field via load_field_definitions().
Notes on plugin naming:
- The plugin shared-library entry point is expected to expose the C symbol
GFieldFactory.
- The library name or plugin identifier is derived from gfieldPluginName().
Definition at line 26 of file gfield.h.
◆ GFieldDefinition()
| GFieldDefinition::GFieldDefinition |
( |
| ) |
|
|
default |
◆ add_map_parameter()
| void GFieldDefinition::add_map_parameter |
( |
const std::string & | key, |
|
|
const std::string & | value ) |
|
inline |
- Parameters
-
| key | Parameter key (e.g. "strength"). |
| value | Parameter value expression (e.g. "2.0*tesla"). |
Definition at line 52 of file gfield.h.
◆ gfieldPluginName()
| std::string GFieldDefinition::gfieldPluginName |
( |
| ) |
const |
|
inline |
- Returns
- Plugin name string.
Convention:
- This method returns
"gfield" + type + "Factory".
- For example, a type of
"multipoles" yields "gfieldmultipolesFactory".
Definition at line 62 of file gfield.h.
◆ operator<<
- Parameters
-
| stream | Output stream. |
| gfd | Field definition to print. |
- Returns
- The same stream for chaining.
This prints the core integration parameters and then each entry in field_parameters.
Definition at line 72 of file gfield.h.
◆ field_parameters
| std::map<std::string, std::string> GFieldDefinition::field_parameters |
◆ integration_stepper
| std::string GFieldDefinition::integration_stepper |
◆ minimum_step
| double GFieldDefinition::minimum_step = 0.0 |
◆ name
| std::string GFieldDefinition::name |
◆ type
| std::string GFieldDefinition::type |
The documentation for this struct was generated from the following file: