Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4AllITManager Class Reference

#include <G4AllITManager.hh>

Public Member Functions

 ~G4AllITManager ()
 
template<typename T >
G4ITManager< T > * Instance ()
 
G4VITManagerGetInstance (G4ITType)
 
G4ITBoxGetBox (const G4Track *)
 
void RegisterManager (G4VITManager *manager)
 
void Push (G4Track *track)
 
void SetVerboseLevel (G4int level)
 
G4int GetVerboseLevel ()
 
void UpdatePositionMap ()
 
void CreateTree ()
 
template<typename T >
std::vector< std::pair< G4IT *, double > > * FindNearest (const G4ThreeVector &pos, const T *it)
 
template<typename T >
std::vector< std::pair< G4IT *, double > > * FindNearest (const T *it0, const T *it)
 
template<typename T >
std::vector< std::pair< G4IT *, double > > * FindNearestInRange (const G4ThreeVector &pos, const T *it, G4double range)
 
template<typename T >
std::vector< std::pair< G4IT *, double > > * FindNearestInRange (const T *it0, const T *it, G4double range)
 

Static Public Member Functions

static G4AllITManagerInstance ()
 
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 60 of file G4AllITManager.hh.

Constructor & Destructor Documentation

◆ ~G4AllITManager()

G4AllITManager::~G4AllITManager ( )

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

Definition at line 58 of file G4AllITManager.cc.

59{
60 std::map<G4ITType, G4VITManager*>::iterator it ;
61 std::map<G4ITType, G4VITManager*>::iterator it_tmp ;
62
63 for(it = fITSubManager.begin(); it!=fITSubManager.end() ; )
64 {
65 if(it->second) delete it->second;
66 it_tmp = it;
67 it++;
68 fITSubManager.erase(it_tmp);
69 }
70 fInstance.release();
71}

Member Function Documentation

◆ CreateTree()

void G4AllITManager::CreateTree ( )

Definition at line 83 of file G4AllITManager.cc.

84{
85 std::map<G4ITType, G4VITManager*>::iterator it = fITSubManager.begin() ;
86
87 for(; it!=fITSubManager.end() ; it++)
88 {
89 it->second->CreateTree();
90 }
91}

◆ DeleteInstance()

void G4AllITManager::DeleteInstance ( )
static

Definition at line 53 of file G4AllITManager.cc.

54{
55 fInstance.reset();
56}

◆ FindNearest() [1/2]

template<typename T >
std::vector< std::pair< G4IT *, double > > * G4AllITManager::FindNearest ( const G4ThreeVector pos,
const T *  it 
)
inline

Definition at line 111 of file G4AllITManager.hh.

112{
113 return G4ITManager<T>::Instance()->FindNearest(pos,it);
114}
static G4ITManager< T > * Instance()

◆ FindNearest() [2/2]

template<typename T >
std::vector< std::pair< G4IT *, double > > * G4AllITManager::FindNearest ( const T *  it0,
const T *  it 
)
inline

Definition at line 117 of file G4AllITManager.hh.

118{
119 return G4ITManager<T>::Instance()->FindNearest(it0, it) ;
120}

◆ FindNearestInRange() [1/2]

template<typename T >
std::vector< std::pair< G4IT *, double > > * G4AllITManager::FindNearestInRange ( const G4ThreeVector pos,
const T *  it,
G4double  range 
)
inline

Definition at line 123 of file G4AllITManager.hh.

124{
125 return G4ITManager<T>::Instance()->FindNearestInRange(pos, it, range);
126}

◆ FindNearestInRange() [2/2]

template<typename T >
std::vector< std::pair< G4IT *, double > > * G4AllITManager::FindNearestInRange ( const T *  it0,
const T *  it,
G4double  range 
)
inline

Definition at line 129 of file G4AllITManager.hh.

130{
131 return G4ITManager<T>::Instance()->FindNearestInRange(it0, it, range);
132}

◆ GetBox()

G4ITBox * G4AllITManager::GetBox ( const G4Track track)

Definition at line 112 of file G4AllITManager.cc.

113{
114 map<G4ITType, G4VITManager*>::iterator it = fITSubManager.find(GetIT(track)->GetITType());
115
116 if(it == fITSubManager.end()) return 0;
117
118 return it->second->GetBox(track);
119}
G4IT * GetIT(const G4Track *track)
Definition: G4IT.cc:48

◆ GetInstance()

G4VITManager * G4AllITManager::GetInstance ( G4ITType  type)

Definition at line 98 of file G4AllITManager.cc.

99{
100 map<G4ITType, G4VITManager*>::iterator it = fITSubManager.find(type);
101
102 if(it == fITSubManager.end()) return 0;
103
104 return it->second;
105}

Referenced by G4VITManager::allbox_iterator::allbox_iterator().

◆ GetVerboseLevel()

G4int G4AllITManager::GetVerboseLevel ( )
inline

Definition at line 88 of file G4AllITManager.hh.

89 {
90 return fVerbose;
91 }

◆ Instance() [1/2]

G4AllITManager * G4AllITManager::Instance ( )
static

Definition at line 47 of file G4AllITManager.cc.

48{
49 if(fInstance.get() == 0) fInstance = auto_ptr<G4AllITManager>(new G4AllITManager());
50 return fInstance.get() ;
51}

Referenced by G4VITManager::allbox_iterator::allbox_iterator().

◆ Instance() [2/2]

template<typename T >
G4ITManager< T > * G4AllITManager::Instance

Definition at line 93 of file G4AllITManager.cc.

94{
96}

◆ Push()

void G4AllITManager::Push ( G4Track track)

Definition at line 121 of file G4AllITManager.cc.

122{
123 fITSubManager[GetIT(track)->GetITType()]->Push(track);
124}
virtual const G4ITType GetITType() const =0

◆ RegisterManager()

void G4AllITManager::RegisterManager ( G4VITManager manager)

Definition at line 107 of file G4AllITManager.cc.

108{
109 fITSubManager[manager->GetITType()] = manager;
110}
G4ITType GetITType()
Definition: G4ITManager.hh:78

◆ SetVerboseLevel()

void G4AllITManager::SetVerboseLevel ( G4int  level)
inline

Set General verbose for all IT Manager See ITManager builder

Definition at line 84 of file G4AllITManager.hh.

85 {
86 fVerbose = level;
87 }

◆ UpdatePositionMap()

void G4AllITManager::UpdatePositionMap ( )

Definition at line 73 of file G4AllITManager.cc.

74{
75 std::map<G4ITType, G4VITManager*>::iterator it = fITSubManager.begin() ;
76
77 for(; it!=fITSubManager.end() ; it++)
78 {
79 it->second->UpdatePositionMap();
80 }
81}

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