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

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

Definition at line 1960 of file G4Navigator.cc.

References G4endl, and CLHEP::detail::n.

01961 {
01962   //  Old version did only the following:
01963   // os << "Current History: " << G4endl << n.fHistory;
01964   //  Old behaviour is recovered for fVerbose = 0
01965   
01966   // Adapted from G4Navigator::PrintState() const
01967 
01968   G4int oldcoutPrec = os.precision(4);
01969   if( n.fVerbose >= 4 )
01970   {
01971     os << "The current state of G4Navigator is: " << G4endl;
01972     os << "  ValidExitNormal= " << n.fValidExitNormal << G4endl
01973     << "  ExitNormal     = " << n.fExitNormal      << G4endl
01974     << "  Exiting        = " << n.fExiting         << G4endl
01975     << "  Entering       = " << n.fEntering        << G4endl
01976     << "  BlockedPhysicalVolume= " ;
01977     if (n.fBlockedPhysicalVolume==0)
01978       os << "None";
01979     else
01980       os << n.fBlockedPhysicalVolume->GetName();
01981     os << G4endl
01982     << "  BlockedReplicaNo     = " <<  n.fBlockedReplicaNo       << G4endl
01983     << "  LastStepWasZero      = " <<   n.fLastStepWasZero       << G4endl
01984     << G4endl;
01985   }
01986   if( ( 1 < n.fVerbose) && (n.fVerbose < 4) )
01987   {
01988     os << G4endl; // Make sure to line up
01989     os << std::setw(30) << " ExitNormal "  << " "
01990     << std::setw( 5) << " Valid "       << " "
01991     << std::setw( 9) << " Exiting "     << " "
01992     << std::setw( 9) << " Entering"     << " "
01993     << std::setw(15) << " Blocked:Volume "  << " "
01994     << std::setw( 9) << " ReplicaNo"        << " "
01995     << std::setw( 8) << " LastStepZero  "   << " "
01996     << G4endl;
01997     os << "( " << std::setw(7) << n.fExitNormal.x()
01998     << ", " << std::setw(7) << n.fExitNormal.y()
01999     << ", " << std::setw(7) << n.fExitNormal.z() << " ) "
02000     << std::setw( 5)  << n.fValidExitNormal  << " "
02001     << std::setw( 9)  << n.fExiting          << " "
02002     << std::setw( 9)  << n.fEntering         << " ";
02003     if ( n.fBlockedPhysicalVolume==0 )
02004       { os << std::setw(15) << "None"; }
02005     else
02006       { os << std::setw(15)<< n.fBlockedPhysicalVolume->GetName(); }
02007     os << std::setw( 9)  << n.fBlockedReplicaNo  << " "
02008     << std::setw( 8)  << n.fLastStepWasZero   << " "
02009     << G4endl;
02010   }
02011   if( n.fVerbose > 2 )
02012   {
02013     os.precision(8);
02014     os << " Current Localpoint = " << n.fLastLocatedPointLocal << G4endl;
02015     os << " PreviousSftOrigin  = " << n.fPreviousSftOrigin << G4endl;
02016     os << " PreviousSafety     = " << n.fPreviousSafety << G4endl;
02017   }
02018   if( n.fVerbose > 3 || n.fVerbose == 0 )
02019   {
02020     os << "Current History: " << G4endl << n.fHistory;
02021   }
02022     
02023   os.precision(oldcoutPrec);
02024   return os;
02025 }


Generated on Mon May 27 17:50:52 2013 for Geant4 by  doxygen 1.4.7