LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
detsim::DumpOpDetWaveforms::TimestampLabelMaker Struct Reference

Base functor for printing time according to tick number. More...

Inheritance diagram for detsim::DumpOpDetWaveforms::TimestampLabelMaker:
dump::raw::OpDetWaveformDumper::TimeLabelMaker

Public Member Functions

 TimestampLabelMaker (double tickDuration)
 Constructor: specify the duration of optical clock tick [µs]. More...
 
virtual std::string label (raw::OpDetWaveform const &waveform, unsigned int tick) const override
 Returns the electronics time of the specified waveform tick. More...
 
virtual unsigned int labelWidth (raw::OpDetWaveform const &waveform, unsigned int tick) const
 Length of padded label. For best results, it should be a constant. More...
 

Public Attributes

double tickDuration
 

Detailed Description

Base functor for printing time according to tick number.

Definition at line 112 of file DumpOpDetWaveforms_module.cc.

Constructor & Destructor Documentation

detsim::DumpOpDetWaveforms::TimestampLabelMaker::TimestampLabelMaker ( double  tickDuration)
inline

Constructor: specify the duration of optical clock tick [µs].

Definition at line 116 of file DumpOpDetWaveforms_module.cc.

Member Function Documentation

virtual std::string detsim::DumpOpDetWaveforms::TimestampLabelMaker::label ( raw::OpDetWaveform const &  waveform,
unsigned int  tick 
) const
inlineoverridevirtual

Returns the electronics time of the specified waveform tick.

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

Definition at line 119 of file DumpOpDetWaveforms_module.cc.

References raw::OpDetWaveform::TimeStamp(), and util::to_string().

121  {
122  return std::to_string(waveform.TimeStamp() + tick * tickDuration);
123  }
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::TimeLabelMaker::labelWidth ( raw::OpDetWaveform const &  waveform,
unsigned int  tick 
) const
inlinevirtualinherited

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

Reimplemented in dump::raw::OpDetWaveformDumper::TickLabelMaker.

Definition at line 54 of file OpDetWaveform.h.

Referenced by dump::raw::OpDetWaveformDumper::dump().

55  {
56  return 10U;
57  }

Member Data Documentation

double detsim::DumpOpDetWaveforms::TimestampLabelMaker::tickDuration

Definition at line 113 of file DumpOpDetWaveforms_module.cc.


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