Geant4  10.02.p03
G4AllITFinder Class Reference

#include <G4AllITFinder.hh>

Collaboration diagram for G4AllITFinder:

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 ()
 

Private Member Functions

 G4AllITFinder ()
 

Private Attributes

std::map< G4ITType, G4VITFinder * > fITSubManager
 
int fVerbose
 

Static Private Attributes

static G4ThreadLocal G4AllITFinderfpInstance = 0
 

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::~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 }
std::map< G4ITType, G4VITFinder * > fITSubManager
static G4ThreadLocal G4AllITFinder * fpInstance

◆ G4AllITFinder()

G4AllITFinder::G4AllITFinder ( )
private

Definition at line 42 of file G4AllITFinder.cc.

43 {
44  fVerbose = 0;
45 }
Here is the caller graph for this function:

Member Function Documentation

◆ DeleteInstance()

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 }
static G4ThreadLocal G4AllITFinder * fpInstance
Here is the caller graph for this function:

◆ FindNearest() [1/2]

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:
Here is the caller graph for this function:

◆ FindNearest() [2/2]

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:

◆ FindNearestInRange() [1/2]

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:
Here is the caller graph for this function:

◆ FindNearestInRange() [2/2]

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:

◆ GetBox()

G4ITBox* G4AllITFinder::GetBox ( const G4Track *  )

◆ GetInstance()

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 }
std::map< G4ITType, G4VITFinder * > fITSubManager

◆ GetVerboseLevel()

G4int G4AllITFinder::GetVerboseLevel ( )
inline

Definition at line 97 of file G4AllITFinder.hh.

98  {
99  return fVerbose;
100  }
Here is the call graph for this function:

◆ Instance()

G4AllITFinder * G4AllITFinder::Instance ( void  )
static

Definition at line 47 of file G4AllITFinder.cc.

48 {
49  if (!fpInstance) fpInstance = new G4AllITFinder();
50  return fpInstance;
51 }
static G4ThreadLocal G4AllITFinder * fpInstance

◆ Push()

void G4AllITFinder::Push ( G4Track *  track)

Definition at line 101 of file G4AllITFinder.cc.

102 {
104 }
std::map< G4ITType, G4VITFinder * > fITSubManager
G4IT * GetIT(const G4Track *track)
Definition: G4IT.cc:49
virtual const G4ITType GetITType() const =0
Here is the call graph for this function:

◆ RegisterManager()

void G4AllITFinder::RegisterManager ( G4VITFinder manager)

Definition at line 96 of file G4AllITFinder.cc.

97 {
98  fITSubManager[manager->GetITType()] = manager;
99 }
std::map< G4ITType, G4VITFinder * > fITSubManager
virtual G4ITType GetITType()=0
Here is the call graph for this function:

◆ SetVerboseLevel()

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  }

◆ UpdatePositionMap()

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 }
std::map< G4ITType, G4VITFinder * > fITSubManager
Here is the caller graph for this function:

Member Data Documentation

◆ fITSubManager

std::map<G4ITType, G4VITFinder*> G4AllITFinder::fITSubManager
private

Definition at line 121 of file G4AllITFinder.hh.

◆ fpInstance

G4ThreadLocal G4AllITFinder * G4AllITFinder::fpInstance = 0
staticprivate

Definition at line 120 of file G4AllITFinder.hh.

◆ fVerbose

int G4AllITFinder::fVerbose
private

Definition at line 123 of file G4AllITFinder.hh.


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