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
169 Time(
double const time)
const noexcept
221 Ticks(
double const time)
const noexcept
238 Ticks(
int const sample,
int const frame)
const noexcept
321 Frame(
double const time)
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 bool operator>(const ElecClock &rhs) const noexcept
constexpr double Time(double const time) const noexcept
Returns the discretized value of the specified time.
constexpr int Frame(int const tick) const noexcept
Returns the number of the frame containing the specified tick.
constexpr int Ticks(int const sample, int const frame) const noexcept
Returns the number of tick the specified sample falls in.
constexpr double kTIME_MAX
Maximum time in microseconds.
constexpr int Sample(double const time) const noexcept
Returns the number of the sample containing the specified time.
constexpr int Sample() const noexcept
Returns number of the sample containing the clock current time.
constexpr ElecClock WithTick(int const tick, int const frame=0) const noexcept
Class def header for exception classes in DetectorClocks data provider.
constexpr int Frame() const noexcept
Returns the number of the frame containing the clock current time.
constexpr int Ticks() const noexcept
Current clock tick (that is, the number of tick Time() falls in).
tick ticks
Alias for common language habits.
double fFrequency
Clock speed in MHz.
constexpr ElecClock WithTime(double const time) const noexcept
constexpr double TickPeriod() const noexcept
A single tick period in microseconds.
constexpr bool operator<(const ElecClock &rhs) const noexcept
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
constexpr int Frame(double const time) const noexcept
Returns the number of the frame containing the specified time.
constexpr ElecClock(double const time, double const frame_period, double const frequency, std::nothrow_t) noexcept
constexpr ElecClock AdvanceTimeBy(double const time) const noexcept
double fTime
Time in microseconds.
constexpr double FramePeriod() const noexcept
A single frame period in microseconds.
constexpr int Ticks(double const time) const noexcept
Returns the number of tick the specified time falls in.
ElecClock(double const time, double const frame_period, double const frequency)
Constructor: sets all values.
constexpr unsigned int FrameTicks() const noexcept
Number ticks in a frame.
constexpr ElecClock AdvanceTicksBy(int const ticks) const noexcept
constexpr double Frequency() const
Frequency in MHz.
constexpr bool operator<=(const ElecClock &rhs) const noexcept
constexpr double Time(int const ticks) const noexcept
Returns the absolute start time of the specified tick.
constexpr int Sample(int const tick) const noexcept
Returns the number of the sample containing the specified tick.
Class representing the time measured by an electronics clock.
constexpr double Time() const noexcept
Current time (as stored) in microseconds.
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
double fFramePeriod
Frame period in microseconds.