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

#include <G4TrackState.hh>

Public Member Functions

void SetTrackState (void *adress, G4VTrackStateHandle state)
 
G4VTrackStateHandle GetTrackState (void *adress) const
 
template<class T >
G4VTrackStateHandle GetTrackState (T *adress) const
 
void SetTrackState (G4VTrackStateHandle state)
 
template<typename T >
G4VTrackStateHandle GetTrackState () const
 

Detailed Description

Definition at line 141 of file G4TrackState.hh.

Member Function Documentation

◆ GetTrackState() [1/3]

template<typename T >
G4VTrackStateHandle G4TrackStateManager::GetTrackState ( ) const
inline

Definition at line 182 of file G4TrackState.hh.

183 {
184 std::map<int, G4VTrackStateHandle>::const_iterator it =
185 fTrackStates.find(G4TrackStateID<T>::GetID());
186 if (it == fTrackStates.end())
187 {
188 return G4VTrackStateHandle();
189 }
190 return it->second;
191 }
G4shared_ptr< G4VTrackState > G4VTrackStateHandle
Definition: G4TrackState.hh:93

◆ GetTrackState() [2/3]

template<class T >
G4VTrackStateHandle G4TrackStateManager::GetTrackState ( T *  adress) const
inline

Definition at line 165 of file G4TrackState.hh.

166 {
167 std::map<void*, G4VTrackStateHandle>::const_iterator it =
168 fMultipleTrackStates.find((void*)adress);
169 if (it == fMultipleTrackStates.end())
170 {
171 return G4VTrackStateHandle();
172 }
173 return it->second;
174 }

◆ GetTrackState() [3/3]

G4VTrackStateHandle G4TrackStateManager::GetTrackState ( void *  adress) const
inline

Definition at line 153 of file G4TrackState.hh.

154 {
155 std::map<void*, G4VTrackStateHandle>::const_iterator it =
156 fMultipleTrackStates.find(adress);
157 if (it == fMultipleTrackStates.end())
158 {
159 return G4VTrackStateHandle();
160 }
161 return it->second;
162 }

Referenced by G4TrackStateDependent< T >::LoadTrackState().

◆ SetTrackState() [1/2]

void G4TrackStateManager::SetTrackState ( G4VTrackStateHandle  state)
inline

Definition at line 176 of file G4TrackState.hh.

177 {
178 fTrackStates[state->GetID()] = state;
179 }

◆ SetTrackState() [2/2]

void G4TrackStateManager::SetTrackState ( void *  adress,
G4VTrackStateHandle  state 
)
inline

Definition at line 148 of file G4TrackState.hh.

149 {
150 fMultipleTrackStates[adress] = state;
151 }

Referenced by G4TrackStateDependent< T >::SaveTrackState().


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