Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
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.

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 1594 of file G4Navigator.cc.

Function Documentation

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

Definition at line 1916 of file G4Navigator.cc.

References G4Navigator::fHistory, G4Navigator::fVerbose, G4endl, G4VPhysicalVolume::GetName(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

1917 {
1918  // Old version did only the following:
1919  // os << "Current History: " << G4endl << n.fHistory;
1920  // Old behaviour is recovered for fVerbose = 0
1921 
1922  // Adapted from G4Navigator::PrintState() const
1923 
1924  G4int oldcoutPrec = os.precision(4);
1925  if( n.fVerbose >= 4 )
1926  {
1927  os << "The current state of G4Navigator is: " << G4endl;
1928  os << " ValidExitNormal= " << n.fValidExitNormal << G4endl
1929  << " ExitNormal = " << n.fExitNormal << G4endl
1930  << " Exiting = " << n.fExiting << G4endl
1931  << " Entering = " << n.fEntering << G4endl
1932  << " BlockedPhysicalVolume= " ;
1933  if (n.fBlockedPhysicalVolume==0)
1934  os << "None";
1935  else
1936  os << n.fBlockedPhysicalVolume->GetName();
1937  os << G4endl
1938  << " BlockedReplicaNo = " << n.fBlockedReplicaNo << G4endl
1939  << " LastStepWasZero = " << n.fLastStepWasZero << G4endl
1940  << G4endl;
1941  }
1942  if( ( 1 < n.fVerbose) && (n.fVerbose < 4) )
1943  {
1944  os << G4endl; // Make sure to line up
1945  os << std::setw(30) << " ExitNormal " << " "
1946  << std::setw( 5) << " Valid " << " "
1947  << std::setw( 9) << " Exiting " << " "
1948  << std::setw( 9) << " Entering" << " "
1949  << std::setw(15) << " Blocked:Volume " << " "
1950  << std::setw( 9) << " ReplicaNo" << " "
1951  << std::setw( 8) << " LastStepZero " << " "
1952  << G4endl;
1953  os << "( " << std::setw(7) << n.fExitNormal.x()
1954  << ", " << std::setw(7) << n.fExitNormal.y()
1955  << ", " << std::setw(7) << n.fExitNormal.z() << " ) "
1956  << std::setw( 5) << n.fValidExitNormal << " "
1957  << std::setw( 9) << n.fExiting << " "
1958  << std::setw( 9) << n.fEntering << " ";
1959  if ( n.fBlockedPhysicalVolume==0 )
1960  { os << std::setw(15) << "None"; }
1961  else
1962  { os << std::setw(15)<< n.fBlockedPhysicalVolume->GetName(); }
1963  os << std::setw( 9) << n.fBlockedReplicaNo << " "
1964  << std::setw( 8) << n.fLastStepWasZero << " "
1965  << G4endl;
1966  }
1967  if( n.fVerbose > 2 )
1968  {
1969  os.precision(8);
1970  os << " Current Localpoint = " << n.fLastLocatedPointLocal << G4endl;
1971  os << " PreviousSftOrigin = " << n.fPreviousSftOrigin << G4endl;
1972  os << " PreviousSafety = " << n.fPreviousSafety << G4endl;
1973  }
1974  if( n.fVerbose > 3 || n.fVerbose == 0 )
1975  {
1976  os << "Current History: " << G4endl << n.fHistory;
1977  }
1978 
1979  os.precision(oldcoutPrec);
1980  return os;
1981 }
double x() const
G4int fVerbose
Definition: G4Navigator.hh:377
int G4int
Definition: G4Types.hh:78
double z() const
const G4String & GetName() const
G4NavigationHistory fHistory
Definition: G4Navigator.hh:353
double y() const
#define G4endl
Definition: G4ios.hh:61