Skip to content

Iss 1183 v2#1199

Closed
baltzell wants to merge 4 commits intodevelopmentfrom
iss_1183_v2
Closed

Iss 1183 v2#1199
baltzell wants to merge 4 commits intodevelopmentfrom
iss_1183_v2

Conversation

@baltzell
Copy link
Copy Markdown
Collaborator

@baltzell baltzell commented Apr 9, 2026

No description provided.

CalibrationConstantsLoader had three critical issues:

1. CSTLOADED gate prevented reload across runs: once constants loaded for the first run, the flag blocked all subsequent loads. If the data stream (hipo files) switched to a different run number, all engines kept using the first run's calibration. The first event in a files is often run number 0.

2. ATOFEngine never updated its Run field after calling Load(), so the run-change check (Run != newRun) was always true. This would have caused a reload on every event, but bug #1 masked it.

3. All calibration data lived in static HashMap fields shared across engine instances. Not thread-safe.

The fix removes CalibrationConstantsLoader entirely. Each engine now:
- Holds its own calibration maps as instance fields
- Rebuilds them from ConstantsManager (which already caches per run with proper synchronization) only when the run number changes
- Passes the maps explicitly to consumer code (HitReader, ATOFHit, BarHit) instead of relying on static access
- Only requires its own detector's CCDB tables in init()
@baltzell baltzell closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants