Geant4-11
Public Member Functions | Private Member Functions | Private Attributes | Friends
G4NavigationHistory Class Reference

#include <G4NavigationHistory.hh>

Public Member Functions

void BackLevel ()
 
void BackLevel (G4int n)
 
void Clear ()
 
 G4NavigationHistory ()
 
 G4NavigationHistory (const G4NavigationHistory &h)
 
size_t GetDepth () const
 
size_t GetMaxDepth () const
 
const G4AffineTransform * GetPtrTopTransform () const
 
G4int GetReplicaNo (G4int n) const
 
G4int GetTopReplicaNo () const
 
const G4AffineTransform & GetTopTransform () const
 
G4VPhysicalVolume * GetTopVolume () const
 
EVolume GetTopVolumeType () const
 
const G4AffineTransform & GetTransform (G4int n) const
 
G4VPhysicalVolume * GetVolume (G4int n) const
 
EVolume GetVolumeType (G4int n) const
 
void NewLevel (G4VPhysicalVolume *pNewMother, EVolume vType=kNormal, G4int nReplica=-1)
 
void operator delete (void *aHistory)
 
void * operator new (size_t)
 
G4NavigationHistory & operator= (const G4NavigationHistory &h)
 
void Reset ()
 
void SetFirstEntry (G4VPhysicalVolume *pVol)
 
 ~G4NavigationHistory ()
 

Private Member Functions

void EnlargeHistory ()
 

Private Attributes

std::vector< G4NavigationLevel > * fNavHistory
 
size_t fStackDepth
 

Friends

std::ostream & operator<< (std::ostream &os, const G4NavigationHistory &h)
 

Detailed Description

Definition at line 52 of file G4NavigationHistory.hh.

Constructor & Destructor Documentation

◆ G4NavigationHistory() [1/2]

G4NavigationHistory::G4NavigationHistory ( )

Definition at line 41 of file G4NavigationHistory.cc.

42 : fStackDepth(0)
43{
45 Clear();
46}
static G4NavigationHistoryPool * GetInstance()
std::vector< G4NavigationLevel > * GetLevels()
std::vector< G4NavigationLevel > * fNavHistory

References Clear(), fNavHistory, G4NavigationHistoryPool::GetInstance(), and G4NavigationHistoryPool::GetLevels().

◆ ~G4NavigationHistory()

G4NavigationHistory::~G4NavigationHistory ( )

◆ G4NavigationHistory() [2/2]

G4NavigationHistory::G4NavigationHistory ( const G4NavigationHistory &  h)

Definition at line 48 of file G4NavigationHistory.cc.

49{
51 if( GetMaxDepth() != h.GetMaxDepth() )
52 {
53 fNavHistory->resize( h.GetMaxDepth() );
54 }
55
56 for ( G4long ilev=G4long(h.fStackDepth); ilev>=0; --ilev )
57 {
58 (*fNavHistory)[ilev] = (*h.fNavHistory)[ilev];
59 }
61}
long G4long
Definition: G4Types.hh:87
size_t GetMaxDepth() const

References fNavHistory, fStackDepth, G4NavigationHistoryPool::GetInstance(), G4NavigationHistoryPool::GetLevels(), and GetMaxDepth().

Member Function Documentation

◆ BackLevel() [1/2]

void G4NavigationHistory::BackLevel ( )
inline

◆ BackLevel() [2/2]

void G4NavigationHistory::BackLevel ( G4int  n)
inline

◆ Clear()

void G4NavigationHistory::Clear ( )
inline

Referenced by G4NavigationHistory().

◆ EnlargeHistory()

void G4NavigationHistory::EnlargeHistory ( )
inlineprivate

◆ GetDepth()

size_t G4NavigationHistory::GetDepth ( ) const
inline

◆ GetMaxDepth()

size_t G4NavigationHistory::GetMaxDepth ( ) const
inline

Referenced by G4NavigationHistory().

◆ GetPtrTopTransform()

const G4AffineTransform * G4NavigationHistory::GetPtrTopTransform ( ) const
inline

◆ GetReplicaNo()

G4int G4NavigationHistory::GetReplicaNo ( G4int  n) const
inline

◆ GetTopReplicaNo()

G4int G4NavigationHistory::GetTopReplicaNo ( ) const
inline

◆ GetTopTransform()

const G4AffineTransform & G4NavigationHistory::GetTopTransform ( ) const
inline

◆ GetTopVolume()

G4VPhysicalVolume * G4NavigationHistory::GetTopVolume ( ) const
inline

◆ GetTopVolumeType()

EVolume G4NavigationHistory::GetTopVolumeType ( ) const
inline

◆ GetTransform()

const G4AffineTransform & G4NavigationHistory::GetTransform ( G4int  n) const
inline

◆ GetVolume()

G4VPhysicalVolume * G4NavigationHistory::GetVolume ( G4int  n) const
inline

◆ GetVolumeType()

EVolume G4NavigationHistory::GetVolumeType ( G4int  n) const
inline

◆ NewLevel()

void G4NavigationHistory::NewLevel ( G4VPhysicalVolume *  pNewMother,
EVolume  vType = kNormal,
G4int  nReplica = -1 
)
inline

◆ operator delete()

void G4NavigationHistory::operator delete ( void *  aHistory)
inline

◆ operator new()

void * G4NavigationHistory::operator new ( size_t  )
inline

◆ operator=()

G4NavigationHistory & G4NavigationHistory::operator= ( const G4NavigationHistory &  h)
inline

◆ Reset()

void G4NavigationHistory::Reset ( )
inline

◆ SetFirstEntry()

void G4NavigationHistory::SetFirstEntry ( G4VPhysicalVolume *  pVol)
inline

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const G4NavigationHistory &  h 
)
friend

Definition at line 68 of file G4NavigationHistory.cc.

70{
71 os << "History depth=" << nav.GetDepth() << G4endl;
72 for ( size_t i=0; i<=nav.GetDepth(); ++i )
73 {
74 os << "Level=["<<i<<"]: ";
75 if( nav.GetVolume(i) != nullptr )
76 {
77 os << "Phys Name=["<< nav.GetVolume(i)->GetName()
78 << "] Type=[";
79 switch(nav.GetVolumeType(i))
80 {
81 case kNormal:
82 os << "N";
83 break;
84 case kReplica:
85 os << "R" << nav.GetReplicaNo(i);
86 break;
87 case kParameterised:
88 os << "P" << nav.GetReplicaNo(i);
89 break;
90 case kExternal:
91 os << "E" << nav.GetReplicaNo(i);
92 break;
93 }
94 os << "]";
95 }
96 else
97 {
98 os << "Phys = <Null>";
99 }
100 os << G4endl;
101 }
102 return os;
103}
#define G4endl
Definition: G4ios.hh:57
@ kNormal
Definition: geomdefs.hh:84
@ kParameterised
Definition: geomdefs.hh:86
@ kExternal
Definition: geomdefs.hh:87
@ kReplica
Definition: geomdefs.hh:85

Field Documentation

◆ fNavHistory

std::vector<G4NavigationLevel>* G4NavigationHistory::fNavHistory
private

Definition at line 144 of file G4NavigationHistory.hh.

Referenced by G4NavigationHistory(), and ~G4NavigationHistory().

◆ fStackDepth

size_t G4NavigationHistory::fStackDepth
private

Definition at line 147 of file G4NavigationHistory.hh.

Referenced by G4NavigationHistory().


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