#include <MagField.h>
Collaboration diagram for Atlfast::MagField:
Public Member Functions | |
bool | is_on () const |
double | strength () const |
Static Public Member Functions | |
static MagField * | Instance () |
static MagField * | Instance (double) |
Private Member Functions | |
MagField (double) | |
~MagField () | |
Private Attributes | |
const double | m_strength |
Static Private Attributes | |
static MagField * | m_instance |
Definition at line 23 of file MagField.h.
Atlfast::MagField::MagField | ( | double | ) | [private] |
Atlfast::MagField::~MagField | ( | ) | [inline, private] |
MagField * Atlfast::MagField::Instance | ( | ) | [static] |
MagField * Atlfast::MagField::Instance | ( | double | ) | [static] |
Definition at line 14 of file MagField.cxx.
00014 { 00015 00016 // User gets the MagField singleton using Instance(), 00017 // so the default 0 is passed as argument. If a finite argument is 00018 // passed, it is assumed the user wants a new MagField with this 00019 // field strength. 00020 00021 if ( m_instance != 0 && str ){ 00022 00023 std::cout << "MagField instance already exists with field strength " 00024 << m_instance->strength() << ", using that" << std::endl; 00025 } 00026 00027 if ( m_instance == 0 ){ 00028 m_instance = new MagField(str); 00029 } 00030 00031 return m_instance; 00032 00033 }
bool Atlfast::MagField::is_on | ( | ) | const |
Definition at line 35 of file MagField.cxx.
00035 { 00036 00037 return m_strength ? true : false; 00038 00039 }
double Atlfast::MagField::strength | ( | ) | const |
MagField * Atlfast::MagField::m_instance [static, private] |
Definition at line 35 of file MagField.h.
const double Atlfast::MagField::m_strength [private] |
Definition at line 42 of file MagField.h.