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::DumpPMTconfiguration Class Reference

Dumps on console the content of sbn::PMTconfiguration data product. More...

Inheritance diagram for sbn::DumpPMTconfiguration:

Classes

struct  Config
 

Public Types

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

Public Member Functions

 DumpPMTconfiguration (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 fPMTconfigurationTag
 Input PMT 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 sbn::PMTconfiguration data product.

Input data products

Configuration parameters

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

Definition at line 60 of file DumpPMTconfiguration_module.cc.

Member Typedef Documentation

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

Definition at line 95 of file DumpPMTconfiguration_module.cc.

Constructor & Destructor Documentation

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

Definition at line 143 of file DumpPMTconfiguration_module.cc.

144  : art::EDAnalyzer(config)
145  // configuration
146  , fPMTconfigurationTag(config().PMTconfigurationTag())
147  , fVerbosity (config().Verbosity())
148  , fSkipDuplicateRuns (config().SkipDuplicateRuns())
149  , fOutputCategory (config().OutputCategory())
150 {
151 
152  consumes<sbn::PMTconfiguration, art::InRun>(fPMTconfigurationTag);
153 
154 } // sbn::DumpPMTconfiguration::DumpPMTconfiguration()
std::string const fOutputCategory
Category used for message facility stream.
bool const fSkipDuplicateRuns
Print only once from each run.
art::InputTag const fPMTconfigurationTag
Input PMT configuration tag.
unsigned int const fVerbosity
Verbosity level used for dumping.

Member Function Documentation

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

Does nothing, but it is mandatory.

Definition at line 111 of file DumpPMTconfiguration_module.cc.

111 {}
void sbn::DumpPMTconfiguration::beginRun ( art::Run const &  run)
overridevirtual

Dumps the data product.

Definition at line 158 of file DumpPMTconfiguration_module.cc.

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

Member Data Documentation

std::string const sbn::DumpPMTconfiguration::fOutputCategory
private

Category used for message facility stream.

Definition at line 127 of file DumpPMTconfiguration_module.cc.

art::InputTag const sbn::DumpPMTconfiguration::fPMTconfigurationTag
private

Input PMT configuration tag.

Definition at line 120 of file DumpPMTconfiguration_module.cc.

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

Set of runs already encountered.

Definition at line 132 of file DumpPMTconfiguration_module.cc.

bool const sbn::DumpPMTconfiguration::fSkipDuplicateRuns
private

Print only once from each run.

Definition at line 124 of file DumpPMTconfiguration_module.cc.

unsigned int const sbn::DumpPMTconfiguration::fVerbosity
private

Verbosity level used for dumping.

Definition at line 122 of file DumpPMTconfiguration_module.cc.


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