14 #include "art/Framework/Core/ModuleMacros.h"
15 #include "art/Framework/Core/EDAnalyzer.h"
16 #include "art/Framework/Principal/Run.h"
17 #include "canvas/Persistency/Provenance/RunID.h"
18 #include "canvas/Utilities/InputTag.h"
19 #include "messagefacility/MessageLogger/MessageLogger.h"
20 #include "fhiclcpp/types/Atom.h"
29 namespace sbn {
class DumpTriggerConfiguration; }
74 Name(
"TriggerConfigurationTag"),
75 Comment(
"tag of trigger configuration data product (from art::Run)")
80 Comment(
"verbosity level [default: maximum]"),
85 Name(
"SkipDuplicateRuns"),
86 Comment(
"print only one trigger configuration from each run"),
91 Name(
"OutputCategory"),
92 Comment(
"name of the category used for the output"),
93 "DumpTriggerConfiguration"
111 virtual void beginRun(art::Run
const& run)
override;
114 virtual void analyze(art::Event
const& event)
override {}
148 : art::EDAnalyzer(config)
150 , fTriggerConfigurationTag(config().TriggerConfigurationTag())
151 , fVerbosity (config().Verbosity())
152 , fSkipDuplicateRuns (config().SkipDuplicateRuns())
153 , fOutputCategory (config().OutputCategory())
156 consumes<icarus::TriggerConfiguration, art::InRun>(fTriggerConfigurationTag);
165 art::RunID
const&
id = run.id();
166 if (
fRuns.count(
id)) {
167 mf::LogTrace(
fOutputCategory) <<
id <<
" has already been encountered.";
176 std::ostringstream sstr;
DumpTriggerConfiguration(Parameters const &config)
virtual void beginRun(art::Run const &run) override
Dumps the data product.
fhicl::Atom< unsigned int > Verbosity
art::InputTag const fTriggerConfigurationTag
Input trigger configuration tag.
Dumps on console the content of icarus::TriggerConfiguration data product.
fhicl::Atom< bool > SkipDuplicateRuns
bool const fSkipDuplicateRuns
Print only once from each run.
unsigned int const fVerbosity
Verbosity level used for dumping.
fhicl::Atom< std::string > OutputCategory
Information from the configuration of the ICARUS trigger readout.
BEGIN_PROLOG vertical distance to the surface Name
fhicl::Atom< art::InputTag > TriggerConfigurationTag
void dump(std::ostream &out, std::string const &indent, std::string const &firstIndent, unsigned int verbosity=MaxDumpVerbosity) const
Dumps the content of the configuration into out stream.
virtual void analyze(art::Event const &event) override
Does nothing, but it is mandatory.
static constexpr unsigned int MaxDumpVerbosity
Maximum supported verbosity level supported by dump().
std::string const fOutputCategory
Category used for message facility stream.
std::set< art::RunID > fRuns
Set of runs already encountered.
art::EDAnalyzer::Table< Config > Parameters