51 Name (
"PCAxisModuleLabel"),
52 Comment(
"label of the producer used to create the recob::PCAxis collection to be dumped")
55 Name (
"OutputCategory"),
56 Comment(
"the category used for the output (useful for filtering) [\"DumpPCAxes\"]"),
60 Name (
"PrintHexFloats"),
61 Comment(
"print floating point numbers in base 16 [false]"),
113 struct PrintOptions_t {
114 bool hexFloats =
false;
119 PCAxisDumper(std::vector<recob::PCAxis>
const& pca_list)
120 : PCAxisDumper(pca_list, {})
125 (std::vector<recob::PCAxis>
const& pca_list, PrintOptions_t print_options)
127 , options(print_options)
132 template <
typename Stream>
134 (Stream&& out,
size_t iPCA, std::string indentstr =
"")
const 143 <<
"[#" << iPCA <<
"] ";
146 (out, indentstr +
" ",
true );
157 template <
typename Stream>
158 void DumpAllPCAxes(Stream&& out, std::string indentstr =
"")
const 161 size_t const nPCAs = pcas.size();
162 for (
size_t iPCA = 0; iPCA < nPCAs; ++iPCA)
163 DumpPCAxis(std::forward<Stream>(out), iPCA, indentstr);
169 std::vector<recob::PCAxis>
const& pcas;
171 PrintOptions_t options;
203 size_t const nPCAs = PCAxes->size();
205 <<
"The event contains " << nPCAs <<
" PC axes from '" 209 PCAxisDumper::PrintOptions_t options;
211 PCAxisDumper dumper(*PCAxes, options);
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
DumpPCAxes(Parameters const &config)
Default constructor.
Reconstruction base classes.
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)
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
bool fPrintHexFloats
whether to print floats in base 16
Configuration parameters.
fhicl::Atom< bool > PrintHexFloats
fhicl::Atom< std::string > OutputCategory
virtual void analyze(const art::Event &evt) override
Does the printing.
#define DEFINE_ART_MODULE(klass)
Simple class managing a repetitive output task.
art::InputTag fInputTag
input tag of the PCAxis product
Prints the content of all the PCA axis object on screen.
fhicl::Atom< art::InputTag > PCAxisModuleLabel
EDAnalyzer(Table< Config > const &config)
Functions dumping principal component axis objects.
NewLine< Stream > makeNewLine(Stream &stream, std::string indent, bool followLine=false)
Convenience function to create a temporary NewLine.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
std::string nl(std::size_t i=1)
std::string fOutputCategory
category for LogInfo output