9 #ifndef LARDATA_RECOBASE_DUMPERS_SPACEPOINTDUMPERS_H 10 #define LARDATA_RECOBASE_DUMPERS_SPACEPOINTDUMPERS_H 1 16 #include <type_traits> 45 : indent(indentOptions), hexFloats(bHexFloats)
58 template <
typename Stream,
typename NewLineRef = recob::dumper::NewLine<Stream>>
63 std::is_same<
NewLine<std::decay_t<Stream>>, std::decay_t<NewLineRef>>::
value>;
74 template <
typename Stream,
typename NewLineRef>
79 -> std::enable_if_t<std::is_same<NewLine<std::decay_t<Stream>>, std::decay_t<NewLineRef>>
::value>
81 double const* pos = sp.XYZ();
82 double const* err = sp.ErrXYZ();
84 NewLineRef
nl(out, options.indent);
87 nl() <<
"ID=" << sp.ID() <<
" at (" << hexfloat(pos[0]) <<
", " << hexfloat(pos[1]) <<
", " 88 << hexfloat(pos[2]) <<
") cm, chi^2/NDF=" << hexfloat(sp.Chisq());
90 nl() <<
"variances { x^2=" << hexfloat(err[0]) <<
" y^2=" << hexfloat(err[2])
91 <<
" z^2=" << hexfloat(err[5]) <<
" xy=" << hexfloat(err[1]) <<
" xz=" << hexfloat(err[3])
92 <<
" yz=" << hexfloat(err[4]) <<
" }";
98 #endif // LARDATA_RECOBASE_DUMPERS_SPACEPOINTDUMPERS_H Starts a new line in a output stream.
Reconstruction base classes.
IndentOptions_t indent
indentation string
Simple class managing a repetitive output task.
Structure collecting indentation options.
Helper for formatting floats in base 16.
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
SpacePointPrintOptions_t(IndentOptions_t indentOptions, bool bHexFloats)
std::string nl(std::size_t i=1)
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.
Collection of available printing style options.