|
McStas Readout Master 0.8.0
|
The source's pulses: pulse k is at k periods after the UNIX epoch. More...
#include <efu_time.h>
Public Member Functions | |
| pulse_grid (const uint64_t period_ns) | |
| uint64_t | period_ns () const |
| efu_time | period () const |
| uint64_t | at_or_before (const uint64_t ns) const |
| The latest pulse at or before ns. | |
| uint64_t | after (const uint64_t ns) const |
| The first pulse strictly after ns. | |
Static Public Member Functions | |
| static pulse_grid | from_rate (const double rate) |
| static pulse_grid | from_period (const efu_time &period) |
| For a period given as a time: to the nearest nanosecond. efu_time(double) truncates to a whole tick, so efu_time(1.0 / 14) is 2 ns short of an ESS pulse; prefer from_rate. | |
The source's pulses: pulse k is at k periods after the UNIX epoch.
Anchored on the epoch rather than on whenever a Readout or Sender happens to be created, so every one of them – every MPI rank of a simulation, every replay – and anything else keeping the same grid, like mccode-plumber's mp-tdc, agree on when a pulse was. The period is a whole number of nanoseconds, round(1e9 / rate), which is also what the EFU takes an ESS pulse to be.
Definition at line 177 of file efu_time.h.
|
inlineexplicit |
Definition at line 180 of file efu_time.h.
|
inline |
The first pulse strictly after ns.
Definition at line 199 of file efu_time.h.
|
inline |
The latest pulse at or before ns.
Definition at line 197 of file efu_time.h.
Referenced by Readout::update_time().
|
inlinestatic |
For a period given as a time: to the nearest nanosecond. efu_time(double) truncates to a whole tick, so efu_time(1.0 / 14) is 2 ns short of an ESS pulse; prefer from_rate.
Definition at line 190 of file efu_time.h.
|
inlinestatic |
Definition at line 183 of file efu_time.h.
|
inline |
Definition at line 195 of file efu_time.h.
|
inline |
Definition at line 194 of file efu_time.h.