Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4FieldManagerStore Class Reference

#include <G4FieldManagerStore.hh>

Inheritance diagram for G4FieldManagerStore:
Collaboration diagram for G4FieldManagerStore:

Public Member Functions

void ClearAllChordFindersState ()
 
virtual ~G4FieldManagerStore ()
 

Static Public Member Functions

static void Register (G4FieldManager *pVolume)
 
static void DeRegister (G4FieldManager *pVolume)
 
static G4FieldManagerStoreGetInstance ()
 
static void Clean ()
 

Protected Member Functions

 G4FieldManagerStore ()
 

Detailed Description

Definition at line 58 of file G4FieldManagerStore.hh.

Constructor & Destructor Documentation

G4FieldManagerStore::~G4FieldManagerStore ( )
virtual

Definition at line 63 of file G4FieldManagerStore.cc.

64 {
65  Clean();
66  if (fgInstance) { delete fgInstance; fgInstance=0; }
67 }

Here is the call graph for this function:

G4FieldManagerStore::G4FieldManagerStore ( )
protected

Definition at line 53 of file G4FieldManagerStore.cc.

54  : std::vector<G4FieldManager*>()
55 {
56  reserve(100);
57 }

Here is the caller graph for this function:

Member Function Documentation

void G4FieldManagerStore::Clean ( )
static

Definition at line 73 of file G4FieldManagerStore.cc.

74 {
75  // Locks store for deletion of field managers. De-registration will be
76  // performed at this stage. G4FieldManagers will not de-register themselves.
77  //
78  locked = true;
79 
80  size_t i=0;
82 
83  for(iterator pos=store->begin(); pos!=store->end(); pos++)
84  {
85  if (*pos) { delete *pos; }
86  i++;
87  }
88 
89 #ifdef G4GEOMETRY_DEBUG
90  if (store->size() < i-1)
91  { G4cout << "No field managers deleted. Already deleted by user ?" << G4endl; }
92  else
93  { G4cout << i-1 << " field managers deleted !" << G4endl; }
94 #endif
95 
96  locked = false;
97  store->clear();
98 }
G4GLOB_DLL std::ostream G4cout
static G4FieldManagerStore * GetInstance()
#define G4endl
Definition: G4ios.hh:61
static const G4double pos

Here is the call graph for this function:

Here is the caller graph for this function:

void G4FieldManagerStore::ClearAllChordFindersState ( )

Definition at line 146 of file G4FieldManagerStore.cc.

147 {
148  G4ChordFinder *pChordFnd;
149 
150  for (iterator i=GetInstance()->begin(); i!=GetInstance()->end(); i++)
151  {
152  pChordFnd = (*i)->GetChordFinder();
153  if( pChordFnd )
154  {
155  pChordFnd->ResetStepEstimate();
156  }
157  }
158 }
static G4FieldManagerStore * GetInstance()
void ResetStepEstimate()

Here is the call graph for this function:

Here is the caller graph for this function:

void G4FieldManagerStore::DeRegister ( G4FieldManager pVolume)
static

Definition at line 113 of file G4FieldManagerStore.cc.

114 {
115  if (!locked) // Do not de-register if locked !
116  {
117  for (iterator i=GetInstance()->begin(); i!=GetInstance()->end(); i++)
118  {
119  if (*i==pFieldMgr) // For LogVol was **i == *pLogVolume ... Reason?
120  {
121  GetInstance()->erase(i);
122  break;
123  }
124  }
125  }
126 }
static G4FieldManagerStore * GetInstance()

Here is the call graph for this function:

Here is the caller graph for this function:

G4FieldManagerStore * G4FieldManagerStore::GetInstance ( )
static

Definition at line 132 of file G4FieldManagerStore.cc.

133 {
134  if (!fgInstance)
135  {
136  fgInstance = new G4FieldManagerStore;
137  }
138  return fgInstance;
139 }

Here is the call graph for this function:

Here is the caller graph for this function:

void G4FieldManagerStore::Register ( G4FieldManager pVolume)
static

Definition at line 104 of file G4FieldManagerStore.cc.

105 {
106  GetInstance()->push_back(pFieldManager);
107 }
static G4FieldManagerStore * GetInstance()

Here is the call graph for this function:

Here is the caller graph for this function:


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