100 ElecClock(
double const time,
double const frame_period,
double const frequency)
101 :
ElecClock{time, frame_period, frequency, std::nothrow}
132 constexpr
double Time() const noexcept {
return fTime; }
145 constexpr
double Time(
int const sample,
int const frame)
const noexcept
159 constexpr
double Time(
double const time)
const noexcept
194 constexpr
int Ticks(
double const time)
const noexcept
210 constexpr
int Ticks(
int const sample,
int const frame)
const noexcept
239 constexpr
int Sample(
double const time)
const noexcept
282 constexpr
int Frame(
double const time)
const noexcept
321 double const frame_period,
322 double const frequency,
323 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
Class def header for exception classes in DetectorClocks data provider.
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.