All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
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...
 
- Public Member Functions inherited from dump::raw::OpDetWaveformDumper::TimeLabelMaker
virtual ~TimeLabelMaker ()=default
 

Detailed Description

Time label: tick number relative to the waveform.

Definition at line 66 of file lardataalg/lardataalg/Dumpers/RawData/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 70 of file lardataalg/lardataalg/Dumpers/RawData/OpDetWaveform.h.

71  { return std::to_string(tick); }
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:75
std::string to_string(WindowPattern const &pattern)
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 75 of file lardataalg/lardataalg/Dumpers/RawData/OpDetWaveform.h.

76  { return digitsOf(waveform.size()); }
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: