|
using | Parameters = art::EDAnalyzer::Table< Config > |
|
sim::DumpSimPhotonsLite::DumpSimPhotonsLite |
( |
Parameters const & |
config | ) |
|
|
explicit |
Configuration-checking constructor.
Definition at line 116 of file DumpSimPhotonsLite_module.cc.
art::InputTag fInputPhotons
name of SimPhotons's data product
std::string fOutputCategory
name of the stream for output
void sim::DumpSimPhotonsLite::analyze |
( |
art::Event const & |
event | ) |
|
|
override |
Definition at line 156 of file DumpSimPhotonsLite_module.cc.
160 = *(
event.getValidHandle<std::vector<sim::SimPhotonsLite>>(
fInputPhotons));
163 <<
" : data product '" <<
fInputPhotons.encode() <<
"' contains "
164 << Photons.size() <<
" SimPhotonsLite";
166 unsigned int iChannel = 0;
171 log <<
"[#" << (iChannel++) <<
"] ";
art::InputTag fInputPhotons
name of SimPhotons's data product
Compact representation of photons on a channel.
void DumpPhoton(Stream &&out, sim::SimPhotonsLite const &photons, std::string indent, std::string firstIndent) const
Dumps the content of specified SimPhotonsLite in the output stream.
std::string fOutputCategory
name of the stream for output
template<typename Stream >
void sim::DumpSimPhotonsLite::DumpPhoton |
( |
Stream && |
out, |
|
|
sim::SimPhotonsLite const & |
photons, |
|
|
std::string |
indent, |
|
|
std::string |
firstIndent |
|
) |
| const |
Dumps the content of specified SimPhotonsLite in the output stream.
- Template Parameters
-
Stream | the type of output stream |
- Parameters
-
out | the output stream |
photons | the SimPhotonsLite to be dumped |
indent | base indentation string _(default: none)_ |
firstIndent | if first output line should be indented _(default: yes)_ |
The indent string is prepended to every line of output, with the possible exception of the first one, in case bIndentFirst is true.
The output starts on the current line, and the last line is not broken.
Definition at line 124 of file DumpSimPhotonsLite_module.cc.
129 unsigned int const nPhotons = std::accumulate(
130 photons.DetectedPhotons.begin(), photons.DetectedPhotons.end(),
131 0U, [](
auto sum,
auto const& entry){
return sum + entry.second; }
135 <<
"channel=" << photons.OpChannel <<
" has ";
137 out << nPhotons <<
" photons (format: [tick] photons):";
138 constexpr
unsigned int PageSize = 5;
139 unsigned int pager = 0;
140 for (
auto const& pair: photons.DetectedPhotons) {
142 pager = PageSize - 1;
143 out <<
"\n" << indent <<
" ";
145 out <<
" [" << pair.first <<
"] " << std::setw(6) << pair.second;
template<typename Stream >
void sim::DumpSimPhotonsLite::DumpPhoton |
( |
Stream && |
out, |
|
|
sim::SimPhotonsLite const & |
photons, |
|
|
std::string |
indent = "" |
|
) |
| const |
|
inline |
Definition at line 99 of file DumpSimPhotonsLite_module.cc.
101 {
DumpPhoton(std::forward<Stream>(out), photons, indent, indent); }
void DumpPhoton(Stream &&out, sim::SimPhotonsLite const &photons, std::string indent, std::string firstIndent) const
Dumps the content of specified SimPhotonsLite in the output stream.
art::InputTag sim::DumpSimPhotonsLite::fInputPhotons |
|
private |
std::string sim::DumpSimPhotonsLite::fOutputCategory |
|
private |
The documentation for this class was generated from the following file: