Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NavigationHistory.cc File Reference
#include "G4NavigationHistory.hh"
#include "G4ios.hh"

Go to the source code of this file.

Functions

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

Function Documentation

◆ operator<<()

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

Definition at line 63 of file G4NavigationHistory.cc.

65{
66 G4cout << "History depth=" << nav.GetDepth() << G4endl;
67 for ( G4int i=0; i<=nav.GetDepth(); i++ )
68 {
69 os << "Level=["<<i<<"]: ";
70 if( nav.GetVolume(i) != 0 )
71 {
72 os << "Phys Name=["<< nav.GetVolume(i)->GetName()
73 << "] Type=[";
74 switch(nav.GetVolumeType(i))
75 {
76 case kNormal:
77 os << "N";
78 break;
79 case kReplica:
80 os << "R" << nav.GetReplicaNo(i);
81 break;
82 case kParameterised:
83 os << "P" << nav.GetReplicaNo(i);
84 break;
85 }
86 os << "]";
87 }
88 else
89 {
90 os << "Phys = <Null>";
91 }
92 os << G4endl;
93 }
94 return os;
95}
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4int GetDepth() const
G4int GetReplicaNo(G4int n) const
G4VPhysicalVolume * GetVolume(G4int n) const
EVolume GetVolumeType(G4int n) const
const G4String & GetName() const
@ kNormal
Definition: geomdefs.hh:68
@ kParameterised
Definition: geomdefs.hh:68
@ kReplica
Definition: geomdefs.hh:68