|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Module-wide EPICS statistics PVs of an XPM; update() publishes rates computed from the change of the Module counters since the previous call. More...
#include <PVStats.hh>
Public Member Functions | |
| PVStats (Module &, Semaphore &) | |
| Store the module and semaphore and take the current time, Module::counts() and Module::linkStatus() as the first reference sample. | |
| ~PVStats () | |
| Does nothing; the PVs are not deleted. | |
| void | allocate (const std::string &title) |
| Delete earlier PVs and create, under title: the timing counter PVs for Us and Cu, the PLL PVs of each AMC, the XTPG TimeStamp, PulseId, FiducialIntv and FiducialErr PVs, eight status PVs per link for 32 links, and RecClk, FbClk and BpClk. | |
| void | update () |
| Sample the time, Module counters, link status, PLL status and the three monitor clocks, publish them with the overload below while holding the semaphore, and keep the samples for the next call. | |
| void | update (const CoreCounts &nc, const CoreCounts &oc, const LinkStatus *nl, const LinkStatus *ol, const PllStats *pll, unsigned recClk, unsigned fbClk, unsigned bpClk, double dt) |
| Publish the PVs in the order allocate() created them: timing counter rates (clock counts scaled by 16e-6), PLL status, the XTPG time stamp, pulse ID and fiducial interval and error bit, per-link status and count changes, and the clocks scaled by 1e-6. | |
Module-wide EPICS statistics PVs of an XPM; update() publishes rates computed from the change of the Module counters since the previous call.
Store the module and semaphore and take the current time, Module::counts() and Module::linkStatus() as the first reference sample.
| Pds::Xpm::PVStats::~PVStats | ( | ) |
Does nothing; the PVs are not deleted.
| void Pds::Xpm::PVStats::allocate | ( | const std::string & | title | ) |
Delete earlier PVs and create, under title: the timing counter PVs for Us and Cu, the PLL PVs of each AMC, the XTPG TimeStamp, PulseId, FiducialIntv and FiducialErr PVs, eight status PVs per link for 32 links, and RecClk, FbClk and BpClk.
| void Pds::Xpm::PVStats::update | ( | ) |
Sample the time, Module counters, link status, PLL status and the three monitor clocks, publish them with the overload below while holding the semaphore, and keep the samples for the next call.
CPSW exceptions from the publishing step are caught and printed.
| void Pds::Xpm::PVStats::update | ( | const CoreCounts & | nc, |
| const CoreCounts & | oc, | ||
| const LinkStatus * | nl, | ||
| const LinkStatus * | ol, | ||
| const PllStats * | pll, | ||
| unsigned | recClk, | ||
| unsigned | fbClk, | ||
| unsigned | bpClk, | ||
| double | dt | ||
| ) |
Publish the PVs in the order allocate() created them: timing counter rates (clock counts scaled by 16e-6), PLL status, the XTPG time stamp, pulse ID and fiducial interval and error bit, per-link status and count changes, and the clocks scaled by 1e-6.
Each value is written only if its PV is connected.