|
using | Parameters = art::EDAnalyzer::Table< Config > |
|
Definition at line 115 of file DumpSimPhotons_module.cc.
sim::DumpSimPhotons::DumpSimPhotons |
( |
Parameters const & |
config | ) |
|
|
explicit |
Configuration-checking constructor.
Definition at line 170 of file DumpSimPhotons_module.cc.
art::InputTag fInputPhotons
name of SimPhotons's data product
std::string fOutputCategory
name of the stream for output
void sim::DumpSimPhotons::analyze |
( |
art::Event const & |
event | ) |
|
|
override |
Definition at line 219 of file DumpSimPhotons_module.cc.
222 auto const& SimPhotons
223 = *(
event.getValidHandle<std::vector<sim::SimPhotons>>(
fInputPhotons));
226 <<
" : data product '" <<
fInputPhotons.encode() <<
"' contains "
227 << SimPhotons.size() <<
" SimPhotons";
229 unsigned int iPhoton = 0;
234 log <<
"[#" << (iPhoton++) <<
"] ";
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
std::string fOutputCategory
name of the stream for output
Collection of photons which recorded on one channel.
template<typename Stream >
void sim::DumpSimPhotons::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.
- Template Parameters
-
Stream | the type of output stream |
- Parameters
-
out | the output stream |
simphotons | the SimPhotons to be dumped |
indent | base indentation string (default: none) |
bIndentFirst | 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 192 of file DumpSimPhotons_module.cc.
196 if (bIndentFirst) out << indent;
197 out <<
"channel=" << simphotons.OpChannel() <<
" has ";
198 if (simphotons.empty()) {
199 out << simphotons.size() <<
" no photons";
202 out << simphotons.size() <<
" photons:";
206 (sortedPhotonPtrs.begin(), sortedPhotonPtrs.end(), OnePhotonSorter());
208 for (
auto const* onephoton: sortedPhotonPtrs) {
209 out <<
"\n" << indent <<
" ";
auto makePointerVector(Coll &coll)
Creates a STL vector with pointers to data from another collection.
void DumpOnePhoton(Stream &&out, sim::OnePhoton const &photon) const
Dumps a sim::OnePhoton on a single line.
template<typename Stream >
Dumps a sim::OnePhoton on a single line.
Definition at line 179 of file DumpSimPhotons_module.cc.
181 out <<
"E=" << onephoton.Energy <<
" t=" << onephoton.Time
182 <<
" from " << onephoton.InitialPosition <<
" cm"
183 <<
" to " << onephoton.FinalLocalPosition <<
" cm"
185 if (onephoton.SetInSD) out <<
" [in SD]";
186 out <<
" from track ID=" << onephoton.MotherTrackID;
art::InputTag sim::DumpSimPhotons::fInputPhotons |
|
private |
std::string sim::DumpSimPhotons::fOutputCategory |
|
private |
The documentation for this class was generated from the following file: