|
| DumpWires (Parameters const &config) |
| Constructor. More...
|
|
virtual void | analyze (art::Event const &evt) override |
| Does the printing. More...
|
|
std::string | workerType () const |
|
bool | modifiesEvent () const |
|
void | registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &) |
|
std::string const & | processName () const |
|
bool | wantAllEvents () const |
|
bool | wantEvent (Event const &e) |
|
fhicl::ParameterSetID | selectorConfig () const |
|
art::Handle< art::TriggerResults > | getTriggerResults (Event const &e) const |
|
template<typename T , BranchType = InEvent> |
ProductToken< T > | consumes (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ProductToken< T > | consumes (InputTag const &it) |
|
template<typename T , BranchType = InEvent> |
void | consumesMany () |
|
template<typename Element , BranchType = InEvent> |
ViewToken< Element > | consumesView (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ViewToken< T > | consumesView (InputTag const &it) |
|
template<typename T , BranchType = InEvent> |
ProductToken< T > | mayConsume (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ProductToken< T > | mayConsume (InputTag const &it) |
|
template<typename T , BranchType = InEvent> |
void | mayConsumeMany () |
|
template<typename Element , BranchType = InEvent> |
ViewToken< Element > | mayConsumeView (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ViewToken< T > | mayConsumeView (InputTag const &it) |
|
base_engine_t & | createEngine (seed_t seed) |
|
base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make) |
|
base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label) |
|
seed_t | get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1) |
|
Prints the content of all the wires on screen.
This analyser prints the content of all the wires into the LogVerbatim
stream.
Configuration parameters
- CalWireModuleLabel (string, default:
"caldata"
): label of the producer used to create the recob::Wire
collection to be dumped
- OutputCategory (string, default:
"DumpWires"
): the category used for the output (useful for filtering)
- DigitsPerLine (integer, default:
20
): the dump of digits and ticks will put this many of them for each line; 0
suppresses digit printout
Definition at line 72 of file DumpWires_module.cc.
template<typename Stream >
void caldata::DumpWires::PrintWire |
( |
Stream && |
out, |
|
|
recob::Wire const & |
wire, |
|
|
std::string |
indent = " " , |
|
|
std::string |
firstIndent = " " |
|
) |
| const |
|
private |
Dumps a single recob:Wire
to the specified output stream.
Definition at line 158 of file DumpWires_module.cc.
References lar::util::MinMaxCollector< T >::add(), recob::Wire::Channel(), DEFINE_ART_MODULE, fDigitsPerLine, lar::util::MinMaxCollector< T >::max(), min, lar::util::MinMaxCollector< T >::min(), recob::Wire::NSignal(), recob::Wire::SignalROI(), and recob::Wire::View().
Referenced by analyze().
165 RegionsOfInterest_t
const & RoIs = wire.SignalROI();
170 out << firstIndent <<
"channel #" << wire.Channel() <<
" on view " 171 << ViewName(wire.View()) <<
"; " << wire.NSignal() <<
" time ticks";
172 if (wire.NSignal() != RoIs.size())
173 out <<
" [!!! EXPECTED " << RoIs.
size() <<
"]";
174 if (RoIs.n_ranges() == 0) {
175 out <<
" with nothing in them";
178 out <<
" with " << RoIs.n_ranges() <<
" regions of interest:";
183 for (RegionsOfInterest_t::datarange_t
const& RoI: RoIs.get_ranges()) {
185 <<
" from " << RoI.offset <<
" for " << RoI.size() <<
" ticks";
193 std::vector<RegionsOfInterest_t::value_type> DigitBuffer(
fDigitsPerLine),
196 unsigned int repeat_count = 0;
197 unsigned int index = 0;
200 <<
" content of the wire (" <<
fDigitsPerLine <<
" ticks per line):";
201 auto iTick = RoIs.cbegin(), tend = RoIs.cend();
202 while (iTick != tend) {
204 unsigned int line_size
205 =
std::min(fDigitsPerLine, (
unsigned int) RoIs.size() - index);
206 if (line_size == 0)
break;
209 DigitBuffer.resize(line_size);
210 auto iBuf = DigitBuffer.begin(), bend = DigitBuffer.end();
211 while ((iBuf != bend) && (iTick != tend))
212 Extrema.
add(*(iBuf++) = *(iTick++));
216 if (DigitBuffer == LastBuffer) {
223 if (repeat_count > 0) {
225 <<
" [ ... repeated " << repeat_count <<
" more times, " 226 << (repeat_count * LastBuffer.size()) <<
" ticks ]";
232 <<
" " << std::fixed << std::setprecision(3);
233 for (
auto digit: DigitBuffer) out << std::setw(8) << digit;
240 if (repeat_count > 0) {
242 <<
" [ ... repeated " << repeat_count <<
" more times to the end ]";
244 if (Extrema.
min() < Extrema.
max()) {
246 <<
" range of " << index
247 <<
" samples: [" << Extrema.
min() <<
";" << Extrema.
max() <<
"]";
Data_t max() const
Returns the accumulated maximum, or a very small number if no values.
This_t & add(Data_t value)
Include a single value in the statistics.
size_type size() const
Returns the size of the vector.
lar::sparse_vector< float > RegionsOfInterest_t
a region of interest is a pair (TDC offset, readings)
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.
std::string indent(std::size_t const i)
unsigned int fDigitsPerLine
Ticks/digits per line in the output.
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)