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
icarus::trigger::WriteBeamGateInfo Class Reference

Writes a set collection of beam gates into each event. More...

Inheritance diagram for icarus::trigger::WriteBeamGateInfo:

Classes

struct  Config
 

Public Types

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

Public Member Functions

 WriteBeamGateInfo (Parameters const &config, art::ProcessingFrame const &)
 
virtual void produce (art::Event &event, art::ProcessingFrame const &) override
 Fills the plots. Also extracts the information to fill them with. More...
 

Private Attributes

std::vector< sim::BeamGateInfo >
const 
fBeamGates
 The gates to write. More...
 
std::string const fLogCategory
 Message facility stream category for output. More...
 

Detailed Description

Writes a set collection of beam gates into each event.

This module simply injects a list of sim::BeamGateInfo from the configuration into each event.

It may be used as input to modules which require to operate on beam gates.

Output data products

Configuration parameters

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

Definition at line 75 of file WriteBeamGateInfo_module.cc.

Member Typedef Documentation

using icarus::trigger::WriteBeamGateInfo::Parameters = art::SharedProducer::Table<Config>

Definition at line 148 of file WriteBeamGateInfo_module.cc.

Constructor & Destructor Documentation

icarus::trigger::WriteBeamGateInfo::WriteBeamGateInfo ( Parameters const &  config,
art::ProcessingFrame const &   
)
explicit

Definition at line 219 of file WriteBeamGateInfo_module.cc.

220  : art::SharedProducer(config)
221  // configuration
222  , fBeamGates(config().BeamGates())
223  , fLogCategory(config().LogCategory())
224 {
225 
226  //
227  // output data declaration
228  //
229  produces<std::vector<sim::BeamGateInfo>>();
230 
231  async<art::InEvent>();
232 
233  //
234  // configuration report (short)
235  //
236  {
237  mf::LogInfo log { fLogCategory };
238  log << "Writing " << fBeamGates.size() << " gates in each event:";
239  for (sim::BeamGateInfo const& gate: fBeamGates) {
240  auto const& beamType = Config::GateConfig::BeamTypeSelector.get
241  (Config::GateConfig::BeamType_t(gate.BeamType()));
242  log << "\n * [ " << gate.Start() << " -- " << gate.Start() + gate.Width()
243  << " ] ns (duration: " << gate.Width() << " ns), type: "
244  << beamType.name() << " (" << gate.BeamType() << ")"
245  ;
246  } // for
247  }
248 
249 } // icarus::trigger::WriteBeamGateInfo::WriteBeamGateInfo()
std::vector< sim::BeamGateInfo > const fBeamGates
The gates to write.
static util::MultipleChoiceSelection< BeamType_t > const BeamTypeSelector
Selector for Type parameter.
std::string const fLogCategory
Message facility stream category for output.
Option_t const & get(Choices_t value) const
Returns the specified option.
std::string name() const
Returns the name of the option (i.e. the main label).

Member Function Documentation

void icarus::trigger::WriteBeamGateInfo::produce ( art::Event &  event,
art::ProcessingFrame const &   
)
overridevirtual

Fills the plots. Also extracts the information to fill them with.

Definition at line 254 of file WriteBeamGateInfo_module.cc.

255 {
256 
257  // put a copy
258  event.put(std::make_unique<std::vector<sim::BeamGateInfo>>(fBeamGates));
259 
260 } // icarus::trigger::WriteBeamGateInfo::produce()
std::vector< sim::BeamGateInfo > const fBeamGates
The gates to write.

Member Data Documentation

std::vector<sim::BeamGateInfo> const icarus::trigger::WriteBeamGateInfo::fBeamGates
private

The gates to write.

Definition at line 173 of file WriteBeamGateInfo_module.cc.

std::string const icarus::trigger::WriteBeamGateInfo::fLogCategory
private

Message facility stream category for output.

Definition at line 176 of file WriteBeamGateInfo_module.cc.


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