9 #ifndef LARDATA_RECOBASE_DUMPERS_PCAXISDUMPERS_H
10 #define LARDATA_RECOBASE_DUMPERS_PCAXISDUMPERS_H 1
18 #include <type_traits>
32 template <
typename Stream,
typename NewLineRef>
34 <std::is_same<recob::dumper::NewLine<std::decay_t<Stream>>, std::decay_t<NewLineRef>>
::value>
50 template <
typename Stream>
52 std::string indent =
"",
53 bool indentFirst =
true
57 std::forward<Stream>(out), pca,
makeNewLine(out, indent, !indentFirst)
72 template <
typename Stream,
typename NewLineRef>
74 <std::is_same<recob::dumper::NewLine<std::decay_t<Stream>>, std::decay_t<NewLineRef>>
::value>
80 nl() <<
"<not valid>";
84 nl() << std::setiosflags(std::ios::fixed) << std::setprecision(2)
85 <<
" ID " << pca.
getID()
88 <<
" - center position: " << std::setw(6) << pca.
getAvePosition()[0]
92 <<
" - eigen values: " << std::setw(8) <<
std::right
98 <<
" - principle axis: "
103 <<
" - second axis: "
117 #endif // LARDATA_RECOBASE_DUMPERS_PCAXISDUMPERS_H
double getAveHitDoca() const
const EigenVectors & getEigenVectors() const
const double * getEigenValues() const
std::enable_if_t< std::is_same< recob::dumper::NewLine< std::decay_t< Stream > >, std::decay_t< NewLineRef > >::value > DumpPCAxis(Stream &&out, recob::PCAxis const &pca, NewLineRef &&nl)
int getNumHitsUsed() const
Simple class managing a repetitive output task.
typename std::enable_if< B, T >::type enable_if_t
const double * getAvePosition() const
NewLine< Stream > makeNewLine(Stream &stream, std::string indent, bool followLine=false)
Convenience function to create a temporary NewLine.