Skip to content

auto-hunt: HDDM - 10 fixes (S1 1, S2 1, S3 2, S4 6) - #1245

Merged
rjones30 merged 12 commits into
masterfrom
auto-hunt/hddm
Dec 2, 2026
Merged

rjones30 merged 12 commits into
masterfrom
auto-hunt/hddm

Conversation

@DraTeots

@DraTeots DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

These fixes come from the Hall D bug hunt, an autonomous campaign that read the GlueX software, built a test for every suspect line, and kept only findings confirmed by a measurement: a test run of the program on data or simulation, or a direct call of the code against a known answer. Each commit below fixes one finding and is named by its finding id and grade (S1 most serious, S4 least). Every commit has a comment in this pull request with the finding's card: what is wrong, the code, the measured effect, who is affected and the fix. Full cards with plots are on the campaign pages (JLab login): https://pages.jlab.org/halld/auto-hunt/index.html, by library: https://pages.jlab.org/halld/auto-hunt/libraries.html

Overall gains

10 confirmed bugs fixed in this pull request (S1 1, S2 1, S3 2, S4 6), one commit each, in the order of the commits (most serious first).

finding grade what was wrong the fix
R6-11 S1 The REST writer saves each TOF point's position, time and energy and skips the time error. REST has a field for it and the reader reads it, so every TOF point read back has time error zero. Write the value. Files already written can be repaired on reading for almost all points, from the calibration table and the paddle status kept in REST.
R6-32 S2 The code that writes ECAL hits into a converted hit file is pasted twice, so every ECAL hit is saved two times. Delete the second copy.
R6-40 S3 A reduced (REST) file packs the two paddle numbers and two statuses of each TOF point into one integer, with room for paddle numbers 0 (no paddle in that plane) to 44. The original TOF had 44 paddles per plane; today's has 46, so paddle 45 or 46 spills into the next field: the point comes back on another paddle, with a wrong status, sometimes the impossible status 4. Use 47, with a format mark for old files; their stored positions should allow a repair.
R6-43 S3 Each time-based track carries a flag: 0 for a good time-based fit, 1 when the wire-based fit was kept instead, 2 when the mass hypothesis was copied from the fit of another one. REST files store the flag, but the REST reader never reads it back, so every track read from REST says "good fit". Release 5.9.0 has the same lines. Read the stored flag back; existing REST files hold it.
R6-12a S4 Every REST event carries a set of hit counts, one per detector, and the format has a place for the TOF paddle count. The writer stores every count except that one, so every event read back from REST has a TOF count of 0. The reader also leaves the ECAL block count unset, since REST has no place for it. Write the TOF count; set the ECAL count to 0 when reading.
R6-13 S4 When a reduced (REST) file is read, an option chooses whether the DIRC results are recomputed or taken from the file. Only the recompute mode fetches the DIRC hits, but the other mode looks up each stored track-to-hit match in that hit list. There the list is empty, and the first stored match reads past its end. Fetch the hits in both modes. It must ship together with the R5-1 fix, or before it.
R6-46 S4 The reader of simulated files sets up a few values on the first event it handles: the run number, the FDC cathode strip gains, the BCAL and pair-spectrometer geometry and the tagger dead-channel tables. It marks the setup done before it starts, and the other threads check that mark without a lock, so they can read the values while the first thread still fills them. At worst a thread sees a wrong run number and stops the job, or uses unset gains or geometry. The thread checker reports it in each 16-thread run checked; none of four such runs went wrong. Release 5.9.0 has the same lines. Hold the setup under a lock; a first form with a plain lock hung, and this one replaced it.
R6-47 S4 For each event the REST writer asks for a small summary of hit counts per detector, which it writes into the REST file. The code that makes the summary creates a new object every event and tells the framework that it will free its objects itself; it never does. One object stays in memory per event until the job ends. The values written are right. Release 5.9.0 has the same file. Delete the line that disowns the objects.
R6-50 S4 When a CCAL shower is read back from a REST file, the reader copies its energy, position and time but never fills its error matrix, which stays at zero. The raw-data reconstruction gives every CCAL shower constant errors (0.5 GeV, 0.1016 cm in x and y, 2.5 cm in z, 0.2 ns). So every CCAL photon of a REST analysis enters the photon timing test and the kinematic fit as if it were measured exactly. Fill the CCAL error matrix on reading, with the constants the reconstruction's code names.
R6-52 S4 A CCAL shower has two labels derived from its shower type: whether it sits in a single-peak or multi-peak cluster, and whether its peak holds one or two photons. The raw-data reconstruction sets them. The REST reader copies the shower type but never sets the two labels, so they hold whatever was in memory before. Set the two labels from the shower type on reading.

How it was tested

Each finding's card says how it was confirmed (a run of the program before and after the fix on the same events, or a direct call of the function). The commits were rebased on the current default branch; every changed source file compiles (syntax check against the release headers). A full build and a physics benchmark of this combination of commits has not been run on the new base.


Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

DraTeots and others added 10 commits November 30, 2026 22:07
…reads it)

`libraries/HDDM/DEventWriterREST.cc`: one line, `tof().setTerr(tofpoints[i]->tErr);`, next to the other TOF point
fields. The schema and the reader already carry the value. `patches/master.patch` applies at master and at release
5.9.0 (offset 5 lines).
Card: https://pages.jlab.org/halld/auto-hunt/cards/r6-11-rest-tof-point-time-error-dropped/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-11-rest-tof-point-time-error-dropped

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… is repeated)

