Geant4-11
Functions | Variables
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)
 

Variables

static const G4double kToleranceNormalCheck = CLHEP::perThousand
 

Function Documentation

◆ operator<<()

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

Definition at line 2157 of file G4Navigator.cc.

2158{
2159 // Old version did only the following:
2160 // os << "Current History: " << G4endl << n.fHistory;
2161 // Old behaviour is recovered for fVerbose = 0
2162
2163 // Adapted from G4Navigator::PrintState() const
2164
2165 G4int oldcoutPrec = os.precision(4);
2166 if( n.fVerbose >= 4 )
2167 {
2168 os << "The current state of G4Navigator is: " << G4endl;
2169 os << " ValidExitNormal= " << n.fValidExitNormal << G4endl
2170 << " ExitNormal = " << n.fExitNormal << G4endl
2171 << " Exiting = " << n.fExiting << G4endl
2172 << " Entering = " << n.fEntering << G4endl
2173 << " BlockedPhysicalVolume= " ;
2174 if (n.fBlockedPhysicalVolume==0)
2175 os << "None";
2176 else
2177 os << n.fBlockedPhysicalVolume->GetName();
2178 os << G4endl
2179 << " BlockedReplicaNo = " << n.fBlockedReplicaNo << G4endl
2180 << " LastStepWasZero = " << n.fLastStepWasZero << G4endl
2181 << G4endl;
2182 }
2183 if( ( 1 < n.fVerbose) && (n.fVerbose < 4) )
2184 {
2185 os << G4endl; // Make sure to line up
2186 os << std::setw(30) << " ExitNormal " << " "
2187 << std::setw( 5) << " Valid " << " "
2188 << std::setw( 9) << " Exiting " << " "
2189 << std::setw( 9) << " Entering" << " "
2190 << std::setw(15) << " Blocked:Volume " << " "
2191 << std::setw( 9) << " ReplicaNo" << " "
2192 << std::setw( 8) << " LastStepZero " << " "
2193 << G4endl;
2194 os << "( " << std::setw(7) << n.fExitNormal.x()
2195 << ", " << std::setw(7) << n.fExitNormal.y()
2196 << ", " << std::setw(7) << n.fExitNormal.z() << " ) "
2197 << std::setw( 5) << n.fValidExitNormal << " "
2198 << std::setw( 9) << n.fExiting << " "
2199 << std::setw( 9) << n.fEntering << " ";
2200 if ( n.fBlockedPhysicalVolume==0 )
2201 { os << std::setw(15) << "None"; }
2202 else
2203 { os << std::setw(15)<< n.fBlockedPhysicalVolume->GetName(); }
2204 os << std::setw( 9) << n.fBlockedReplicaNo << " "
2205 << std::setw( 8) << n.fLastStepWasZero << " "
2206 << G4endl;
2207 }
2208 if( n.fVerbose > 2 )
2209 {
2210 os.precision(8);
2211 os << " Current Localpoint = " << n.fLastLocatedPointLocal << G4endl;
2212 os << " PreviousSftOrigin = " << n.fPreviousSftOrigin << G4endl;
2213 os << " PreviousSafety = " << n.fPreviousSafety << G4endl;
2214 }
2215 if( n.fVerbose > 3 || n.fVerbose == 0 )
2216 {
2217 os << "Current History: " << G4endl << n.fHistory;
2218 }
2219
2220 os.precision(oldcoutPrec);
2221 return os;
2222}
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57

Variable Documentation

◆ kToleranceNormalCheck

const G4double kToleranceNormalCheck = CLHEP::perThousand
static