100 ElecClock(
double const time,
double const frame_period,
double const frequency)
101 :
ElecClock{time, frame_period, frequency, std::nothrow}
154 Time(
int const sample,
int const frame)
const noexcept
238 Ticks(
int const sample,
int const frame)
const noexcept
344 constexpr
unsigned int 362 return fTime < rhs.Time();
367 return fTime > rhs.Time();
372 return fTime <= rhs.Time();
377 return fTime >= rhs.Time();
382 double const frame_period,
383 double const frequency,
384 std::nothrow_t) noexcept
constexpr ElecClock WithTime(double const time) const noexcept
constexpr int Frame(int const tick) const noexcept
Returns the number of the frame containing the specified tick.
constexpr unsigned int FrameTicks() const noexcept
Number ticks in a frame.
constexpr double kTIME_MAX
Maximum time in microseconds.
constexpr int Ticks(double const time) const noexcept
Returns the number of tick the specified time falls in.
constexpr int Sample(double const time) const noexcept
Returns the number of the sample containing the specified time.
constexpr double FramePeriod() const noexcept
A single frame period in microseconds.
constexpr int Ticks(int const sample, int const frame) const noexcept
Returns the number of tick the specified sample falls in.
constexpr ElecClock WithTick(int const tick, int const frame=0) const noexcept
constexpr ElecClock AdvanceTimeBy(double const time) const noexcept
constexpr int Frame(double const time) const noexcept
Returns the number of the frame containing the specified time.
constexpr int Frame() const noexcept
Returns the number of the frame containing the clock current time.
tick ticks
Alias for common language habits.
constexpr int Ticks() const noexcept
Current clock tick (that is, the number of tick Time() falls in).
constexpr bool operator>(const ElecClock &rhs) const noexcept
double fFrequency
Clock speed in MHz.
constexpr double TickPeriod() const noexcept
A single tick period in microseconds.
constexpr int Sample(int const tick) const noexcept
Returns the number of the sample containing the specified tick.
constexpr double Time(double const time) const noexcept
Returns the discretized value of the specified time.
constexpr ElecClock AdvanceTicksBy(int const ticks) const noexcept
constexpr int Sample() const noexcept
Returns number of the sample containing the clock current time.
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
constexpr ElecClock(double const time, double const frame_period, double const frequency, std::nothrow_t) noexcept
constexpr double Time() const noexcept
Current time (as stored) in microseconds.
General LArSoft Utilities.
constexpr bool operator<=(const ElecClock &rhs) const noexcept
double fTime
Time in microseconds.
constexpr bool operator<(const ElecClock &rhs) const noexcept
ElecClock(double const time, double const frame_period, double const frequency)
Constructor: sets all values.
constexpr double Frequency() const
Frequency in MHz.
constexpr double Time(int const sample, int const frame) const noexcept
Returns the absolute time of the start of the specified sample.
constexpr bool operator>=(const ElecClock &rhs) const noexcept
Class representing the time measured by an electronics clock.
constexpr double Time(int const ticks) const noexcept
Returns the absolute start time of the specified tick.
double fFramePeriod
Frame period in microseconds.