37 using namespace fhicl;
46 Comment(
"data product with the SimPhotonsLite to be dumped")
50 Name(
"OutputCategory"),
51 Comment(
"name of the output stream (managed by the message facility)"),
93 template <
typename Stream>
96 std::string
indent, std::string firstIndent
99 template <
typename Stream>
125 template <
typename Stream>
128 std::string
indent, std::string firstIndent
131 unsigned int const nPhotons = std::accumulate(
133 0U, [](
auto sum,
auto const& entry){
return sum + entry.second; }
137 <<
"channel=" << photons.
OpChannel <<
" has ";
139 out << nPhotons <<
" photons (format: [tick] photons):";
140 constexpr
unsigned int PageSize = 5;
141 unsigned int pager = 0;
144 pager = PageSize - 1;
145 out <<
"\n" << indent <<
" ";
147 out <<
" [" << pair.first <<
"] " << std::setw(6) << pair.second;
162 = *(
event.getValidHandle<std::vector<sim::SimPhotonsLite>>(
fInputPhotons));
166 << Photons.size() <<
" SimPhotonsLite";
168 unsigned int iChannel = 0;
173 log <<
"[#" << (iChannel++) <<
"] ";
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
DumpSimPhotonsLite & operator=(DumpSimPhotonsLite const &)=delete
art::InputTag fInputPhotons
name of SimPhotons's data product
std::map< int, int > DetectedPhotons
contains objects relating to OpDet hits
DumpSimPhotonsLite(Parameters const &config)
Configuration-checking constructor.
#define DEFINE_ART_MODULE(klass)
std::string indent(std::size_t const i)
EDAnalyzer(Table< Config > const &config)
void analyze(art::Event const &event) override
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.
Event finding and building.
std::string fOutputCategory
name of the stream for output