63 Name(
"OpDetWaveformsTag"),
64 Comment(
"input tag of the raw::OpDetWaveform collection to be dumped")
68 Name(
"OutputCategory"),
69 Comment(
"name of the category used for the output"),
74 Name(
"DigitsPerLine"),
76 (
"the dump of ADC readings will put this many of them for each line"),
82 Comment(
"ADC readings are written relative to this number"),
99 template <
typename Stream>
102 std::string
indent, std::string indentFirst
105 template <
typename Stream>
144 <<
"The event " <<
event.id() <<
" contains data for " 145 << Waveforms->size() <<
" optical detector channels";
148 <<
" counts will be subtracted from all ADC readings.";
161 template <
typename Stream>
164 std::string
indent, std::string indentFirst
167 auto const& data = waveform;
172 <<
"on channel #" << waveform.
ChannelNumber() <<
" (time stamp: " 173 << waveform.
TimeStamp() <<
"): " << data.size() <<
" time ticks";
180 unsigned int repeat_count = 0;
181 unsigned int index = 0;
184 out <<
"\n" << indent
185 <<
" content of the channel (" <<
fDigitsPerLine <<
" ticks per line):";
186 auto iTick = data.cbegin(), tend = data.cend();
187 while (iTick != tend) {
189 unsigned int line_size
190 =
std::min(fDigitsPerLine, (
unsigned int) data.size() - index);
191 if (line_size == 0)
break;
194 DigitBuffer.resize(line_size);
195 auto iBuf = DigitBuffer.begin(), bend = DigitBuffer.end();
196 while ((iBuf != bend) && (iTick != tend))
201 if (DigitBuffer == LastBuffer) {
208 if (repeat_count > 0) {
209 out <<
"\n" << indent
210 <<
" [ ... repeated " << repeat_count <<
" more times ]";
215 out <<
"\n" << indent <<
" ";
216 for (
auto digit: DigitBuffer)
217 out <<
" " << std::setw(4) << digit;
221 std::swap(LastBuffer, DigitBuffer);
224 if (repeat_count > 0) {
225 out <<
"\n" << indent
226 <<
" [ ... repeated " << repeat_count <<
" more times to the end]";
228 if (Extrema.
min() != Extrema.
max()) {
229 out <<
"\n" << indent
230 <<
" range of " << data.size()
231 <<
" samples: [" << Extrema.
min() <<
";" << Extrema.
max() <<
"]";
Data_t max() const
Returns the accumulated maximum, or a very small number if no values.
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
This_t & add(Data_t value)
Include a single value in the statistics.
Detector simulation of raw signals on wires.
Classes gathering simple statistics.
Keeps track of the minimum and maximum value we observed.
Data_t min() const
Returns the accumulated minimum, or a very large number if no values.
#define DEFINE_ART_MODULE(klass)
std::string indent(std::size_t const i)
EDAnalyzer(Table< Config > const &config)
Event finding and building.