All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
sbn::DumpTriggerConfiguration Class Reference

Dumps on console the content of icarus::TriggerConfiguration data product. More...

Inheritance diagram for sbn::DumpTriggerConfiguration:

Classes

struct  Config
 

Public Types

using Parameters = art::EDAnalyzer::Table< Config >
 

Public Member Functions

 DumpTriggerConfiguration (Parameters const &config)
 
virtual void beginRun (art::Run const &run) override
 Dumps the data product. More...
 
virtual void analyze (art::Event const &event) override
 Does nothing, but it is mandatory. More...
 

Private Attributes

art::InputTag const fTriggerConfigurationTag
 Input trigger configuration tag. More...
 
unsigned int const fVerbosity
 Verbosity level used for dumping. More...
 
bool const fSkipDuplicateRuns
 Print only once from each run. More...
 
std::string const fOutputCategory
 Category used for message facility stream. More...
 
std::set< art::RunID > fRuns
 Set of runs already encountered. More...
 

Detailed Description

Dumps on console the content of icarus::TriggerConfiguration data product.

Input data products

Configuration parameters

A terse description of the parameters is printed by running lar --print-description DumpTriggerConfiguration.

Definition at line 63 of file DumpTriggerConfiguration_module.cc.

Member Typedef Documentation

using sbn::DumpTriggerConfiguration::Parameters = art::EDAnalyzer::Table<Config>

Definition at line 98 of file DumpTriggerConfiguration_module.cc.

Constructor & Destructor Documentation

sbn::DumpTriggerConfiguration::DumpTriggerConfiguration ( Parameters const &  config)
explicit

Definition at line 147 of file DumpTriggerConfiguration_module.cc.

148  : art::EDAnalyzer(config)
149  // configuration
150  , fTriggerConfigurationTag(config().TriggerConfigurationTag())
151  , fVerbosity (config().Verbosity())
152  , fSkipDuplicateRuns (config().SkipDuplicateRuns())
153  , fOutputCategory (config().OutputCategory())
154 {
155 
156  consumes<icarus::TriggerConfiguration, art::InRun>(fTriggerConfigurationTag);
157 
158 } // sbn::DumpTriggerConfiguration::DumpTriggerConfiguration()
art::InputTag const fTriggerConfigurationTag
Input trigger configuration tag.
bool const fSkipDuplicateRuns
Print only once from each run.
unsigned int const fVerbosity
Verbosity level used for dumping.
std::string const fOutputCategory
Category used for message facility stream.

Member Function Documentation

virtual void sbn::DumpTriggerConfiguration::analyze ( art::Event const &  event)
inlineoverridevirtual

Does nothing, but it is mandatory.

Definition at line 114 of file DumpTriggerConfiguration_module.cc.

114 {}
void sbn::DumpTriggerConfiguration::beginRun ( art::Run const &  run)
overridevirtual

Dumps the data product.

Definition at line 162 of file DumpTriggerConfiguration_module.cc.

162  {
163 
164  if (fSkipDuplicateRuns) {
165  art::RunID const& id = run.id();
166  if (fRuns.count(id)) {
167  mf::LogTrace(fOutputCategory) << id << " has already been encountered.";
168  return;
169  }
170  fRuns.insert(id);
171  } // if skip duplicates
172 
173  auto const& config
175 
176  std::ostringstream sstr;
177  config.dump(sstr, " ", "", fVerbosity);
178 
179  mf::LogVerbatim(fOutputCategory) << run.id() << ": " << sstr.str();
180 
181 
182 } // sbn::DumpTriggerConfiguration::beginRun()
art::InputTag const fTriggerConfigurationTag
Input trigger configuration tag.
bool const fSkipDuplicateRuns
Print only once from each run.
unsigned int const fVerbosity
Verbosity level used for dumping.
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.
std::string const fOutputCategory
Category used for message facility stream.
std::set< art::RunID > fRuns
Set of runs already encountered.

Member Data Documentation

std::string const sbn::DumpTriggerConfiguration::fOutputCategory
private

Category used for message facility stream.

Definition at line 131 of file DumpTriggerConfiguration_module.cc.

std::set<art::RunID> sbn::DumpTriggerConfiguration::fRuns
private

Set of runs already encountered.

Definition at line 136 of file DumpTriggerConfiguration_module.cc.

bool const sbn::DumpTriggerConfiguration::fSkipDuplicateRuns
private

Print only once from each run.

Definition at line 128 of file DumpTriggerConfiguration_module.cc.

art::InputTag const sbn::DumpTriggerConfiguration::fTriggerConfigurationTag
private

Input trigger configuration tag.

Definition at line 124 of file DumpTriggerConfiguration_module.cc.

unsigned int const sbn::DumpTriggerConfiguration::fVerbosity
private

Verbosity level used for dumping.

Definition at line 126 of file DumpTriggerConfiguration_module.cc.


The documentation for this class was generated from the following file: