gfields
GMagneto Class Reference

Represents a world containing collections of GFields and G4FieldManagers. More...

#include <gmagneto.h>

Inheritance diagram for GMagneto:
Inheritance graph
Collaboration diagram for GMagneto:
Collaboration graph

Public Member Functions

 GMagneto (GOptions *gopts)
 Constructs a GMagneto object and loads field definitions from options. More...
 
 ~GMagneto ()
 Destructor to clean up dynamically allocated memory. More...
 
bool isField (std::string name)
 Checks if a field with the given name exists. More...
 
GFieldgetField (std::string name)
 Retrieves a GField object by its name. More...
 
G4FieldManager * getFieldMgr (std::string name)
 Retrieves a G4FieldManager object by its name. More...
 

Detailed Description

GMagneto manages the lifecycle and access to magnetic field objects (GField) and their corresponding field managers (G4FieldManager).

Definition at line 15 of file gmagneto.h.

Constructor & Destructor Documentation

◆ GMagneto()

GMagneto::GMagneto ( GOptions *  gopts)
Parameters
goptsPointer to the GOptions object containing configuration options.

Definition at line 9 of file gmagneto.cc.

◆ ~GMagneto()

GMagneto::~GMagneto ( )
inline

Definition at line 26 of file gmagneto.h.

Member Function Documentation

◆ getField()

GField* GMagneto::getField ( std::string  name)
inline
Parameters
nameName of the field to retrieve.
Returns
Pointer to the GField object.
Exceptions
Logsan error and exits if the field is not found.

Definition at line 54 of file gmagneto.h.

◆ getFieldMgr()

G4FieldManager* GMagneto::getFieldMgr ( std::string  name)
inline
Parameters
nameName of the field manager to retrieve.
Returns
Pointer to the G4FieldManager object.
Exceptions
Logsan error and exits if the field manager is not found.

Definition at line 69 of file gmagneto.h.

◆ isField()

bool GMagneto::isField ( std::string  name)
inline
Parameters
nameName of the field to check.
Returns
True if the field exists, false otherwise.

Definition at line 43 of file gmagneto.h.


The documentation for this class was generated from the following files: