30 class DumpSimPhotonsLite;
35 using namespace fhicl;
44 Comment(
"data product with the SimPhotonsLite to be dumped")
48 Name(
"OutputCategory"),
49 Comment(
"name of the output stream (managed by the message facility)"),
91 template <
typename Stream>
97 template <
typename Stream>
123 template <
typename Stream>
129 unsigned int const nPhotons = std::accumulate(
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;
142 pager = PageSize - 1;
143 out <<
"\n" << indent <<
" ";
145 out <<
" [" << pair.first <<
"] " <<
std::setw(6) << pair.second;
160 = *(
event.getValidHandle<std::vector<sim::SimPhotonsLite>>(
fInputPhotons));
164 << Photons.size() <<
" SimPhotonsLite";
166 unsigned int iChannel = 0;
171 log <<
"[#" << (iChannel++) <<
"] ";
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
ChannelGroupService::Name Name
EDAnalyzer(fhicl::ParameterSet const &pset)
DumpSimPhotonsLite & operator=(DumpSimPhotonsLite const &)=delete
art::InputTag fInputPhotons
name of SimPhotons's data product
std::map< int, int > DetectedPhotons
Number of photons detected at each given time: time tick -> photons.
typename config_impl< T >::type Config
Simulation objects for optical detectors.
DumpSimPhotonsLite(Parameters const &config)
Configuration-checking constructor.
#define DEFINE_ART_MODULE(klass)
int OpChannel
Optical detector channel associated to this data.
Code to link reconstructed objects back to the MC truth information.
Q_EXPORT QTSManip setw(int w)
Compact representation of photons on a channel.
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