Deletes the second, identical ECAL block of `DEventWriterHDDM.cc` (lines 644-685 at master). `patches/master.patch`
applies at master and at release 5.9.0.
Card: https://pages.jlab.org/halld/auto-hunt/cards/r6-32-hddm-writer-ecal-hits-twice/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-32-hddm-writer-ecal-hits-twice

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2025 TOF has 46 paddles per plane

`libraries/HDDM/DEventWriterREST.cc` and `libraries/HDDM/DEventSourceREST.cc`: base 47 in place of 45 in the packing
and unpacking of the TOF status word (bars 1 to 46 fit). The patch applies to master and to release 5.9.0 (offsets -5
and -8 lines).

**This fix changes how the REST TOF status is read back.** REST files of the 2025-01 pass were written by the old
code in base 45; read with the patched reader they decode differently (the bars and statuses of most of their TOF
points change, not only those on bars 45 and 46). Before merging, the maintainers choose between a format version
(a version mark or a new element in the REST file, so the reader takes base 45 for old files and base 47 for new ones)
and filing the issue only. The patch shows the minimal correct packing for new files.
Card: https://pages.jlab.org/halld/auto-hunt/cards/r6-40-rest-tof-status-base-45/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-40-rest-tof-status-base-45

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ags written by DEventWriterREST is lost on every REST read (wire-based-fit and other-hypothesis tracks show flags 0)

`libraries/HDDM/DEventSourceREST.cc`, where `DTrackTimeBased` is built from a REST charged track: the first
`trackFlags` element is read into `tra->flags`; a record without one
gives `FLAG__GOODFIT`, the value the reader sets today. Two added lines; nothing else changes. The element is read
through `begin()` because the element list is const there.

The patch applies to release 5.9.0 with an offset of 20 lines (the lines are the same there); it was not built at
5.9.0.
Card: https://pages.jlab.org/halld/auto-hunt/cards/r6-43-rest-reader-drops-track-flags/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-43-rest-reader-drops-track-flags

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s uninitialised on read

- `libraries/HDDM/DEventWriterREST.cc`: two lines add the `tofPaddles` entry to `hitStatistics`, like the seven other
  counts beside it; the field exists in `rest.xml` and the reader already reads it.
- `libraries/HDDM/DEventSourceREST.cc`: one line sets `ecal_blocks = 0` when `DEventHitStatistics` is read from REST,
  which has no field for it (adding the field to `rest.xml` is a separate schema change, left out).

`patches/master.patch` for master; `patches/r5.9.0.patch` for release 5.9.0 (the same lines, 5 and 29 lines earlier).
Card: https://pages.jlab.org/halld/auto-hunt/cards/r6-12a-rest-hit-statistics-tof-paddles-missing/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-12a-rest-hit-statistics-tof-paddles-missing

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; matched hits go into a discarded copy

- `libraries/HDDM/DEventSourceREST.cc`: `locEvent->Get(locDIRCHits)` moves out of the `RECO_DIRC_CALC_LUT` branch,
  because the stored match-hit indices refer to these hits in both modes.
- A stored index beyond the hit vector is skipped, so a file whose hit list does not match cannot read out of range.

`patches/master.patch` applies at master and at release 5.9.0 (offset 20 lines).
Card: https://pages.jlab.org/halld/auto-hunt/cards/r6-13-rest-dirc-nolut-hits-empty-crash/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-13-rest-dirc-nolut-hits-empty-crash

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… initialized is set before the members are loaded and read without a lock, so other threads use uscale/vscale, dBCALGeom, psGeom and the tag

`libraries/HDDM/DEventSourceHDDM.cc`, `GetObjects`: a static `std::recursive_mutex` is locked before the
`initialized` test and released after the block. Other threads wait until the members are filled; the block's own
`event->Get` calls re-enter `GetObjects` on the same thread, take the recursive lock again and skip the block (the flag
is set first, as today). Five added lines and an unlock. Every call takes the lock once; it is held only for the test
after the first event. The file is identical at release 5.9.0 in these lines; the patch applies there unchanged.
Card: https://pages.jlab.org/halld/auto-hunt/cards/r6-46-hddm-source-init-block-race/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-46-hddm-source-init-block-race

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t creates a new DEventHitStatistics every event, so JANA never deletes it: one object leaks per event in every job that writes REST

`libraries/HDDM/DEventHitStatistics_factory.cc`, `Init`: the `SetFactoryFlag(NOT_OBJECT_OWNER)` call is removed, so
JANA deletes the object the factory creates each event when the event is recycled. One line. The two comment lines
above it ("JANA does not delete the objects ... This factory will manage this memory") stay in the patch as it was
tested and now contradict the code; they should be removed on merge.

The patch applies to release 5.9.0 without offset (the file is the same there).
Card: https://pages.jlab.org/halld/auto-hunt/cards/r6-47-hit-statistics-leak-per-event/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-47-hit-statistics-leak-per-event

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… every CCAL shower read from REST carries zero energy, position and time errors into DNeutralShower and the kinematic fit

`Extract_DCCALShower` fills `ExyztCovariance` (5x5, order E, x, y, z, t as the `DCCALShower` accessors read it) with the
constant errors that `DCCALShower_factory` assigns to every shower (0.5 GeV, 0.1016 cm, 0.1016 cm, 2.5 cm, 0.2 ns).
REST stores no position or covariance error for a CCAL shower, so the reader cannot do better than the reconstruction's
constants; this is the smallest change that gives REST-read photons the same errors as freshly reconstructed ones.
Card: https://pages.jlab.org/halld/auto-hunt/cards/r6-50-rest-ccal-shower-zero-covariance/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-50-rest-ccal-shower-zero-covariance

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sterType and PeakType unset, so they print garbage (event 23: 4 in one run, 0 in another)

