29 using namespace fhicl;
38 Comment(
"data product with the SimPhotons to be dumped")
42 Name(
"OutputCategory"),
43 Comment(
"name of the output stream (managed by the message facility)"),
85 template <
typename Stream>
88 std::string
indent =
"",
bool bIndentFirst =
true 92 template <
typename Stream>
115 template <
typename Stream>
119 out <<
"E=" << onephoton.
Energy <<
" t=" << onephoton.
Time 127 if (onephoton.
SetInSD) out <<
" [in SD]";
132 template <
typename Stream>
135 std::string
indent ,
bool bIndentFirst
137 if (bIndentFirst) out <<
indent;
138 out <<
"channel=" << simphotons.
OpChannel() <<
" has ";
139 if (simphotons.empty()) {
140 out << simphotons.size() <<
" no photons";
143 out << simphotons.size() <<
" photons:";
144 for (
auto const& onephoton: simphotons) {
145 out <<
"\n" << indent <<
" ";
158 = *(
event.getValidHandle<std::vector<sim::SimPhotons>>(
fInputPhotons));
164 unsigned int iPhoton = 0;
169 log <<
"[#" << (iPhoton++) <<
"] ";
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
void DumpElement(Stream &&out, sim::SimPhotons const &simphotons, std::string indent="", bool bIndentFirst=true) const
Dumps the content of the specified SimPhotons in the output stream.
art::InputTag fInputPhotons
name of SimPhotons's data product
contains objects relating to OpDet hits
#define DEFINE_ART_MODULE(klass)
std::string indent(std::size_t const i)
std::string fOutputCategory
name of the stream for output
EDAnalyzer(Table< Config > const &config)
void DumpOnePhoton(Stream &&out, sim::OnePhoton const &photon) const
Dumps a sim::OnePhoton on a single line.
DumpSimPhotons & operator=(DumpSimPhotons const &)=delete
void analyze(art::Event const &event) override
DumpSimPhotons(Parameters const &config)
Configuration-checking constructor.
TVector3 FinalLocalPosition
Event finding and building.