Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
genf::GFFieldManager Class Reference

#include <GFFieldManager.h>

Public Member Functions

GFAbsBFieldgetField ()
 
void init (GFAbsBField *b)
 set the magntic field here. Magnetic field classes must be derived from GFAbsBField More...
 

Static Public Member Functions

static TVector3 getFieldVal (const TVector3 &x)
 
static GFFieldManagergetInstance ()
 

Private Member Functions

 GFFieldManager ()
 

Static Private Attributes

static GFFieldManagerfInstance = NULL
 
static GFAbsBFieldfField = NULL
 

Detailed Description

Definition at line 38 of file GFFieldManager.h.

Constructor & Destructor Documentation

genf::GFFieldManager::GFFieldManager ( )
inlineprivate

Definition at line 40 of file GFFieldManager.h.

40 {}

Member Function Documentation

GFAbsBField* genf::GFFieldManager::getField ( )
inline

Definition at line 45 of file GFFieldManager.h.

45  {
46  if(fField==NULL){
47  std::cerr << "Appareantly GFFieldManager hasnt been initialized with a correct GFAbsBField pointer -> abort" << std::endl;
48  throw;
49  }
50  return fField;
51  }
static GFAbsBField * fField
QTextStream & endl(QTextStream &s)
static TVector3 genf::GFFieldManager::getFieldVal ( const TVector3 &  x)
inlinestatic

Definition at line 53 of file GFFieldManager.h.

53  {
54  if(fInstance==NULL){
55  std::cerr << "Appareantly GFFieldManager hasnt been instantiated yet, call getInstance() and init() before getFieldVal() -> abort" << std::endl;
56  throw;
57  }
58  if(fField==NULL){
59  std::cerr << "Appareantly GFFieldManager hasnt been initialized with a correct GFAbsBField pointer -> abort" << std::endl;
60  throw;
61  }
62  return fField->get(x);
63  }
static GFFieldManager * fInstance
virtual TVector3 get(const TVector3 &) const =0
override this is you concrete implementation
static GFAbsBField * fField
list x
Definition: train.py:276
QTextStream & endl(QTextStream &s)
static GFFieldManager* genf::GFFieldManager::getInstance ( )
inlinestatic

Definition at line 70 of file GFFieldManager.h.

70  {
71  if(fInstance==NULL) {
72  fInstance = new GFFieldManager();
73  }
74  return fInstance;
75  }
static GFFieldManager * fInstance
void genf::GFFieldManager::init ( GFAbsBField b)
inline

set the magntic field here. Magnetic field classes must be derived from GFAbsBField

Definition at line 66 of file GFFieldManager.h.

66  {
67  fField=b;
68  }
static GFAbsBField * fField
static bool * b
Definition: config.cpp:1043

Member Data Documentation

genf::GFAbsBField * genf::GFFieldManager::fField = NULL
staticprivate

Definition at line 42 of file GFFieldManager.h.

genf::GFFieldManager * genf::GFFieldManager::fInstance = NULL
staticprivate

Definition at line 41 of file GFFieldManager.h.


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