Three lines in `Extract_DCCALShower`: `ClusterType` and `PeakType` from `type`, exactly as `DCCALShower_factory` sets
them.
Card: https://pages.jlab.org/halld/auto-hunt/cards/r6-52-rest-ccal-cluster-type-unset/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-52-rest-ccal-cluster-type-unset

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

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

DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

R6-11 S1 (commit 071fbbb)

REST files lose the time error of every TOF point

What is wrong. The REST writer saves each TOF point's position, time and energy and skips the time error. REST
has a field for it and the reader reads it, so every TOF point read back has time error zero.

The code (on GitHub):

for (size_t i=0; i < tofpoints.size(); i++)
{
    hddm_r::TofPointList tof = res().addTofPoints(1);
    tof().setX(tofpoints[i]->pos(0));
    tof().setY(tofpoints[i]->pos(1));
    tof().setZ(tofpoints[i]->pos(2));
    tof().setT(tofpoints[i]->t);
    tof().setDE(tofpoints[i]->dE);
                                            // <-- the time error is never written
    ...

Fixed:

    tof().setTerr(tofpoints[i]->tErr);

What it does. In a REST file from 1000 events of 2025-01 data, all 6921 TOF points have time error 0; with
the fix they keep the 0.071 or 0.100 ns reconstruction gave them.

Plot: BH-89: REST drops the TOF point time error; with the fix every match agrees

BH-89. 2761 TOF track matches in the same REST files: the TOF point's time error over the one its match keeps. Top today, bottom fixed; expected 1. Limits: one run.

Who is affected.

  • User code reading the TOF point time error from REST, directly or through the function giving a track the time
    error of its timing detector.

Who is not. Everything in halld_recon: no code there uses the stored value (it takes fixed or parametrised TOF
time errors), and the track-to-TOF match in REST keeps the right value; seven standard reactions on 100 000
events keep their yields and fit quality.

The fix. Write the value. Files already written can be repaired on reading for almost all points,
from the calibration table and the paddle status kept in REST.

Grade S1: a value is zero in every REST event with TOF points. It says nothing about physics weight: none was
found inside halld_recon.


Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r6-11-rest-tof-point-time-error-dropped/index.html
Evidence folder (tests, patches, review): https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-11-rest-tof-point-time-error-dropped

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

@gluex

gluex commented Dec 1, 2026

Copy link
Copy Markdown

Build status for this pull request: FAILURE

Build log: make_auto-hunt_hddm.log
Build report: report_auto-hunt_hddm.txt

@DraTeots

DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

R6-32 S2 (commit 911ad57)

Every ECAL hit is written twice in converted hit files

What is wrong. The code that writes ECAL hits into a converted hit file is pasted twice, so every ECAL hit is
saved two times.

The code. The real lines, shortened (on GitHub):

//======================== ECAL ========================
for(uint i=0; i<ECALHits.size(); ++i)
  {
    ...
    ECAL_BlockIterator->addEcalHits();              // one hit added to its block
    ECAL_HitIterator->setT(ECALHits[i]->t);
    ECAL_HitIterator->setE(ECALHits[i]->E);
  }

//======================== ECAL ========================   <-- the same block, pasted a second time
for(uint i=0; i<ECALHits.size(); ++i)
  {
    ...
    ECAL_BlockIterator->addEcalHits();              // the same hit added again
    ECAL_HitIterator->setT(ECALHits[i]->t);
    ECAL_HitIterator->setE(ECALHits[i]->E);
  }

What it does (a skim's 88 events, read back; last row: the 2025-01 pass's random-trigger files):

in the file now with the fix
ECAL hits 2138 1069
ECAL energy a reader adds up 192 GeV 96 GeV
ECAL showers a reader builds 346 156
ECAL hits per event, 2.3M random-trigger events 16.6 8.3

Plot: BH-91: every ECAL hit is written twice, 2138 hits today against 1069 with the fix

BH-91. ECAL hits in the file written from 88 skim events of 2025-01 data, today and with the fix. Hatched: exact second copies. Limits: one small skim; per-event numbers in the table.

Who is affected.

  • Anyone reading ECAL hits from converted files or hit-file skims.
  • Simulation that mixes in this background: the random-trigger files of the 2025-01 pass carry every ECAL hit twice,
    in every event, in four files of four runs, so the ECAL background energy comes out twice too large.

Who is not. Standard reconstruction from raw data and the reduced (REST) files.

The fix. Delete the second copy.

Grade S2: the doubling is in the production background files, in every event.


Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r6-32-hddm-writer-ecal-hits-twice/index.html
Evidence folder (tests, patches, review): https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-32-hddm-writer-ecal-hits-twice

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

@DraTeots

DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

R6-40 S3 (commit ea14644)

TOF points on paddles 45 and 46 come back from REST files as other paddles

What is wrong. A reduced (REST) file packs the two paddle numbers and two statuses of each TOF point into one
integer, with room for paddle numbers 0 (no paddle in that plane) to 44. The original TOF had 44 paddles per
plane; today's has 46, so paddle 45 or 46 spills into the next field: the point comes back on another paddle,
with a wrong status, sometimes the impossible status 4.

The code. The writer (on GitHub); the reader divides by the same 45:

int locStatus = tofpoints[i]->dHorizontalBar + 45*tofpoints[i]->dVerticalBar;   // <-- 45 slots: paddles 0 to 44 only
locStatus += 45*45*tofpoints[i]->dHorizontalBarStatus + 45*45*4*tofpoints[i]->dVerticalBarStatus;

With the fix, writer and reader use 47:

int locStatus = tofpoints[i]->dHorizontalBar + 47*tofpoints[i]->dVerticalBar;
locStatus += 47*47*tofpoints[i]->dHorizontalBarStatus + 47*47*4*tofpoints[i]->dVerticalBarStatus;

What it does (1000 raw events of a 2025-01 run, written to REST and read back: 6921 TOF points in 918 events):

TOF points read back today with the fix
equal to the reconstruction that wrote them 6875 6921
on paddle 45 or 46 0 46
with the impossible status 4 10 0
x or y no longer marked as well defined 22 0

Plot: BH-537: read back from REST today, no TOF point sits on paddle 45 or 46

BH-537. Paddle 45 comes back as no paddle, 46 as paddle 1.

Who is affected.

  • Anyone reading TOF paddles or statuses from REST files of the 46-paddle TOF, the 2025-01 pass included.
  • Code that checks the measured mark or rematches tracks to REST TOF points.

Who is not. TOF positions, times and energies, the stored track-to-TOF matches, raw-data reconstruction. No
physics benchmark can see it: they start from raw data.

The fix. Use 47, with a format mark for old files; their stored positions should allow a repair.

Grade S3 (third of four): TOF points read from REST change in 44 of 918 events (4.8%). It says nothing about
physics weight.


Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r6-40-rest-tof-status-base-45/index.html
Evidence folder (tests, patches, review): https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-40-rest-tof-status-base-45

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

@DraTeots

DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

R6-43 S3 (commit 678fd44)

Tracks read from REST files lose their fit flag

What is wrong. Each time-based track carries a flag: 0 for a good time-based fit, 1 when the wire-based fit
was kept instead, 2 when the mass hypothesis was copied from the fit of another one. REST files store the flag, but
the REST reader never reads it back, so every track read from REST says "good fit". Release 5.9.0 has the same lines.

The code. The real lines, shortened (on GitHub):

// writing REST: the flag is stored with each track
hddm_r::TrackFlagsList myflags = tra().addTrackFlagses(1);
myflags().setFlags(tracks[i]->flags);

// reading REST: the track is rebuilt   <-- the stored flag is never read, so it stays 0
DTrackTimeBased *tra = new DTrackTimeBased();
...
tra->Ndof = fit.getNdof();
tra->chisq = fit.getChisq();
tra->FOM = TMath::Prob(tra->chisq, tra->Ndof);

Fixed, two lines added to the reader:

const hddm_r::TrackFlagsList& locTrackFlagsList = iter->getTrackFlagses();
tra->flags = (locTrackFlagsList.size() > 0) ? locTrackFlagsList.begin()->getFlags() : DTrackTimeBased::FLAG__GOODFIT;

What it does. One REST file of run 132404 (2025-01): 918 events, 10342 tracks.

tracks with read today read with the fix same run, from raw data (998 events, of which REST holds 918; 10510 tracks)
flag 1: wire-based fit kept 0 172 181
flag 2: copied from another mass hypothesis 0 465 491
any flag set 0 637 (6.2%) 672 (6.4%)

Benchmark reactions: none applies. The benchmark jobs read raw data and never run the REST reader.

Plot: BH-269: all 10342 tracks read from REST show flag 0 today; 172 and 465 flagged tracks come back with the fix

BH-269. Tracks read from the same REST file today and with the fix, by flag.

Who is affected.

  • Anyone who reads tracks from REST files and wants to drop or study tracks whose time-based fit failed.
  • Anyone who wants to tell a fitted mass hypothesis from one that carries another mass's fit, a weaker measurement.

Who is not. Reconstruction from raw data, every object the collaboration code builds from REST, and users of the
analysis trees, which do not carry the flag.

The fix. Read the stored flag back; existing REST files hold it.

Grade S3 (third of four levels, S1 the most severe): tracks read from REST change in a minority of events (241 of
918). It says nothing of physics weight.


Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r6-43-rest-reader-drops-track-flags/index.html
Evidence folder (tests, patches, review): https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-43-rest-reader-drops-track-flags

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

@DraTeots

DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

R6-12a S4 (commit 0d3a667)

Reduced (REST) files never store the per-event count of TOF paddle hits

What is wrong. Every REST event carries a set of hit counts, one per detector, and the format has a place for the
TOF paddle count. The writer stores every count except that one, so every event read back from
REST has a TOF count of 0. The reader also leaves the ECAL block count unset, since REST has no place for it.

The code. The writer, shortened (on GitHub):

hddm_r::FcalBlocksList blocks = stats().addFcalBlockses(1);
blocks().setCount(hitStats[0]->fcal_blocks);
hddm_r::CcalBlocksList bloccs = stats().addCcalBlockses(1);
bloccs().setCount(hitStats[0]->ccal_blocks);
                                                // <-- the TOF paddle count is never added
hddm_r::DircPMTsList pmts = stats().addDircPMTses(1);
pmts().setCount(hitStats[0]->dirc_PMTs);

Fixed, in the gap:

hddm_r::TofPaddlesList paddles = stats().addTofPaddleses(1);
paddles().setCount(hitStats[0]->tof_paddles);

and the reader sets the ECAL count to 0.

What it does (REST file of 1000 raw events of a 2025-01 run, 918 events with hit counts): today no event
carries the TOF count; with the fix all 918 do (13024 paddle hits), equal event by event to a fresh reconstruction.

Plot: BH-1052: today 0 of 918 REST events carry the TOF paddle count, with the fix 918 of 918

BH-1052. Limits: one run, 918 events.

Who is affected. Anyone who reads the per-event hit counts from REST files, the 2025-01 pass included: the TOF
count is always 0, the ECAL count undefined.

Who is not. Physics quantities: no reconstruction or analysis code uses these two counts. Raw data; no physics
benchmark can see it, since they start from raw data and write no REST.

The fix. Write the TOF count; set the ECAL count to 0 when reading.

Grade S4 (lowest of four): a count absent in every REST event that no code of the reconstruction or simulation
packages reads. It says nothing about analyses outside them.


Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r6-12a-rest-hit-statistics-tof-paddles-missing/index.html
Evidence folder (tests, patches, review): https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-12a-rest-hit-statistics-tof-paddles-missing

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

@DraTeots

DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

R6-13 S4 (commit b69595c)

Reading REST files with stored DIRC results crashes once those files hold DIRC hits

What is wrong. When a reduced (REST) file is read, an option chooses whether the DIRC results are recomputed or
taken from the file. Only the recompute mode fetches the DIRC hits, but the other mode looks up each stored
track-to-hit match in that hit list. There the list is empty, and the first stored match reads past its end.

The code. The real lines, shortened (on GitHub):

if(RECO_DIRC_CALC_LUT) {
    ...
    locEvent->Get(locDIRCHits);          // <-- the hits are fetched in this mode only
}
...
else {
    ...
    size_t locMatchHitIndex = dircMatchHitIter->getHit();
    locDIRCTrackMatchParams[locDIRCMatchParams].push_back(locDIRCHits[locMatchHitIndex]);   // <-- empty list
}

Fixed: the hits are fetched before the test, and an index past the end of the list is skipped.

What it does (REST file of a 2025-01 run, 918 events, holding DIRC match hits): today the reader crashes
before the first event, in the development code and in release 5.9.0; with the fix it reads all 918.

Plot: BH-1053: today's reader crashes on a file with DIRC match hits; with the fix it reads all 918 events

BH-1053. Limits: one file.

Who is affected. Analyses that read REST with the DIRC results taken from the file, once REST files hold DIRC
match hits. Today no writer stores them (finding R5-1); its fix makes them appear, and with it every such read crashes.

Who is not. The default setting (recompute); every REST file written today. No physics benchmark can see it.

The fix. Fetch the hits in both modes. It must ship together with the R5-1 fix, or before it.

Grade S4 (lowest of four): no file today reaches these lines. If the R5-1 fix ships alone, a job with this
option crashes: the most severe grade.


Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r6-13-rest-dirc-nolut-hits-empty-crash/index.html
Evidence folder (tests, patches, review): https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-13-rest-dirc-nolut-hits-empty-crash

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

@DraTeots

DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

R6-46 S4 (commit ef48e31)

With several threads, the reader of simulated files shares its first-event setup before it is complete

What is wrong. The reader of simulated files sets up a few values on the first event it handles: the run number,
the FDC cathode strip gains, the BCAL and pair-spectrometer geometry and the tagger dead-channel tables. It marks the
setup done before it starts, and the other threads check that mark without a lock, so they can read the values while
the first thread still fills them. At worst a thread sees a wrong run number and stops the job, or uses
unset gains or geometry. The thread checker reports it in each 16-thread run checked; none of four such runs went
wrong. Release 5.9.0 has the same lines.

The code, shortened (on GitHub):

if (initialized == false && event) {
   initialized = true;                  // <-- marked done first: other threads skip the block from here
   dRunNumber = event->GetRunNumber();  //     while this and the rest are still being filled
   ...                                  //     strip gains, BCAL and PS geometry, tagger tables
}
if(dRunNumber != event->GetRunNumber()) { ... exit(-1); }   // read by every thread, no lock

Fixed: the other threads wait on a lock until the setup is done:

static std::recursive_mutex locInitMutex;   // recursive: the block's own calls re-enter on the same thread
std::unique_lock<std::recursive_mutex> locInitLock(locInitMutex);
...                                     // the block as it is
locInitLock.unlock();

What it does. 1000 simulated events, 16 threads, two runs per side: 1 thread-checker report on these values per
run today, 0 with the fix.

Plot: BH-1092: 1 thread-checker report per run today on the first-event setup of the reader; 0 with the fix

BH-1092. Grey: counts outside this defect.

Who is affected. Jobs that reconstruct simulated files with several threads: a rare race, with no changed output
seen.

Who is not. Raw-data reconstruction and REST reading (other readers); one-thread jobs.

The fix. Hold the setup under a lock; a first form with a plain lock hung, and this one replaced it.

Grade S4 (lowest of four): no output change seen; the worst case, never seen, stops the job.


Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r6-46-hddm-source-init-block-race/index.html
Evidence folder (tests, patches, review): https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-46-hddm-source-init-block-race

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

@DraTeots

DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

R6-47 S4 (commit 0c334cb)

Every job that writes REST files keeps 144 bytes per event in memory until it ends: the hit-count summary is never freed

What is wrong. For each event the REST writer asks for a small summary of hit counts per detector, which it writes
into the REST file. The code that makes the summary creates a new object every event and tells the framework that it
will free its objects itself; it never does. One object stays in memory per event until the job ends. The values
written are right. Release 5.9.0 has the same file.

The code, shortened (on GitHub):

void DEventHitStatistics_factory::Init()
{
    // Setting this flag makes it so that JANA does not delete the objects in _data.
    // This factory will manage this memory.
    SetFactoryFlag(NOT_OBJECT_OWNER);       // <-- but nothing here ever deletes them
}
...
void DEventHitStatistics_factory::Process(...)
{
    Reset_Data();                           // <-- empties the list, deletes nothing
    DEventHitStatistics* stats = new DEventHitStatistics;   // <-- a new object every event
    ...
    Insert(const_cast<DEventHitStatistics*>(stats));
}

Fixed: the flag line goes, so the framework deletes the object after each event.

What it does (200 raw events of a 2025-01 run, with a memory checker):

memory never freed today with the fix
hit-count summaries 199 objects, 28656 bytes 0
per 100 000 events about 14 MB 0

A production-plugin job on 1000 raw events peaks at 4499 MB; the leak of a 100 000-event job is 0.3% of that.

Plot: BH-267 (version 2): 199 hit-count summaries (28656 bytes) never freed in 200 events today, 0 with the fix

BH-267 (version 2). Second row: all memory never freed in the job, for scale.

Who is affected. Every reconstruction job that writes REST, production included: a slow growth of memory,
144 bytes per event.

Who is not. The contents of REST files and every physics output: no value changes.

The fix. Delete the line that disowns the objects.

Grade S4 (lowest of four): memory only; no output changes.


Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r6-47-hit-statistics-leak-per-event/index.html
Evidence folder (tests, patches, review): https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-47-hit-statistics-leak-per-event

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

@DraTeots

DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

R6-50 S4 (commit 535e6b2)

CCAL photons read from REST files carry zero energy, position and time errors

What is wrong. When a CCAL shower is read back from a REST file, the reader copies its energy, position and time
but never fills its error matrix, which stays at zero. The raw-data reconstruction gives every CCAL shower constant
errors (0.5 GeV, 0.1016 cm in x and y, 2.5 cm in z, 0.2 ns). So every CCAL photon of a REST analysis enters the
photon timing test and the kinematic fit as if it were measured exactly.

The code (shortened; on GitHub):

DCCALShower *shower = new DCCALShower();       // error matrix created as 5x5 zeros
shower->E = iter->getE();
shower->x = iter->getX();
...
data.push_back(shower);                        // error matrix never filled

Proposed change: fill it with the reconstruction's constants, in the order the error accessors read it.

shower->ExyztCovariance(0,0) = 0.5*0.5;        // E (GeV)
shower->ExyztCovariance(1,1) = 0.1016*0.1016;  // x (cm); y the same
shower->ExyztCovariance(3,3) = 2.5*2.5;        // z (cm)
shower->ExyztCovariance(4,4) = 0.2*0.2;        // t (ns)

What it does (one REST file of a 2021 run with the CCAL: 6247 events, 62 CCAL showers in 53 events):

today with the fix
CCAL showers with zero errors 62 of 62 0 of 62
timing chi-square of the 62 CCAL photons, median 232 147 (each 1.58 times lower)

Plot: BH-409: CCAL photon errors read from REST, today and with the fix

BH-409. Real data. Limits: one file; the kinematic fit was not run.

Who is affected. Analyses of REST files from run periods with the CCAL that use CCAL photons in timing cuts or
kinematic fits.

Who is not. The 2025-01 data (no CCAL); the raw-data reconstruction, which fills the errors itself.

The fix. Fill the CCAL error matrix on reading, with the constants the reconstruction's code names.

Grade S4 (lowest of four): 53 of 6247 events change, every event with a CCAL shower. No benchmark reaction was
found in this sample, so no physics effect was measured.


Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r6-50-rest-ccal-shower-zero-covariance/index.html
Evidence folder (tests, patches, review): https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-50-rest-ccal-shower-zero-covariance

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

@DraTeots

DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

R6-52 S4 (commit 1bea97d)

CCAL showers read from REST files carry a random cluster type and peak type

What is wrong. A CCAL shower has two labels derived from its shower type: whether it sits in a single-peak or
multi-peak cluster, and whether its peak holds one or two photons. The raw-data reconstruction sets them. The REST
reader copies the shower type but never sets the two labels, so they hold whatever was in memory before.

The code. The real lines, shortened (on GitHub):

DCCALShower *shower = new DCCALShower();   // the two labels are left uninitialised
...
shower->type = iter->getType();            // the type is read, the labels derived from it are not set
shower->dime = iter->getDime();

The fix derives them as the raw-data reconstruction does:

int showTypeVal = (iter->getType())/10;
shower->ClusterType = static_cast<ClusterType_t>( showTypeVal/2 );
shower->PeakType = static_cast<PeakType_t>( showTypeVal%2 );

What it does (one REST file of a 2021 run with the CCAL: 6247 events, 62 CCAL showers in 53 events):

today with the fix
showers whose labels differ from the reconstruction's 61 and 60 of 62 0 of 62
the same job run twice differs in 7 of 53 events identical

Plot: BH-1126: the CCAL cluster and peak type read from REST are leftover memory today

BH-1126. Real data. Limits: one file.

Who is affected. Anyone who prints CCAL showers from REST or selects on these two labels in their own code. No
code of the collaboration reads them.

Who is not. Every result: no reconstruction or analysis step uses the labels.

The fix. Set the two labels from the shower type on reading.

Grade S4 (lowest of four): 53 of 6247 events change, and only in a printout. No benchmark reaction was found in
this sample.


Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r6-52-rest-ccal-cluster-type-unset/index.html
Evidence folder (tests, patches, review): https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/hddm/r6-52-rest-ccal-cluster-type-unset

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

@rjones30

rjones30 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

These are all real bugs that should be fixed, and the proposed fixes work. I request one change, to R6-40, for backward compatibility with existing REST files. Everything else can go in as it is; I have one optional suggestion for R6-46.

What I did. I built this branch on its own, and together with #1235 (R1-18) and the R5-1 commit of #1251, which R6-13 needs. I ran it with frozen CCDB/RCDB copies on three samples:

  • run 131274 (spring 2025, 1000 events): raw data -> REST and converted hddm, then the REST file read back;
  • run 61506 (spring 2019, 2000 events), for the CCAL findings;
  • 1000 MC events of run 41374 (2018-01), at 1 and at 3 threads.

I compared every result with the in-memory reconstruction of the same events, and with my own independent fixes for the same findings.

finding result with this PR
R6-11 TOF time errors written: no point has terr = 0 (before: all 6696)
R6-32 ECAL hits in the converted file: 23596 -> 11798, no duplicates
R6-43 track flags read back equal to the reconstruction (173 x 1, 346 x 2)
R6-12a TOF paddle count present in 934 of 934 events, read back equal to the reconstruction; ECAL block count read as 0
R6-13 (+ R5-1) DIRC hits on matches equal to the reconstruction in both DIRC_CALC_LUT modes (557 matches, 6546 hits), also when one DIRC PMT is marked bad in the channel-status table after the file was written
R6-46 REST output identical at 1 and 3 threads in all 1001 MC events
R6-47 REST read: 5 distinct DEventHitStatistics addresses in 934 events (before: 934)
R6-50, R6-52 (+ R1-18) CCAL errors (E, x, y, z, t) = (0.5, 0.1016, 0.1016, 2.5, 0.2) in raw reconstruction and from REST, 3294 showers; ClusterType and PeakType from REST equal to the reconstruction
R6-40 new files: all 6696 TOF points read back correctly; existing files: see below

R6-40: please change before merging. The reader now decodes tofStatus in base 47 for every file, but every REST file written so far uses base 45. Take a point on horizontal paddle 10 and vertical paddle 20, both statuses 0: today's writer stores 10 + 45*20 = 910, and the new reader decodes 910 as horizontal 17, vertical 19. I measured it. I read the REST file that today's code writes for the same 1000 events. This reader gets the paddle numbers or statuses wrong for all 6696 TOF points. The reverse also holds: today's readers would misread every point in files written by the new writer.

A version that needs no format change:

  • write exactly what is written today (base 45) when both paddles are <= 44, otherwise 65536 + the base-47 packing;
  • the largest base-45 value is 44 + 4544 + 20253 + 8100*3 = 32399, so a value >= 65536 can only mean base 47, and the reader decodes both.

Old files then read exactly as they do now. In new files, only the points on paddles 45 and 46 differ from today's. In the test run, those are 45 of the 6696 points; all 45 come back equal to the reconstruction, and the other 6651 are bit-identical to today's files.

R6-46 (optional). The fix is correct, but it takes a process-wide lock on every GetObjects call for the whole job. A member std::recursive_mutex plus a std::atomic<bool> done flag locks only until the first-event setup is complete.

Not in this PR:

  • R6-44: Extract_DDetectorMatches indexes tracks by their position in the file, but Extract_DTrackTimeBased drops NaN tracks and pruned duplicates, so every later match lands on the wrong track. The NaN test also checks Px twice instead of Pz, and pruned tracks are allocated and never freed.
    • I made a test file by inserting a NaN track or a worse-chisquare duplicate before the first track of 705 events.
    • Today's reader puts the matches on the wrong track for 1230 tracks (TOF), 1223 (BCAL), 898 (FCAL) and 2087 (SC), and loses 88 DIRC matches.
    • A reader that maps file indices to the kept tracks equals the reconstruction.
  • R6-45: when a track has no mcmatch record (files from before the writer added one), the reader sets the CDC ring and FDC plane counts it has just read to 0. It leaves dMCThrownMatchMyID and dNumHitsMatchedToThrown unset; they should be set to -1 and 0.
  • R6-14: dDIRCChannelStatusMap[run] is read once per hit without the lock, which races with another thread adding a new run to the map.

Note: the CI failure above happened before compiling. The test job replaced the / in auto-hunt/hddm with _ and couldn't find the branch. The branch itself builds, on its own and with #1235.

Edited: an earlier version of this comment objected to the R6-13 fix. A test with a channel-status table changed after writing showed that the objection was wrong: the reader uses the channel-status table only when DIRC_CALC_LUT is on, so the stored hit indices stay aligned.

DraTeots and others added 2 commits December 1, 2026 09:58
…or TOF bars 45 and 46

Review of #1245 (requested change): the reader decoded tofStatus in base 47 for every file, so every REST file
already written (base 45) read back with wrong paddles or statuses. Now the writer stores exactly today's base-45
value when both bars are <= 44, and 65536 + the base-47 packing otherwise. The largest base-45 value is
44 + 45*44 + 45*45*3 + 45*45*4*3 = 32399, so the reader takes base 47 only for values >= 65536. No format change:
old files read as before; in new files only points on bars 45 and 46 differ from today's.
Checked by a direct call of the packing: all 35344 combinations (bars 0-46, statuses 0-3) round-trip; all 32400
combinations with bars <= 44 give the same value as today's writer and decode correctly.

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #1245 (optional suggestion): the process-wide static lock was taken on every GetObjects call for the
whole job. It is now a member std::recursive_mutex, taken only while a std::atomic<bool> dInitDone is false; the
setup block sets dInitDone (release) when it finishes, and later calls skip the lock (acquire). The mutex stays
recursive because the block's event->Get calls re-enter GetObjects on the same thread.

Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

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

DraTeots commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for the review and the tests. Both changes are now on the branch as two new commits (the earlier commits are unchanged and nothing was force-pushed):

  • 0b95f28 R6-40 (requested change): implemented as you proposed. The writer stores today's base-45 value when both bars are <= 44, and 65536 + the base-47 packing otherwise. The reader uses base 47 only for values >= 65536. No format change. I checked the packing directly: all 35344 combinations (bars 0-46, statuses 0-3) round-trip, and all 32400 combinations with bars <= 44 give the same value as today's writer and decode correctly. I have not rerun the full REST round trip on data. Your run 131274 test is the one that would show it (expected: 6651 points bit-identical, 45 changed).
  • 5622099 R6-46 (optional): replaced the static lock with a member std::recursive_mutex and a std::atomic<bool> dInitDone. The lock is taken only while dInitDone is false, and the setup block sets it (release) when it finishes. The mutex stays recursive because the block's event->Get calls re-enter GetObjects on the same thread.

All three changed files pass a syntax-only compile against REST/HDDM headers generated from this branch's schemas. The one remaining error in DEventSourceREST.cc (JCalibrationGeneratorCCDB) comes from the older JANA in our test image and is not in these lines.

R6-44, R6-45, R6-14: these were open in our table. We had not built test files for R6-44 and R6-45, and saw no measured effect for R6-14, so they were left out. Your measurements confirm R6-44 and R6-45. If you have commits for them, we would gladly take them, here or in a separate pull request.

CI: thanks for the note on / in the branch name. If it helps, we can rename the branch for the test job.


Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)

