G4NavigationHistory.cc File Reference

#include "G4NavigationHistory.hh"
#include "G4ios.hh"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const G4NavigationHistory &nav)


Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const G4NavigationHistory nav 
)

Definition at line 64 of file G4NavigationHistory.cc.

References G4cout, G4endl, G4NavigationHistory::GetDepth(), G4VPhysicalVolume::GetName(), G4NavigationHistory::GetReplicaNo(), G4NavigationHistory::GetVolume(), G4NavigationHistory::GetVolumeType(), kNormal, kParameterised, and kReplica.

00065 {
00066   G4cout << "History depth=" << nav.GetDepth() << G4endl;
00067   for ( G4int i=0; i<=nav.GetDepth(); i++ )
00068   {
00069     os << "Level=["<<i<<"]: ";
00070     if( nav.GetVolume(i) != 0 )
00071     {
00072       os << "Phys Name=["<< nav.GetVolume(i)->GetName()
00073          << "] Type=[";
00074       switch(nav.GetVolumeType(i))
00075       {
00076         case kNormal:
00077           os << "N";
00078           break;
00079         case kReplica:
00080           os << "R" << nav.GetReplicaNo(i);
00081           break;
00082         case kParameterised:
00083           os << "P" << nav.GetReplicaNo(i);
00084           break;
00085       }
00086       os << "]";
00087     }
00088     else
00089     {
00090       os << "Phys = <Null>";
00091     }
00092     os << G4endl;
00093   }
00094   return os;
00095 }


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