LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
dump::raw::OpDetWaveformDumper::TickLabelMaker Struct Reference

Time label: tick number relative to the waveform. More...

#include "OpDetWaveform.h"

Inheritance diagram for dump::raw::OpDetWaveformDumper::TickLabelMaker:
dump::raw::OpDetWaveformDumper::TimeLabelMaker

Public Member Functions

virtual std::string label (raw::OpDetWaveform const &, unsigned int tick) const override
 Returns the label to be written for the specified tick number. More...
 
virtual unsigned int labelWidth (raw::OpDetWaveform const &waveform, unsigned int) const override
 Length of padded label. For best results, it should be a constant. More...
 

Detailed Description

Time label: tick number relative to the waveform.

Definition at line 62 of file OpDetWaveform.h.

Member Function Documentation

virtual std::string dump::raw::OpDetWaveformDumper::TickLabelMaker::label ( raw::OpDetWaveform const &  ,
unsigned int  tick 
) const
inlineoverridevirtual

Returns the label to be written for the specified tick number.

Implements dump::raw::OpDetWaveformDumper::TimeLabelMaker.

Definition at line 65 of file OpDetWaveform.h.

References util::to_string().

66  {
67  return std::to_string(tick);
68  }
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:73
virtual unsigned int dump::raw::OpDetWaveformDumper::TickLabelMaker::labelWidth ( raw::OpDetWaveform const &  waveform,
unsigned int   
) const
inlineoverridevirtual

Length of padded label. For best results, it should be a constant.

Reimplemented from dump::raw::OpDetWaveformDumper::TimeLabelMaker.

Definition at line 71 of file OpDetWaveform.h.

References dump::raw::OpDetWaveformDumper::digitsOf().

73  {
74  return digitsOf(waveform.size());
75  }
static unsigned int digitsOf(unsigned int n)
Pads the specified string to the right, truncating its right if needed.

The documentation for this struct was generated from the following file: