79 Name(
"CalWireModuleLabel"),
80 Comment(
"tag of producer used to create the recob::Wire collection"),
85 Name(
"OutputCategory"),
86 Comment(
"the messagefacility category used for the output"),
91 Name(
"DigitsPerLine"),
92 Comment(
"number of digits printed per line (0: don't print digits)"),
114 template <
typename Stream>
156 template <
typename Stream>
164 RegionsOfInterest_t
const & RoIs = wire.
SignalROI();
169 out << firstIndent <<
"channel #" << wire.
Channel() <<
" on view " 170 << ViewName(wire.
View()) <<
"; " << wire.
NSignal() <<
" time ticks";
171 if (wire.
NSignal() != RoIs.size())
172 out <<
" [!!! EXPECTED " << RoIs.size() <<
"]";
173 if (RoIs.n_ranges() == 0) {
174 out <<
" with nothing in them";
177 out <<
" with " << RoIs.n_ranges() <<
" regions of interest:";
182 for (RegionsOfInterest_t::datarange_t
const& RoI: RoIs.get_ranges()) {
183 out <<
"\n" << indent
184 <<
" from " << RoI.offset <<
" for " << RoI.size() <<
" ticks";
192 std::vector<RegionsOfInterest_t::value_type> DigitBuffer(
fDigitsPerLine),
195 unsigned int repeat_count = 0;
196 unsigned int index = 0;
198 out <<
"\n" << indent
199 <<
" content of the wire (" <<
fDigitsPerLine <<
" ticks per line):";
200 auto iTick = RoIs.cbegin(), tend = RoIs.cend();
201 while (iTick != tend) {
203 unsigned int line_size
204 =
std::min(fDigitsPerLine, (
unsigned int) RoIs.size() -
index);
205 if (line_size == 0)
break;
208 DigitBuffer.resize(line_size);
209 auto iBuf = DigitBuffer.begin(), bend = DigitBuffer.end();
210 while ((iBuf != bend) && (iTick != tend))
211 Extrema.
add(*(iBuf++) = *(iTick++));
215 if (DigitBuffer == LastBuffer) {
222 if (repeat_count > 0) {
223 out <<
"\n" << indent
224 <<
" [ ... repeated " << repeat_count <<
" more times, " 225 << (repeat_count * LastBuffer.size()) <<
" ticks ]";
230 out <<
"\n" << indent
232 for (
auto digit: DigitBuffer) out <<
std::setw(8) << digit;
239 if (repeat_count > 0) {
240 out <<
"\n" << indent
241 <<
" [ ... repeated " << repeat_count <<
" more times to the end ]";
243 if (Extrema.
min() < Extrema.
max()) {
244 out <<
"\n" << indent
245 <<
" range of " << index
246 <<
" 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.
Prints the content of all the wires on screen.
fhicl::Atom< std::string > OutputCategory
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
art::InputTag fCalWireModuleLabel
Input tag for wires.
ChannelGroupService::Name Name
Planes which measure Z direction.
lar::sparse_vector< float > RegionsOfInterest_t
a region of interest is a pair (TDC offset, readings)
EDAnalyzer(fhicl::ParameterSet const &pset)
creation of calibrated signals on wires
Classes gathering simple statistics.
Q_EXPORT QTSManip setprecision(int p)
3-dimensional objects, potentially hits, clusters, prongs, etc.
geo::View_t View() const
Returns the view the channel belongs to.
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.
fhicl::Atom< art::InputTag > CalWireModuleLabel
#define DEFINE_ART_MODULE(klass)
std::string fOutputCategory
Category for LogVerbatim output.
void swap(Handle< T > &a, Handle< T > &b)
raw::ChannelID_t Channel() const
Returns the ID of the channel (or InvalidChannelID)
void PrintWire(Stream &&out, recob::Wire const &wire, std::string indent=" ", std::string firstIndent=" ") const
Dumps a single recob:Wire to the specified output stream.
unsigned int fDigitsPerLine
Ticks/digits per line in the output.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
const RegionsOfInterest_t & SignalROI() const
Returns the list of regions of interest.
Definition of data types for geometry description.
Q_EXPORT QTSManip setw(int w)
DumpWires(Parameters const &config)
Constructor.
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Class holding the regions of interest of signal from a channel.
virtual void analyze(art::Event const &evt) override
Does the printing.
Declaration of basic channel signal object.
fhicl::Atom< unsigned int > DigitsPerLine
std::string to_string(ModuleType const mt)
std::size_t NSignal() const
Returns the number of time ticks, or samples, in the channel.