@gluex

gluex commented Dec 1, 2026

Copy link
Copy Markdown

Build status for this pull request: FAILURE

Build log: make_auto-hunt_hddm.log
Build report: report_auto-hunt_hddm.txt

@gluex

gluex commented Dec 1, 2026

Copy link
Copy Markdown

Build status for this pull request: FAILURE

Build log: make_auto-hunt_hddm.log
Build report: report_auto-hunt_hddm.txt

@gluex

gluex commented Dec 1, 2026

Copy link
Copy Markdown

Test status for this pull request: SUCCESS

Summary: summary.txt
Logs: results/log

Build log: make_auto-hunt_hddm.log
Build report: report_auto-hunt_hddm.txt

@aaust

aaust commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@DraTeots I just made a small change to the CI scripts for allowing "/" in the PR name

@rjones30

rjones30 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

See the temporary branch auto_hunt_working_rtj for what an implementation of the auto_hunt bug fixes would produce, with my recommended amendments. So far I have only propagated the HDDM library fixes. -Richard Jones

@rjones30

rjones30 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Thanks, Dmitry. I reviewed and tested both new commits; both can go in as they are.

0b95f28 R6-40. Tested on the first 1000 events of run 131274, as you suggested:

  • Old files: this branch's reader gives the same TOF points as master's reader on a REST file written by master (6696 points in 934 events, none differ).
  • New files: written and read back by this branch, the TOF points equal those of the reconstruction that wrote them (none differ).
  • The tofStatus words differ from master's only for the 45 points on paddles 45 and 46, all of them written as 65536 + the base-47 packing. The other 6651 are identical, exactly as you predicted.

