Geant4-11
Public Member Functions | Private Attributes
G4TrackStateManager Class Reference

#include <G4TrackState.hh>

Public Member Functions

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

Private Attributes

std::map< void *, G4VTrackStateHandlefMultipleTrackStates
 
std::map< int, G4VTrackStateHandlefTrackStates
 

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 =
186 if (it == fTrackStates.end())
187 {
188 return G4VTrackStateHandle();
189 }
190 return it->second;
191 }
G4shared_ptr< G4VTrackState > G4VTrackStateHandle
Definition: G4TrackState.hh:93
std::map< int, G4VTrackStateHandle > fTrackStates

References fTrackStates.

◆ 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 }
std::map< void *, G4VTrackStateHandle > fMultipleTrackStates

References fMultipleTrackStates.

◆ 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 }

References fMultipleTrackStates.

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 }

References fTrackStates.

◆ 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 }

References fMultipleTrackStates.

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

Field Documentation

◆ fMultipleTrackStates

std::map<void*, G4VTrackStateHandle> G4TrackStateManager::fMultipleTrackStates
private

Definition at line 144 of file G4TrackState.hh.

Referenced by GetTrackState(), and SetTrackState().

◆ fTrackStates

std::map<int, G4VTrackStateHandle> G4TrackStateManager::fTrackStates
private

Definition at line 143 of file G4TrackState.hh.

Referenced by GetTrackState(), and SetTrackState().


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