53 Name(
"PCAxisModuleLabel"),
54 Comment(
"label of the producer used to create the recob::PCAxis collection to be dumped")};
56 Name(
"OutputCategory"),
57 Comment(
"the category used for the output (useful for filtering) [\"DumpPCAxes\"]"),
61 Name(
"PrintHexFloats"),
62 Comment(
"print floating point numbers in base 16 [false]"),
109 struct PrintOptions_t {
110 bool hexFloats =
false;
114 PCAxisDumper(std::vector<recob::PCAxis>
const& pca_list) : PCAxisDumper(pca_list, {}) {}
117 PCAxisDumper(std::vector<recob::PCAxis>
const& pca_list, PrintOptions_t print_options)
118 : pcas(pca_list), options(print_options)
122 template <
typename Stream>
123 void DumpPCAxis(Stream&& out,
size_t iPCA, std::string indentstr =
"")
const 131 first_nl() <<
"[#" << iPCA <<
"] ";
143 template <
typename Stream>
144 void DumpAllPCAxes(Stream&& out, std::string indentstr =
"")
const 147 size_t const nPCAs = pcas.size();
148 for (
size_t iPCA = 0; iPCA < nPCAs; ++iPCA)
149 DumpPCAxis(std::forward<Stream>(out), iPCA, indentstr);
153 std::vector<recob::PCAxis>
const& pcas;
155 PrintOptions_t options;
183 size_t const nPCAs = PCAxes->size();
188 PCAxisDumper::PrintOptions_t options;
190 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.
EDAnalyzer(fhicl::ParameterSet const &pset)
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
Functions dumping principal component axis objects.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
NewLine< Stream > makeNewLine(Stream &stream, std::string indent, bool followLine=false)
Convenience function to create a temporary NewLine.
std::string nl(std::size_t i=1)
std::string fOutputCategory
category for LogInfo output