Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4NavigationHistoryPool Class Reference

#include <G4NavigationHistoryPool.hh>

Public Member Functions

std::vector< G4NavigationLevel > * GetNewLevels ()
 
std::vector< G4NavigationLevel > * GetLevels ()
 
void DeRegister (std::vector< G4NavigationLevel > *pLevels)
 
void Clean ()
 
void Print () const
 
 ~G4NavigationHistoryPool ()
 

Static Public Member Functions

static G4NavigationHistoryPoolGetInstance ()
 

Detailed Description

Definition at line 47 of file G4NavigationHistoryPool.hh.

Constructor & Destructor Documentation

G4NavigationHistoryPool::~G4NavigationHistoryPool ( )

Definition at line 60 of file G4NavigationHistoryPool.cc.

61 {
62  Clean(); fgInstance = 0;
63 }

Here is the call graph for this function:

Member Function Documentation

void G4NavigationHistoryPool::Clean ( )

Definition at line 69 of file G4NavigationHistoryPool.cc.

70 {
71  for(size_t i=0; i<fPool.size(); ++i)
72  {
73  delete fPool[i];
74  }
75  fPool.clear();
76  fFree.clear();
77 }

Here is the caller graph for this function:

void G4NavigationHistoryPool::DeRegister ( std::vector< G4NavigationLevel > *  pLevels)
inline

Definition at line 107 of file G4NavigationHistoryPool.hh.

108 {
109  fFree.push_back(pLevels);
110 }

Here is the caller graph for this function:

G4NavigationHistoryPool * G4NavigationHistoryPool::GetInstance ( void  )
static

Definition at line 111 of file G4NavigationHistoryPool.cc.

112 {
113  if (!fgInstance)
114  {
115  fgInstance = new G4NavigationHistoryPool;
116  }
117  return fgInstance;
118 }

Here is the caller graph for this function:

std::vector< G4NavigationLevel > * G4NavigationHistoryPool::GetLevels ( )
inline

Definition at line 130 of file G4NavigationHistoryPool.hh.

131 {
132  std::vector<G4NavigationLevel> * levels = 0;
133 
134  if (fFree.size() !=0)
135  {
136  levels = fFree.back();
137  fFree.pop_back();
138  }
139  else
140  {
141  levels = GetNewLevels();
142  }
143 
144  return levels;
145 }
std::vector< G4NavigationLevel > * GetNewLevels()

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< G4NavigationLevel > * G4NavigationHistoryPool::GetNewLevels ( )
inline

Definition at line 116 of file G4NavigationHistoryPool.hh.

117 {
118  std::vector<G4NavigationLevel> * aLevelVec =
119  new std::vector<G4NavigationLevel>(kHistoryMax);
120  Register(aLevelVec);
121 
122  return aLevelVec;
123 }
static const G4int kHistoryMax
Definition: geomdefs.hh:73

Here is the caller graph for this function:

void G4NavigationHistoryPool::Print ( void  ) const

Definition at line 83 of file G4NavigationHistoryPool.cc.

84 {
85 #ifdef G4VERBOSE
86  G4cout << "Total navigation history collections cleaned: "
87  << fPool.size() << G4endl;
88 #endif
89 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:


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