9 #ifndef LARDATA_RECOBASE_DUMPERS_SPACEPOINTDUMPERS_H 10 #define LARDATA_RECOBASE_DUMPERS_SPACEPOINTDUMPERS_H 1 19 #include <type_traits> 71 <std::is_same<
NewLine<std::decay_t<Stream>>, std::decay_t<NewLineRef>>::
value>;
83 template <
typename Stream,
typename NewLineRef>
88 ) -> std::enable_if_t<
91 std::decay_t<NewLineRef>
94 double const* pos = sp.XYZ();
95 double const* err = sp.ErrXYZ();
97 NewLineRef
nl(out, options.indent);
101 <<
"ID=" << sp.ID() <<
" at (" << hexfloat(pos[0])
102 <<
", " << hexfloat(pos[1]) <<
", " << hexfloat(pos[2])
103 <<
") cm, chi^2/NDF=" << hexfloat(sp.Chisq());
106 <<
"variances { x^2=" << hexfloat(err[0]) <<
" y^2=" << hexfloat(err[2])
107 <<
" z^2=" << hexfloat(err[5])
108 <<
" xy=" << hexfloat(err[1]) <<
" xz=" << hexfloat(err[3])
109 <<
" yz=" << hexfloat(err[4]) <<
" }";
115 #endif // LARDATA_RECOBASE_DUMPERS_SPACEPOINTDUMPERS_H Starts a new line in a output stream.
Reconstruction base classes.
IndentOptions_t indent
indentation string
auto DumpSpacePoint(Stream &&out, recob::SpacePoint const &sp, SpacePointPrintOptions_t const &options={}) -> std::enable_if_t < std::is_same< NewLine< std::decay_t< Stream >>, std::decay_t< NewLineRef >>::value >
Dumps the content of the specified space point into a stream.
Simple class managing a repetitive output task.
Structure collecting indentation options.
Helper for formatting floats in base 16.
std::string value(boost::any const &)
SpacePointPrintOptions_t()=default
Default constructor.
Helper to support output of real numbers in base 16.
bool hexFloats
print all floating point numbers in base 16
std::string nl(std::size_t i=1)
Collection of available printing style options.