Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Navigator.cc File Reference
#include <iomanip>
#include "G4Navigator.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4GeometryTolerance.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VoxelSafety.hh"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const G4Navigator &n)
 

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const G4Navigator n 
)

Definition at line 1960 of file G4Navigator.cc.

1961{
1962 // Old version did only the following:
1963 // os << "Current History: " << G4endl << n.fHistory;
1964 // Old behaviour is recovered for fVerbose = 0
1965
1966 // Adapted from G4Navigator::PrintState() const
1967
1968 G4int oldcoutPrec = os.precision(4);
1969 if( n.fVerbose >= 4 )
1970 {
1971 os << "The current state of G4Navigator is: " << G4endl;
1972 os << " ValidExitNormal= " << n.fValidExitNormal << G4endl
1973 << " ExitNormal = " << n.fExitNormal << G4endl
1974 << " Exiting = " << n.fExiting << G4endl
1975 << " Entering = " << n.fEntering << G4endl
1976 << " BlockedPhysicalVolume= " ;
1977 if (n.fBlockedPhysicalVolume==0)
1978 os << "None";
1979 else
1980 os << n.fBlockedPhysicalVolume->GetName();
1981 os << G4endl
1982 << " BlockedReplicaNo = " << n.fBlockedReplicaNo << G4endl
1983 << " LastStepWasZero = " << n.fLastStepWasZero << G4endl
1984 << G4endl;
1985 }
1986 if( ( 1 < n.fVerbose) && (n.fVerbose < 4) )
1987 {
1988 os << G4endl; // Make sure to line up
1989 os << std::setw(30) << " ExitNormal " << " "
1990 << std::setw( 5) << " Valid " << " "
1991 << std::setw( 9) << " Exiting " << " "
1992 << std::setw( 9) << " Entering" << " "
1993 << std::setw(15) << " Blocked:Volume " << " "
1994 << std::setw( 9) << " ReplicaNo" << " "
1995 << std::setw( 8) << " LastStepZero " << " "
1996 << G4endl;
1997 os << "( " << std::setw(7) << n.fExitNormal.x()
1998 << ", " << std::setw(7) << n.fExitNormal.y()
1999 << ", " << std::setw(7) << n.fExitNormal.z() << " ) "
2000 << std::setw( 5) << n.fValidExitNormal << " "
2001 << std::setw( 9) << n.fExiting << " "
2002 << std::setw( 9) << n.fEntering << " ";
2003 if ( n.fBlockedPhysicalVolume==0 )
2004 { os << std::setw(15) << "None"; }
2005 else
2006 { os << std::setw(15)<< n.fBlockedPhysicalVolume->GetName(); }
2007 os << std::setw( 9) << n.fBlockedReplicaNo << " "
2008 << std::setw( 8) << n.fLastStepWasZero << " "
2009 << G4endl;
2010 }
2011 if( n.fVerbose > 2 )
2012 {
2013 os.precision(8);
2014 os << " Current Localpoint = " << n.fLastLocatedPointLocal << G4endl;
2015 os << " PreviousSftOrigin = " << n.fPreviousSftOrigin << G4endl;
2016 os << " PreviousSafety = " << n.fPreviousSafety << G4endl;
2017 }
2018 if( n.fVerbose > 3 || n.fVerbose == 0 )
2019 {
2020 os << "Current History: " << G4endl << n.fHistory;
2021 }
2022
2023 os.precision(oldcoutPrec);
2024 return os;
2025}
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52