Represents a world containing collections of GFields and G4FieldManagers.
More...
#include <gmagneto.h>
|
| GMagneto (const std::shared_ptr< GOptions > &gopts) |
| Constructs a GMagneto object and loads field definitions from options.
|
|
bool | isField (const std::string &name) const |
| Checks if a field with the given name exists.
|
|
std::shared_ptr< GField > | getField (std::string name) |
| Retrieves a GField object by its name.
|
|
std::shared_ptr< G4FieldManager > | getFieldMgr (std::string name) |
| Retrieves a G4FieldManager object by its name.
|
|
GMagneto manages the lifecycle and access to magnetic field objects (GField
) and their corresponding field managers (G4FieldManager
).
Definition at line 14 of file gmagneto.h.
◆ GMagneto()
GMagneto::GMagneto |
( |
const std::shared_ptr< GOptions > & | gopts | ) |
|
|
explicit |
- Parameters
-
gopts | Pointer to the GOptions object containing configuration options. |
Definition at line 12 of file gmagneto.cc.
◆ getField()
std::shared_ptr< GField > GMagneto::getField |
( |
std::string | name | ) |
|
|
inline |
- Parameters
-
name | Name of the field to retrieve. |
- Returns
- Pointer to the GField object.
- Exceptions
-
Logs | an error and exits if the field is not found. |
Definition at line 43 of file gmagneto.h.
◆ getFieldMgr()
std::shared_ptr< G4FieldManager > GMagneto::getFieldMgr |
( |
std::string | name | ) |
|
|
inline |
- Parameters
-
name | Name of the field manager to retrieve. |
- Returns
- Pointer to the G4FieldManager object.
- Exceptions
-
Logs | an error and exits if the field manager is not found. |
Definition at line 56 of file gmagneto.h.
◆ isField()
bool GMagneto::isField |
( |
const std::string & | name | ) |
const |
|
inline |
- Parameters
-
name | Name of the field to check. |
- Returns
- True if the field exists, false otherwise.
Definition at line 35 of file gmagneto.h.
The documentation for this class was generated from the following files: