Functions
genie::pathsegutils Namespace Reference

Functions

string Vec3AsString (const TVector3 *vec)
 

Function Documentation

string genie::pathsegutils::Vec3AsString ( const TVector3 *  vec)

Definition at line 106 of file PathSegmentList.cxx.

References PandAna.Demos.pi0_spectra::fmt, and w.

Referenced by genie::COHHadronicSystemGenerator::CalculateHadronicSystem_ReinSehgal(), genie::geometry::ROOTGeomAnalyzer::GenBoxRay(), genie::VertexGenerator::GenerateVertex(), genie::geometry::ROOTGeomAnalyzer::GenerateVertex(), genie::Intranuke::GenerateVertex(), genie::Intranuke2018::GenerateVertex(), genie::HadronicSystemGenerator::HCM2LAB(), genie::geometry::ROOTGeomAnalyzer::Local2SI(), main(), genie::geometry::ROOTGeomAnalyzer::Master2Top(), genie::geometry::ROOTGeomAnalyzer::Master2TopDir(), genie::geometry::PathSegment::Print(), genie::geometry::PathSegmentList::Print(), genie::flux::GDk2NuFlux::PrintConfig(), genie::flux::GNuMIFlux::PrintConfig(), genie::flux::GMonoEnergeticFlux::SetRayOrigin(), genie::geometry::ROOTGeomAnalyzer::SI2Local(), genie::utils::intranuke::StepParticle(), genie::utils::intranuke2018::StepParticle(), genie::geometry::ROOTGeomAnalyzer::Top2Master(), genie::geometry::ROOTGeomAnalyzer::Top2MasterDir(), and genie::flux::GDk2NuFluxXMLHelper::~GDk2NuFluxXMLHelper().

107  {
108  int w=17, p=10; // precision setting only affects ostringstream
109  std::ostringstream fmt;
110  fmt << "(" << std::setw(w) << std::setprecision(p) << vec->x()
111  << "," << std::setw(w) << std::setprecision(p) << vec->y()
112  << "," << std::setw(w+1) << std::setprecision(p) << vec->z() << ")";
113  return fmt.str();
114  }
const char * p
Definition: xmltok.h:285
Eigen::VectorXd vec
Float_t w
Definition: plot.C:20