test: track usage of hard-coded scaler clock frequencies#1128
test: track usage of hard-coded scaler clock frequencies#1128c-dilks wants to merge 1 commit intodevelopmentfrom
Conversation
The DSC2 and STRUCK scaler clock frequencies are stored in CCDB, but they are also hard-coded. This branch adds a magic number to each of the hard-coded assignments, and checks for that magic number when they're (likely) used. Printouts to `stderr` starting with `clockbug` are used to investigate.
|
What's the measured value of the hardware clock in question? This isn't affected by both DCS2 and Struck scalers. |
|
I'm more concerned about ambiguity in the code as to whether a CCDB value is used or a hard-coded value is used here. Even if the real clock frequency never changed, we should either use a CCDB value everywhere, or define the hard-coded frequency in one single place only; the current software both uses a CCDB value and uses hard-coded values defined in 3 places, and the value is mutable. Here are the frequencies:
If the hard-coded 1 MHz is used for DSC2 for runs after 14776 to estimate the charge, that's a problem. This PR's branch should be tested on all the usual call graphs, including:
|
|
Note the DSC2 and Struck are different hardware, and can have different clocks. |
The DSC2 and STRUCK scaler clock frequencies are stored in CCDB, but they are also hard-coded. This branch adds a magic number to each of the hard-coded assignments, and checks for that magic number when they're (likely) used. Printouts to
stderrstarting withclockbugare used to investigate.