GENFIT  Rev:NoNumberAvailable
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
genfit::FieldManager Class Reference

Singleton which provides access to magnetic field maps. More...

#include <FieldManager.h>

Collaboration diagram for genfit::FieldManager:
Collaboration graph

Public Member Functions

AbsBFieldgetField ()
 
TVector3 getFieldVal (const TVector3 &position)
 This does NOT use the cache! More...
 
void getFieldVal (const double &posX, const double &posY, const double &posZ, double &Bx, double &By, double &Bz)
 
void init (AbsBField *b)
 set the magnetic field here. Magnetic field classes must be derived from AbsBField. More...
 
bool isInitialized ()
 
void checkInitialized ()
 
void useCache (bool opt=true, unsigned int nBuckets=8)
 Cache last lookup positions, and use stored field values if a lookup at (almost) the same position is done. More...
 

Static Public Member Functions

static void checkInstanciated ()
 
static FieldManagergetInstance ()
 Get singleton instance. More...
 

Private Member Functions

 FieldManager ()
 
 ~FieldManager ()
 

Static Private Attributes

static FieldManagerinstance_ = NULL
 
static AbsBFieldfield_ = NULL
 
static bool useCache_
 
static unsigned int n_buckets_
 
static fieldCachecache_
 

Detailed Description

Singleton which provides access to magnetic field maps.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

Definition at line 53 of file FieldManager.h.

Constructor & Destructor Documentation

genfit::FieldManager::FieldManager ( )
inlineprivate

Definition at line 122 of file FieldManager.h.

Referenced by getInstance().

genfit::FieldManager::~FieldManager ( )
inlineprivate

Definition at line 124 of file FieldManager.h.

References cache_.

Member Function Documentation

void genfit::FieldManager::checkInitialized ( )
inline

Definition at line 84 of file FieldManager.h.

References genfit::errorOut, and isInitialized().

Referenced by getField(), and getFieldVal().

static void genfit::FieldManager::checkInstanciated ( )
inlinestatic

Definition at line 93 of file FieldManager.h.

References genfit::errorOut, and instance_.

AbsBField* genfit::FieldManager::getField ( )
inline

Definition at line 57 of file FieldManager.h.

References checkInitialized(), and field_.

TVector3 genfit::FieldManager::getFieldVal ( const TVector3 &  position)
inline
void genfit::FieldManager::getFieldVal ( const double &  posX,
const double &  posY,
const double &  posZ,
double &  Bx,
double &  By,
double &  Bz 
)
static FieldManager* genfit::FieldManager::getInstance ( )
inlinestatic
void genfit::FieldManager::init ( AbsBField b)
inline

set the magnetic field here. Magnetic field classes must be derived from AbsBField.

Definition at line 78 of file FieldManager.h.

References field_.

bool genfit::FieldManager::isInitialized ( )
inline

Definition at line 82 of file FieldManager.h.

References field_.

Referenced by checkInitialized().

void genfit::FieldManager::useCache ( bool  opt = true,
unsigned int  nBuckets = 8 
)

Cache last lookup positions, and use stored field values if a lookup at (almost) the same position is done.

Member Data Documentation

fieldCache* genfit::FieldManager::cache_
staticprivate

Definition at line 134 of file FieldManager.h.

Referenced by ~FieldManager().

AbsBField * genfit::FieldManager::field_ = NULL
staticprivate

Definition at line 129 of file FieldManager.h.

Referenced by getField(), getFieldVal(), init(), and isInitialized().

FieldManager * genfit::FieldManager::instance_ = NULL
staticprivate

Definition at line 128 of file FieldManager.h.

Referenced by checkInstanciated(), and getInstance().

unsigned int genfit::FieldManager::n_buckets_
staticprivate

Definition at line 133 of file FieldManager.h.

bool genfit::FieldManager::useCache_
staticprivate

Definition at line 132 of file FieldManager.h.


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