All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  }
BEGIN_PROLOG could also be cerr
static GFAbsBField * fField
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
process_name opflash particleana ie x
BEGIN_PROLOG could also be cerr
virtual TVector3 get(const TVector3 &) const =0
override this is you concrete implementation
static GFAbsBField * fField
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

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: