Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4Navigator.cc File Reference
#include <iomanip>
#include "G4Navigator.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4GeometryTolerance.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VoxelSafety.hh"
Include dependency graph for G4Navigator.cc:

Go to the source code of this file.

Macros

#define G4NEW_SAFETY   1
 

Functions

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

Macro Definition Documentation

#define G4NEW_SAFETY   1

Definition at line 1738 of file G4Navigator.cc.

Function Documentation

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

Definition at line 2250 of file G4Navigator.cc.

2251 {
2252  // Old version did only the following:
2253  // os << "Current History: " << G4endl << n.fHistory;
2254  // Old behaviour is recovered for fVerbose = 0
2255 
2256  // Adapted from G4Navigator::PrintState() const
2257 
2258  G4int oldcoutPrec = os.precision(4);
2259  if( n.fVerbose >= 4 )
2260  {
2261  os << "The current state of G4Navigator is: " << G4endl;
2262  os << " ValidExitNormal= " << n.fValidExitNormal << G4endl
2263  << " ExitNormal = " << n.fExitNormal << G4endl
2264  << " Exiting = " << n.fExiting << G4endl
2265  << " Entering = " << n.fEntering << G4endl
2266  << " BlockedPhysicalVolume= " ;
2267  if (n.fBlockedPhysicalVolume==0)
2268  os << "None";
2269  else
2270  os << n.fBlockedPhysicalVolume->GetName();
2271  os << G4endl
2272  << " BlockedReplicaNo = " << n.fBlockedReplicaNo << G4endl
2273  << " LastStepWasZero = " << n.fLastStepWasZero << G4endl
2274  << G4endl;
2275  }
2276  if( ( 1 < n.fVerbose) && (n.fVerbose < 4) )
2277  {
2278  os << G4endl; // Make sure to line up
2279  os << std::setw(30) << " ExitNormal " << " "
2280  << std::setw( 5) << " Valid " << " "
2281  << std::setw( 9) << " Exiting " << " "
2282  << std::setw( 9) << " Entering" << " "
2283  << std::setw(15) << " Blocked:Volume " << " "
2284  << std::setw( 9) << " ReplicaNo" << " "
2285  << std::setw( 8) << " LastStepZero " << " "
2286  << G4endl;
2287  os << "( " << std::setw(7) << n.fExitNormal.x()
2288  << ", " << std::setw(7) << n.fExitNormal.y()
2289  << ", " << std::setw(7) << n.fExitNormal.z() << " ) "
2290  << std::setw( 5) << n.fValidExitNormal << " "
2291  << std::setw( 9) << n.fExiting << " "
2292  << std::setw( 9) << n.fEntering << " ";
2293  if ( n.fBlockedPhysicalVolume==0 )
2294  { os << std::setw(15) << "None"; }
2295  else
2296  { os << std::setw(15)<< n.fBlockedPhysicalVolume->GetName(); }
2297  os << std::setw( 9) << n.fBlockedReplicaNo << " "
2298  << std::setw( 8) << n.fLastStepWasZero << " "
2299  << G4endl;
2300  }
2301  if( n.fVerbose > 2 )
2302  {
2303  os.precision(8);
2304  os << " Current Localpoint = " << n.fLastLocatedPointLocal << G4endl;
2305  os << " PreviousSftOrigin = " << n.fPreviousSftOrigin << G4endl;
2306  os << " PreviousSafety = " << n.fPreviousSafety << G4endl;
2307  }
2308  if( n.fVerbose > 3 || n.fVerbose == 0 )
2309  {
2310  os << "Current History: " << G4endl << n.fHistory;
2311  }
2312 
2313  os.precision(oldcoutPrec);
2314  return os;
2315 }
double x() const
G4int fVerbose
Definition: G4Navigator.hh:392
int G4int
Definition: G4Types.hh:78
double z() const
const G4String & GetName() const
G4NavigationHistory fHistory
Definition: G4Navigator.hh:368
double y() const
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function: