Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4GeomTestStreamLogger::PrintPos Class Reference

#include <G4GeomTestStreamLogger.hh>

Public Member Functions

 PrintPos (const G4ThreeVector pos, G4bool useUnit=true)
 
void Print (std::ostream &) const
 

Detailed Description

Definition at line 75 of file G4GeomTestStreamLogger.hh.

Constructor & Destructor Documentation

◆ PrintPos()

G4GeomTestStreamLogger::PrintPos::PrintPos ( const G4ThreeVector  pos,
G4bool  useUnit = true 
)
inline

Definition at line 78 of file G4GeomTestStreamLogger.hh.

79 : p(pos), unit(useUnit) {;}

Member Function Documentation

◆ Print()

void G4GeomTestStreamLogger::PrintPos::Print ( std::ostream &  o) const

Definition at line 62 of file G4GeomTestStreamLogger.cc.

63{
64 o << std::setprecision(6) << std::setw(14) << p.x()/cm;
65 o << std::setprecision(6) << std::setw(14) << p.y()/cm;
66 o << std::setprecision(6) << std::setw(14) << p.z()/cm;
67 if (unit) o << " cm";
68}
double z() const
double x() const
double y() const

The documentation for this class was generated from the following files: