Skip to content

Fix issue : alert gains and tot tables not found#1149

Draft
ftouchte wants to merge 3 commits intoJeffersonLab:developmentfrom
ftouchte:fix/table-not-found
Draft

Fix issue : alert gains and tot tables not found#1149
ftouchte wants to merge 3 commits intoJeffersonLab:developmentfrom
ftouchte:fix/table-not-found

Conversation

@ftouchte
Copy link
Collaborator

@ftouchte ftouchte commented Mar 17, 2026

I noticed this error for a very long time, but it is only now that I notice that (may be) the calibration constants for the gain and the ToT were never taken into account.

INFO: [ConstantsManager] --->  loading table for run = 22712
INFO: [DB] ---> open 22712 | rge_spring2024 | Fri Feb 27 08:18:12 EST 2026 | mysql://clas12reader@clasdb-farm.jlab.org/clas12
INFO: ***** >>> add table = /calibration/alert/atof/attenuation
INFO: ***** >>> add table = /calibration/alert/ahdc/time_offsets
INFO: ***** >>> add table = /calibration/alert/ahdc/time_to_distance
INFO: ***** >>> add table = /calibration/alert/atof/time_offsets
INFO: ***** >>> add table = /calibration/alert/ahdc/raw_hit_cuts
INFO: ***** >>> add table = /calibration/alert/atof/time_walk
INFO: ***** >>> add table = /calibration/alert/atof/effective_velocity
SEVERE: [getConstants] error ( run = 22712 )  table not found with name : /calibration/alert/ahdc/gains</b>
SEVERE: [getConstants] error ( run = 22712 )  table not found with name : /calibration/alert/ahdc/time_over_threshold

Before this PR

image

After this PR

image

This way of handling the code masked the issue :

double adcCal = adcRaw;
if (!sim) {
double[] gainArr = CalibrationConstantsLoader.AHDC_ADC_GAINS.get(key_value);
if (gainArr != null && gainArr.length > 0) {
double gainCorr = gainArr[0];
adcCal = adcRaw * gainCorr;
}
}

Fortunately, the ADC calibration has no effect on the Kalman Filter.

In any case, the error disappears with the pull request.

@ftouchte ftouchte added the rg-l label Mar 17, 2026
@baltzell
Copy link
Collaborator

Are they still being read from the database in AHDC's engine? If so, can that be disabled?

@ftouchte
Copy link
Collaborator Author

We still need the CCDB in the AHDCEngine. That why the AHDCTest failed. But if we run the ATOFEngine just before the AHDCEngine, we don't need to load it again.

(I will just revoke my last commit.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants