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

#include <G4AllITFinder.hh>

Public Member Functions

 ~G4AllITFinder ()
 
G4VITFinderGetInstance (G4ITType)
 
G4ITBoxGetBox (const G4Track *)
 
void RegisterManager (G4VITFinder *manager)
 
void Push (G4Track *track)
 
void SetVerboseLevel (G4int level)
 
G4int GetVerboseLevel ()
 
void UpdatePositionMap ()
 
template<typename T >
G4KDTreeResultHandle FindNearest (const G4ThreeVector &pos, const T *it)
 
template<typename T >
G4KDTreeResultHandle FindNearest (const T *it0, const T *it)
 
template<typename T >
G4KDTreeResultHandle FindNearestInRange (const G4ThreeVector &pos, const T *it, G4double range)
 
template<typename T >
G4KDTreeResultHandle FindNearestInRange (const T *it0, const T *it, G4double range)
 

Static Public Member Functions

static G4AllITFinderInstance ()
 
static void DeleteInstance ()
 

Detailed Description

Holds all IT Manager, and take care of deleting them when AllITManager is deleted Set general verbose for all IT Manager

Definition at line 71 of file G4AllITFinder.hh.

Constructor & Destructor Documentation

G4AllITFinder::~G4AllITFinder ( )

To delete the Instance you should use DeleteInstance() rather than the destructor

Definition at line 62 of file G4AllITFinder.cc.

63 {
64  std::map<G4ITType, G4VITFinder*>::iterator it;
65  std::map<G4ITType, G4VITFinder*>::iterator it_tmp;
66 
67  for (it = fITSubManager.begin(); it != fITSubManager.end();)
68  {
69  if (it->second) delete it->second;
70  it_tmp = it;
71  it++;
72  fITSubManager.erase(it_tmp);
73  }
74  fpInstance = 0;
75 }

Member Function Documentation

void G4AllITFinder::DeleteInstance ( )
static

Definition at line 53 of file G4AllITFinder.cc.

54 {
55  if (fpInstance)
56  {
57  delete fpInstance;
58  fpInstance = 0;
59  }
60 }

Here is the caller graph for this function:

template<typename T >
G4KDTreeResultHandle G4AllITFinder::FindNearest ( const G4ThreeVector pos,
const T *  it 
)
inline

Definition at line 127 of file G4AllITFinder.hh.

129  {
130  return G4ITFinder<T>::Instance()->FindNearest(pos, it);
131  }
static G4ITFinder * Instance()
G4KDTreeResultHandle FindNearest(const G4ThreeVector &, int key)

Here is the call graph for this function:

template<typename T >
G4KDTreeResultHandle G4AllITFinder::FindNearest ( const T *  it0,
const T *  it 
)
inline

Definition at line 134 of file G4AllITFinder.hh.

136  {
137  return G4ITFinder<T>::Instance()->FindNearest(it0, it);
138  }
static G4ITFinder * Instance()
G4KDTreeResultHandle FindNearest(const G4ThreeVector &, int key)

Here is the call graph for this function:

template<typename T >
G4KDTreeResultHandle G4AllITFinder::FindNearestInRange ( const G4ThreeVector pos,
const T *  it,
G4double  range 
)
inline

Definition at line 141 of file G4AllITFinder.hh.

144  {
145  return G4ITFinder<T>::Instance()->FindNearestInRange(pos, it, range);
146  }
static G4ITFinder * Instance()
G4KDTreeResultHandle FindNearestInRange(const T *point, int key, G4double)

Here is the call graph for this function:

template<typename T >
G4KDTreeResultHandle G4AllITFinder::FindNearestInRange ( const T *  it0,
const T *  it,
G4double  range 
)
inline

Definition at line 149 of file G4AllITFinder.hh.

152  {
153  return G4ITFinder<T>::Instance()->FindNearestInRange(it0, it, range);
154  }
static G4ITFinder * Instance()
G4KDTreeResultHandle FindNearestInRange(const T *point, int key, G4double)

Here is the call graph for this function:

G4ITBox* G4AllITFinder::GetBox ( const G4Track )
G4VITFinder * G4AllITFinder::GetInstance ( G4ITType  type)

Definition at line 87 of file G4AllITFinder.cc.

88 {
89  map<G4ITType, G4VITFinder*>::iterator it = fITSubManager.find(type);
90 
91  if (it == fITSubManager.end()) return 0;
92 
93  return it->second;
94 }
G4int G4AllITFinder::GetVerboseLevel ( )
inline

Definition at line 97 of file G4AllITFinder.hh.

98  {
99  return fVerbose;
100  }
G4AllITFinder * G4AllITFinder::Instance ( )
static

Definition at line 47 of file G4AllITFinder.cc.

48 {
49  if (!fpInstance) fpInstance = new G4AllITFinder();
50  return fpInstance;
51 }
void G4AllITFinder::Push ( G4Track track)

Definition at line 101 of file G4AllITFinder.cc.

102 {
103  fITSubManager[GetIT(track)->GetITType()]->Push(track);
104 }
G4IT * GetIT(const G4Track *track)
Definition: G4IT.cc:49
virtual const G4ITType GetITType() const =0

Here is the call graph for this function:

void G4AllITFinder::RegisterManager ( G4VITFinder manager)

Definition at line 96 of file G4AllITFinder.cc.

97 {
98  fITSubManager[manager->GetITType()] = manager;
99 }
virtual G4ITType GetITType()=0

Here is the call graph for this function:

void G4AllITFinder::SetVerboseLevel ( G4int  level)
inline

Set General verbose for all IT Manager See ITManager builder

Definition at line 93 of file G4AllITFinder.hh.

94  {
95  fVerbose = level;
96  }
void G4AllITFinder::UpdatePositionMap ( )

Definition at line 77 of file G4AllITFinder.cc.

78 {
79  std::map<G4ITType, G4VITFinder*>::iterator it = fITSubManager.begin();
80 
81  for (; it != fITSubManager.end(); it++)
82  {
83  it->second->UpdatePositionMap();
84  }
85 }

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