55 Fatal(
"TGeoGlobalMagField",
"A global field manager already existing and containing a field. \
56 \n If you want a new global field please set it via: \
57 \n TGeoGlobalMagField::Instance()->SetField(myField).");
59 Warning(
"TGeoGlobalMagField",
"A global field manager already existing. Please access via: \
60 \n TGeoGlobalMagField::Instance().");
63 gROOT->GetListOfGeometries()->Add(
this);
72 gROOT->GetListOfGeometries()->Remove(
this);
90 Error(
"SetField",
"Global field is already set to <%s> and locked",
fField->
GetName());
94 Info(
"SetField",
"Previous magnetic field <%s> will be deleted",
fField->
GetName());
126 Warning(
"Lock",
"Cannot lock global magnetic field since this was not set yet");
Global magnetic field manager.
virtual ~TGeoGlobalMagField()
Global field destructor.
TVirtualMagField * fField
void SetField(TVirtualMagField *field)
Field setter. Deletes previous field if any. Acts only if fLock=kFALSE.
TVirtualMagField * GetField() const
TGeoGlobalMagField()
Global field default constructor.
void Lock()
Locks the global magnetic field if this is set. Cannot be unlocked.
static TGeoGlobalMagField * fgInstance
static TGeoGlobalMagField * Instance()
Returns always a valid static pointer to the field manager.
static TGeoGlobalMagField * GetInstance()
Static getter that does not create the object.
virtual const char * GetName() const
Returns name of object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Abstract class for magnetic field.