Public Member Functions | Public Attributes | List of all members
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...
 
- Public Member Functions inherited from dump::raw::OpDetWaveformDumper::TimeLabelMaker
virtual ~TimeLabelMaker ()=default
 
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 114 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 118 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 122 of file DumpOpDetWaveforms_module.cc.

123  {
124  return std::to_string(waveform.TimeStamp() + tick * tickDuration);
125  }
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:75
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34

Member Data Documentation

double detsim::DumpOpDetWaveforms::TimestampLabelMaker::tickDuration

Definition at line 115 of file DumpOpDetWaveforms_module.cc.


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