One small thing: the comment on tofStatus in rest.xml still describes only the base-45 packing. I added the 65536 + base-47 form to it (c1010a1, below). It is a comment only: the code generated from rest.xml is unchanged.

5622099 R6-46. The lock with the atomic flag is correct: the setup's writes are visible to every call that sees the flag set, the recursive mutex still covers the block's re-entrant event->Get calls, and a per-source lock fits the per-source members. On simulated events (1000 events, run 41374), 1 thread and 6 threads give identical REST output in every event, and the same output as your first version.

R6-44, R6-45, R6-14. The commits are on the branch auto_hunt_working_rtj of this repository. Please take them into this pull request, together with the comment fix:

  • 6bb42a3 R6-44: detector matches attached to the right track
  • 9172450 R6-45: defaults for a track without an mcmatch element
  • bd9f2c7 R6-14: DIRC channel status read under the lock
  • c1010a1 rest.xml: tofStatus comment

They apply cleanly, in this order, on the current head of this pull request (5622099). In auto_hunt_working_rtj they sit on top of R1-18 and R5-1, where I built and tested them: on the REST file of run 131274 and on a test file with NaN and duplicate tracks inserted, the detector matches equal those of the reconstruction, with REST:DIRC_CALC_LUT on and off. With these four commits added, this is good to go.

-Richard Jones

@rjones30

rjones30 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

A correction to my last comment: please do not add those four commits (6bb42a3, 9172450, bd9f2c7, c1010a1) to this pull request. They are my own changes, not yours, so they should be reviewed on their own. I will open them as a separate pull request after this one is merged, and ask you to review it.

That leaves this pull request as it stands (12 commits, head 5622099), and it is ready to merge. I will merge it shortly.

-Richard Jones

@rjones30 rjones30 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. All ten fixes are real bugs, and the fixes are correct as they stand on this branch (head 5622099), including the two revisions made after review:

  • R6-40: existing REST files read exactly as before, and TOF points on paddles 45 and 46 now survive the round trip.
  • R6-46: the first-event setup is locked only until it is complete. Simulated events give identical REST output with 1 and 6 threads.

I built this head and tested it on real data (run 131274), and R6-46 also on simulated events. CI passes.

Thanks, Dmitry.

-Richard Jones

@rjones30
rjones30 merged commit 89c2dcf into master Dec 2, 2026
4 checks passed
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.

4 participants