54 Name (
"PCAxisModuleLabel"),
55 Comment(
"label of the producer used to create the recob::PCAxis collection to be dumped")
58 Name (
"OutputCategory"),
59 Comment(
"the category used for the output (useful for filtering) [\"DumpPCAxes\"]"),
63 Name (
"PrintHexFloats"),
64 Comment(
"print floating point numbers in base 16 [false]"),
115 struct PrintOptions_t {
116 bool hexFloats =
false;
121 PCAxisDumper(std::vector<recob::PCAxis>
const& pca_list)
122 : PCAxisDumper(pca_list, {})
127 (std::vector<recob::PCAxis>
const& pca_list, PrintOptions_t print_options)
134 template <
typename Stream>
136 (Stream&& out,
size_t iPCA,
std::string indentstr =
"")
const 145 <<
"[#" << iPCA <<
"] ";
148 (out, indentstr +
" ",
true );
159 template <
typename Stream>
160 void DumpAllPCAxes(Stream&& out,
std::string indentstr =
"")
const 163 size_t const nPCAs = pcas.size();
164 for (
size_t iPCA = 0; iPCA < nPCAs; ++iPCA)
165 DumpPCAxis(std::forward<Stream>(out), iPCA, indentstr);
171 std::vector<recob::PCAxis>
const& pcas;
205 size_t const nPCAs = PCAxes->size();
207 <<
"The event contains " << nPCAs <<
" PC axes from '" 211 PCAxisDumper::PrintOptions_t
options;
213 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.
ChannelGroupService::Name Name
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
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Prints the content of all the PCA axis object on screen.
fhicl::Atom< art::InputTag > PCAxisModuleLabel
Functions dumping principal component axis objects.
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