Skip to content

Install CalorimeterGeom/data in the CMake build (fixes spack ceSimReco) - #1914

Open
oksuzian wants to merge 2 commits into
Mu2e:mainfrom
oksuzian:fix-calorimetergeom-data-install
Open

Install CalorimeterGeom/data in the CMake build (fixes spack ceSimReco)#1914
oksuzian wants to merge 2 commits into
Mu2e:mainfrom
oksuzian:fix-calorimetergeom-data-install

Conversation

@oksuzian

@oksuzian oksuzian commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Fixes the spack/CMake runtime failure reported this morning:

Can't find file "Offline/CalorimeterGeom/data/crystalPos.txt"

crystalPos.txt (added in #1908) is opened at runtime via ConfigFileLookupPolicy from geom key calorimeter.diskCrystalFile, so any calo-geometry job (e.g. ceSimReco) needs it on MU2E_SEARCH_PATH. CalorimeterGeom/CMakeLists.txt has no install rule for data/ — the configure_file line only stages the file into the build tree — so a spack/CMake install ships without it. The scons build reads the source tree, which is why CI stayed green.

One line, matching every other package that ships runtime data (Mu2eG4, TrackerConditions, CaloConditions, CalPatRec, CRVConditions, CRVResponse, CaloFilters, …):

install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Offline/CalorimeterGeom)

No behavior change for scons or build-tree runs.

🤖 Generated with Claude Code

crystalPos.txt (added in Mu2e#1908) is opened at runtime via
ConfigFileLookupPolicy from geom key calorimeter.diskCrystalFile, but
CalorimeterGeom had no install rule for data/ -- a spack/CMake install
ships without the file and any calo-geometry job dies:

    Can't find file "Offline/CalorimeterGeom/data/crystalPos.txt"

The existing configure_file line only stages the file into the build
tree. Add the install(DIRECTORY data ...) rule every other package
shipping runtime data uses (Mu2eG4, TrackerConditions, CaloConditions,
CalPatRec, CRVConditions, ...). The scons build reads the source tree
and is unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@FNALbuild

Copy link
Copy Markdown
Collaborator

Hi @oksuzian,
You have proposed changes to files in these packages:

  • CalorimeterGeom

which require these tests: build.

@Mu2e/write, @Mu2e/fnalbuild-users have access to CI actions on main.

⌛ The following tests have been triggered for 932a053: build (Build queue - API unavailable)

About FNALbuild. Code review on Mu2e/Offline.

@FNALbuild

Copy link
Copy Markdown
Collaborator

☀️ The build tests passed at 932a053.

Test Result Details
test with Command did not list any other PRs to include
merge Merged 932a053 at ed58b12
build (prof) Log file. Build time: 04 min 19 sec
ceSimReco Log file.
g4test_03MT Log file.
transportOnly Log file.
POT Log file.
g4study Log file.
cosmicSimReco Log file.
cosmicOffSpill Log file.
ceSteps Log file.
ceDigi Log file.
muDauSteps Log file.
ceMix Log file.
rootOverlaps Log file.
g4surfaceCheck Log file.
trigger Log file.
check_cmake Log file.
FIXME, TODO TODO (0) FIXME (0) in 0 files
clang-tidy 0 errors 0 warnings
whitespace check no whitespace errors found

N.B. These results were obtained from a build of this Pull Request at 932a053 after being merged into the base branch at ed58b12.

For more information, please check the job page here.
Build artifacts are deleted after 5 days. If this is not desired, select Keep this build forever on the job page.

@rlcee rlcee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You want to remove the configure_file a few line above

Per review: the install(DIRECTORY data ...) rule makes the
configure_file staging redundant; build-tree runs resolve the file
from the source tree via MU2E_SEARCH_PATH, matching how Mu2eG4 and
the other data-shipping packages work (install rule only).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@oksuzian

oksuzian commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator Author

Removed the configure_file line in ceb9a3a — the install rule alone matches how Mu2eG4 and the other data-shipping packages handle it.

@oksuzian

oksuzian commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator Author

@FNALbuild run build test

@FNALbuild

Copy link
Copy Markdown
Collaborator

⌛ The following tests have been triggered for ceb9a3a: build (Build queue - API unavailable)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants