Geant4 11.2.2
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

using ClassType = T
 
using StateType = G4TrackState<T>
 
using StateTypeHandle = std::shared_ptr<StateType>
 

Public Member Functions

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

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 >
using G4TrackStateDependent< T >::ClassType = T

Definition at line 238 of file G4TrackState.hh.

◆ StateType

template<class T >
using G4TrackStateDependent< T >::StateType = G4TrackState<T>

Definition at line 239 of file G4TrackState.hh.

◆ StateTypeHandle

template<class T >
using G4TrackStateDependent< T >::StateTypeHandle = std::shared_ptr<StateType>

Definition at line 240 of file G4TrackState.hh.

Constructor & Destructor Documentation

◆ ~G4TrackStateDependent()

template<class T >
G4TrackStateDependent< T >::~G4TrackStateDependent ( )
overridedefault

◆ G4TrackStateDependent()

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

Definition at line 301 of file G4TrackState.hh.

303 {}
G4VTrackStateDependent()=default

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 }
G4TrackState< T > StateType
std::shared_ptr< StateType > StateTypeHandle

◆ 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 >
G4VTrackStateHandle G4TrackStateDependent< T >::GetTrackState ( ) const
inlineoverridevirtual

Implements G4VTrackStateDependent.

Definition at line 257 of file G4TrackState.hh.

258 {
259 G4VTrackStateHandle output =
261 return output;
262 }
std::shared_ptr< G4VTrackState > G4VTrackStateHandle
#define G4dynamic_pointer_cast
Definition G4memory.hh:36

◆ LoadTrackState()

template<class T >
void G4TrackStateDependent< T >::LoadTrackState ( G4TrackStateManager & manager)
inlineoverridevirtual

Implements G4VTrackStateDependent.

Definition at line 269 of file G4TrackState.hh.

270 {
273 if (fpTrackState == nullptr)
274 {
276 SaveTrackState(manager);
277 }
278 }
G4shared_ptr< G4TrackState< FinalType > > ConvertToConcreteTrackState(G4VTrackStateHandle state)
void NewTrackState() override
void SaveTrackState(G4TrackStateManager &manager) override
G4VTrackStateHandle GetTrackState(void *adress) const

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

◆ NewTrackState()

template<class T >
void G4TrackStateDependent< T >::NewTrackState ( )
inlineoverridevirtual

◆ PopTrackState()

template<class T >
G4VTrackStateHandle G4TrackStateDependent< T >::PopTrackState ( )
inlineoverridevirtual

Implements G4VTrackStateDependent.

Definition at line 249 of file G4TrackState.hh.

250 {
251 G4VTrackStateHandle output =
253 fpTrackState.reset();
254 return output;
255 }

◆ ResetTrackState()

template<class T >
void G4TrackStateDependent< T >::ResetTrackState ( )
inlineoverridevirtual

◆ SaveTrackState()

template<class T >
void G4TrackStateDependent< T >::SaveTrackState ( G4TrackStateManager & manager)
inlineoverridevirtual

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: