Atlfast::MagField Class Reference

#include <MagField.h>

Collaboration diagram for Atlfast::MagField:

Collaboration graph
[legend]
List of all members.

Public Member Functions

bool is_on () const
double strength () const

Static Public Member Functions

static MagFieldInstance ()
static MagFieldInstance (double)

Private Member Functions

 MagField (double)
 ~MagField ()

Private Attributes

const double m_strength

Static Private Attributes

static MagFieldm_instance

Detailed Description

Definition at line 23 of file MagField.h.


Constructor & Destructor Documentation

Atlfast::MagField::MagField ( double   )  [private]

Definition at line 8 of file MagField.cxx.

00008 : m_strength(str) {}

Atlfast::MagField::~MagField (  )  [inline, private]

Definition at line 35 of file MagField.h.

00035 {};    


Member Function Documentation

MagField * Atlfast::MagField::Instance (  )  [static]

Definition at line 10 of file MagField.cxx.

00010                               {
00011     return Instance(0);
00012   }

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

Definition at line 41 of file MagField.cxx.

00041                                   {
00042     
00043     return m_strength;
00044     
00045   }


Member Data Documentation

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.


The documentation for this class was generated from the following files:
Generated on Fri Sep 21 13:00:22 2007 for AtlfastEvent by  doxygen 1.5.1