Skip to content

TPC digitizer follow-ups to #16090 - #16121

Open
sawenzel wants to merge 4 commits into
AliceO2Group:devfrom
sawenzel:tpc-digi-cooldown
Open

sawenzel wants to merge 4 commits into
AliceO2Group:devfrom
sawenzel:tpc-digi-cooldown

Conversation

@sawenzel

Copy link
Copy Markdown
Collaborator
  • Avoid undefined behaviour in getOrMakeBranch by using SetObject for an existing object branch instead of the address of a by-value parameter; adds a unit test.
  • Remove the lane files a rerun with fewer lanes does not overwrite, since the merger reads every lane file.
  • Accept --tpc-sector-seeding in the multithreaded device.
  • Share the chunk writer and the seed selection between the lane and the multithreaded devices.
  • Replace the CDB lock by a calibration snapshot read once per timeframe.

The digits do not change: lanes are identical to the 2026-11-12 daily, MT to seeded lanes.

Assisted by Claude Code.

sawenzel and others added 4 commits November 13, 2026 08:56
This fixes a dangling address in getOrMakeBranch for an existing branch and adds a unit test.

- For an existing branch, the helper set the address of its own by-value parameter, which is gone when the caller fills the branch.
- An object is now set with SetObject, which keeps the address in the branch; a pointer to the object is set with SetAddress as before.
- The TPC digit writers rely on this when a sector is flushed more than once; the other callers set the address again themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This fixes stale chunked digit files when the number of TPC lanes changes and lets the multithreaded device accept --tpc-sector-seeding.

- The chunked digit merger reads every lane file in the directory, but each lane removed only its own file. After a run with more lanes or threads, the extra lane files stayed and their sectors were published twice.
- The first lane now also removes the files of lanes the run does not have; the multithreaded device removes all of them, as before.
- The file name and the cleanup are shared by both devices.
- --tpc-sector-seeding is now a common option; the multithreaded device always seeds per sector, so it accepts the option without effect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This moves code that the lane and the multithreaded TPC digitizer devices duplicated into TPCSectorDigitization.

- LaneDigitFileWriter writes the flushes of a sector to the chunked digit file of a lane, for both devices.
- sectorSeedingBaseSeed() selects the base seed of the per-sector seeding, on which equal digits of both devices rely.
- TPCDigitizerConditions::update() returns the drift velocity change instead of calling back; finaliseCCDB() returns nothing.
- The multithreaded device takes its sectors from the spec instead of the input headers.
- Dead helpers and unused includes are removed from the lane device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…B lock

This replaces the process-wide lock around the CDBInterface reads of the TPC digitizer by a calibration snapshot that one thread reads per timeframe.

- DigitizerCalibrations holds the gain, pedestal, noise, threshold, per-pad ion tail and common mode maps, a copy of the dead channel map and the CMC flag.
- TPCDigitizerConditions::update() reads it once per timeframe, after the other conditions; both devices pass it to their digitizers, which only read it.
- Digitizer::init() no longer reads the CDBInterface or takes a lock; a digitizer used on its own reads a snapshot itself.
- The dead channel map is copied once per timeframe instead of once per sector.
- The one-time settings report moved into the snapshot read, so no worker thread reads the CDBInterface.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant