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");
void Fatal(const char *location, const char *msgfmt,...)
static TGeoGlobalMagField * Instance()
Returns always a valid static pointer to the field manager.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
TGeoGlobalMagField()
Global field default constructor.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual ~TGeoGlobalMagField()
Global field destructor.
virtual const char * GetName() const
Returns name of object.
Global magnetic field manager.
void Warning(const char *location, const char *msgfmt,...)
static TGeoGlobalMagField * GetInstance()
Static getter that does not create the object.
static TGeoGlobalMagField * fgInstance
Abstract class for magnetic field.
TVirtualMagField * fField
void Lock()
Locks the global magnetic field if this is set. Cannot be unlocked.
void SetField(TVirtualMagField *field)
Field setter. Deletes previous field if any. Acts only if fLock=kFALSE.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.