Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4TrackStateDependent< T > Class Template Reference

#include <G4TrackState.hh>

+ Inheritance diagram for G4TrackStateDependent< T >:

Public Types

typedef T ClassType
 
typedef G4TrackState< T > StateType
 
typedef G4shared_ptr< StateTypeStateTypeHandle
 

Public Member Functions

virtual ~G4TrackStateDependent ()
 
virtual void SetTrackState (G4shared_ptr< StateType > state)
 
virtual G4VTrackStateHandle PopTrackState ()
 
virtual G4VTrackStateHandle GetTrackState () const
 
virtual StateTypeHandle GetConcreteTrackState () const
 
virtual void LoadTrackState (G4TrackStateManager &manager)
 
virtual void SaveTrackState (G4TrackStateManager &manager)
 
virtual void NewTrackState ()
 
virtual StateTypeHandle CreateTrackState () const
 
virtual void ResetTrackState ()
 
- Public Member Functions inherited from G4VTrackStateDependent
 G4VTrackStateDependent ()
 
virtual ~G4VTrackStateDependent ()
 
virtual void NewTrackState ()=0
 
virtual void LoadTrackState (G4TrackStateManager &)=0
 
virtual void SaveTrackState (G4TrackStateManager &)=0
 
virtual G4VTrackStateHandle GetTrackState () const =0
 
virtual G4VTrackStateHandle PopTrackState ()=0
 
virtual void ResetTrackState ()=0
 

Protected Member Functions

 G4TrackStateDependent ()
 

Protected Attributes

StateTypeHandle fpTrackState
 

Detailed Description

template<class T>
class G4TrackStateDependent< T >

Definition at line 235 of file G4TrackState.hh.

Member Typedef Documentation

◆ ClassType

template<class T >
typedef T G4TrackStateDependent< T >::ClassType

Definition at line 238 of file G4TrackState.hh.

◆ StateType

template<class T >
typedef G4TrackState<T> G4TrackStateDependent< T >::StateType

Definition at line 239 of file G4TrackState.hh.

◆ StateTypeHandle

template<class T >
typedef G4shared_ptr<StateType> G4TrackStateDependent< T >::StateTypeHandle

Definition at line 240 of file G4TrackState.hh.

Constructor & Destructor Documentation

◆ ~G4TrackStateDependent()

template<class T >
virtual G4TrackStateDependent< T >::~G4TrackStateDependent ( )
inlinevirtual

Definition at line 242 of file G4TrackState.hh.

242{}

◆ G4TrackStateDependent()

template<class T >
G4TrackStateDependent< T >::G4TrackStateDependent ( )
inlineprotected

Definition at line 301 of file G4TrackState.hh.

Member Function Documentation

◆ CreateTrackState()

template<class T >
virtual StateTypeHandle G4TrackStateDependent< T >::CreateTrackState ( ) const
inlinevirtual

Definition at line 290 of file G4TrackState.hh.

291 {
292 return StateTypeHandle(new StateType());
293 }
G4shared_ptr< StateType > StateTypeHandle
G4TrackState< T > StateType

◆ GetConcreteTrackState()

template<class T >
virtual StateTypeHandle G4TrackStateDependent< T >::GetConcreteTrackState ( ) const
inlinevirtual

Definition at line 264 of file G4TrackState.hh.

265 {
266 return fpTrackState;
267 }
StateTypeHandle fpTrackState

◆ GetTrackState()

template<class T >
virtual G4VTrackStateHandle G4TrackStateDependent< T >::GetTrackState ( ) const
inlinevirtual

Implements G4VTrackStateDependent.

Definition at line 257 of file G4TrackState.hh.

258 {
259 G4VTrackStateHandle output =
260 G4dynamic_pointer_cast<G4VTrackState>(fpTrackState);
261 return output;
262 }
G4shared_ptr< G4VTrackState > G4VTrackStateHandle
Definition: G4TrackState.hh:93

◆ LoadTrackState()

template<class T >
virtual void G4TrackStateDependent< T >::LoadTrackState ( G4TrackStateManager manager)
inlinevirtual

Implements G4VTrackStateDependent.

Definition at line 269 of file G4TrackState.hh.

270 {
272 ConvertToConcreteTrackState<ClassType>(manager.GetTrackState(this));
273 if (fpTrackState == nullptr)
274 {
276 SaveTrackState(manager);
277 }
278 }
virtual void NewTrackState()
virtual void SaveTrackState(G4TrackStateManager &manager)
G4VTrackStateHandle GetTrackState(void *adress) const

Referenced by G4ITTransportation::AlongStepGetPhysicalInteractionLength(), and G4DNABrownianTransportation::ComputeGeomLimit().

◆ NewTrackState()

template<class T >
virtual void G4TrackStateDependent< T >::NewTrackState ( )
inlinevirtual

◆ PopTrackState()

template<class T >
virtual G4VTrackStateHandle G4TrackStateDependent< T >::PopTrackState ( )
inlinevirtual

Implements G4VTrackStateDependent.

Definition at line 249 of file G4TrackState.hh.

250 {
251 G4VTrackStateHandle output =
252 G4dynamic_pointer_cast<G4VTrackState>(fpTrackState);
253 fpTrackState.reset();
254 return output;
255 }

◆ ResetTrackState()

template<class T >
virtual void G4TrackStateDependent< T >::ResetTrackState ( )
inlinevirtual

◆ SaveTrackState()

template<class T >
virtual void G4TrackStateDependent< T >::SaveTrackState ( G4TrackStateManager manager)
inlinevirtual

Implements G4VTrackStateDependent.

Definition at line 280 of file G4TrackState.hh.

281 {
283 }
G4shared_ptr< G4VTrackState > ConvertToAbstractTrackState(G4shared_ptr< G4TrackState< OriginalType > > state)
void SetTrackState(void *adress, G4VTrackStateHandle state)

Referenced by G4TrackStateDependent< T >::LoadTrackState(), and G4ITTransportation::StartTracking().

◆ SetTrackState()

template<class T >
virtual void G4TrackStateDependent< T >::SetTrackState ( G4shared_ptr< StateType state)
inlinevirtual

Definition at line 244 of file G4TrackState.hh.

245 {
246 fpTrackState = state;
247 }

Member Data Documentation

◆ fpTrackState


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