From ec647a548472f1ec563b62e2e55fc9bf841eca4b Mon Sep 17 00:00:00 2001 From: salman Date: Thu, 3 Sep 2026 13:13:15 +0200 Subject: [PATCH] Fix installed musrfit_startup.xml data paths for standard LMU layout The web-deployed startup XML used a single data_path root and templates under d/tdc/... that resolve to paths not present on the standard LMU machines. Match the working desktop default: one per-instrument data_path under /psi.ch/group/lmu/public/data//his plus the full template set, and update the run-naming tests that pinned the broken layout. --- cgi/musrfit_startup.xml | 117 ++++++++++++++++++++++++++++----------- tests/run-naming.test.js | 33 ++++++++--- 2 files changed, 111 insertions(+), 39 deletions(-) diff --git a/cgi/musrfit_startup.xml b/cgi/musrfit_startup.xml index 690d8f0..94eb3ec 100644 --- a/cgi/musrfit_startup.xml +++ b/cgi/musrfit_startup.xml @@ -7,39 +7,92 @@ part of the muSRFlow deployment, not a user/system configuration file, and is deliberately NOT served from the web document root. - The entries are search roots. Each gives an - instrument-specific sub-path + file name; %yyyy% and %yy% are the 4- and - 2-digit year, and %rrr...% is the run number zero-padded to the number of - 'r' characters. Multiple templates for one instrument are tried in order. + Data on the standard LMU machines lives under + /psi.ch/group/lmu/public/data//his// + Each below names one instrument's data root; each + gives an instrument-specific sub-path + file name + relative to that root. %yyyy% and %yy% are the 4- and 2-digit year, and + %rrr...% is the run number zero-padded to the number of 'r' characters. + Multiple templates for an instrument are tried in order. Admin may point MUSRFIT_STARTUP_XML at a different file to override this default. The installed copy may be edited in place. --> - - /psi.ch/group/lmu/public/data - - d%yyyy%/tdc/lem%yy%_his_%rrrr%.root - - d%yyyy%/deltat_pta_gps_%rrrr%.bin - d%yyyy%/tdc/deltat_tdc_gps_%rrrr%.bin - d%yyyy%/tdc/root/deltatbc_tdc_gps_%yyyy%_%rrrr%.root - - d%yyyy%/deltat_pta_ltf_%rrrr%.bin - d%yyyy%/tdc/deltat_tdc_ltf_%rrrr%.bin - - d%yyyy%/deltat_pta_dolly_%rrrr%.bin - d%yyyy%/tdc/deltat_tdc_dolly_%rrrr%.bin - d%yyyy%/tdc/root/deltat_tdc_dolly_%yyyy%_%rrrr%.root - - d%yyyy%/tdc/root/deltat_tdc_vms_%yyyy%_%rrrr%.root - - d%yyyy%/deltat_pta_gpd_%rrrr%.bin - d%yyyy%/tdc/deltat_tdc_gpd_%rrrr%.bin - d%yyyy%/tdc/root/deltatbc_tdc_gpd_%yyyy%_%rrrr%.root - - d%yyyy%/tdc_hifi_%yyyy%_%rrrrr%.bin - d%yyyy%/tdc/root/deltat_tdc_hifi_%yyyy%_%rrrr%.root - - d%yyyy%/tdc/deltat_tdc_flame_%yyyy%_%rrrr%.root - d%yyyy%/flame%yy%_his_%rrrrr%.root - + + /psi.ch/group/lmu/public/data/lem/his + /psi.ch/group/lmu/public/data/alc/his + /psi.ch/group/lmu/public/data/dolly/his + /psi.ch/group/lmu/public/data/flame/his + /psi.ch/group/lmu/public/data/gpd/his + /psi.ch/group/lmu/public/data/gps/his + /psi.ch/group/lmu/public/data/hal/his + /psi.ch/group/lmu/public/data/ltf/his + /psi.ch/group/lmu/public/data/misc/his + /psi.ch/group/lmu/public/data/vms/his + /mnt/data/nemu/his + + d%yyyy%/deltat_misc_%rrrr%.bin + + d%yyyy%/deltat_zh_chem_%rrrr%.bin + d%yyyy%/deltat_tdc_alc_%rrrr%.bin + d%yyyy%/tdc/deltat_tdc_alc_%rrrr%.bin + + d%yyyy%/tdc/root/deltat_tdc_vms_%yyyy%_%rrrr%.root + + d%yyyy%/tdc/root/deltat_tdc_dolly_%yyyy%_%rrrr%.root + d%yyyy%/pie1/deltat_flc_%rrrr%.bin + d%yyyy%/pie3/deltat_flc_%rrrr%.bin + d%yyyy%/deltat_flc_%rrrr%.bin + d%yyyy%/deltat_pta_dolly_%rrrr%.bin + d%yyyy%/pta/deltat_pta_dolly_%rrrr%.bin + d%yyyy%/tdc/deltat_tdc_dolly_%rrrr%.bin + d%yyyy%/tdc/mdu/deltat_tdc_dolly_%rrrr%.mdu + + d%yyyy%/tdc/root/deltat_tdc_flame_%yyyy%_%rrrr%.root + d%yyyy%/tdc/deltat_tdc_flame_%rrrr%.bin + d%yyyy%/tdc/mdu/deltat_tdc_flame_%yyyy%_%rrrr%.mdu + + d%yyyy%/tdc/root/deltat_tdc_gpd_%yyyy%_%rrrr%.root + d%yyyy%/deltat_mue1_%rrrr%.bin + d%yyyy%/deltat_fq_si_%rrrr%.bin + d%yyyy%/deltat_strobo_%rrrr%.bin + d%yyyy%/deltat_hp_ni_ht_%rrrr%.bin + d%yyyy%/deltat_hp_ni_%rrrr%.bin + d%yyyy%/deltat_ccr2_%rrrr%.bin + d%yyyy%/deltat_gpd_%rrrr%.bin + d%yyyy%/deltat_janis_%rrrr%.bin + d%yyyy%/deltat_janis_gpd_%rrrr%.bin + d%yyyy%/deltat_pta_gpd_%rrrr%.bin + d%yyyy%/pta/deltat_pta_gpd_%rrrr%.bin + d%yyyy%/tdc/deltat_tdc_gpd_%rrrr%.bin + d%yyyy%/tdc/mdu/deltat_tdc_gpd_%rrrr%.mdu + + d%yyyy%/tdc/root/deltat_tdc_gps_%yyyy%_%rrrr%.root + d%yyyy%/deltat_ccr_%rrrr%.bin + d%yyyy%/deltat_he3_%rrrr%.bin + d%yyyy%/deltat_stutt_%rrrr%.bin + d%yyyy%/deltat_ltf_%rrrr%.bin + d%yyyy%/deltat_flc_%rrrr%.bin + d%yyyy%/deltat_flc2_%rrrr%.bin + d%yyyy%/deltat_oven_%rrrr%.bin + d%yyyy%/deltat_oven2_%rrrr%.bin + d%yyyy%/deltat_pta_gps_%rrrr%.bin + d%yyyy%/tdc/deltat_tdc_gps_%rrrr%.bin + d%yyyy%/tdc/mdu/deltat_tdc_gps_%yyyy%_%rrrr%.mdu + + d%yyyy%/tdc/root/deltat_tdc_hifi_%yyyy%_%rrrr%.root + d%yyyy%/tdc/deltat_hifi_%rrrr%.bin + d%yyyy%/tdc/tdc_hifi_%yyyy%_%rrrrr%.mdu + d%yyyy%/tdc/root/deltat_tdc_hifi_%yyyy%_%rrrr%.mdu + + d%yyyy%/deltat_ltf_%rrrr%.bin + d%yyyy%/deltat_ltf2_%rrrr%.bin + d%yyyy%/deltat_pta_ltf_%rrrr%.bin + d%yyyy%/pta/deltat_pta_ltf_%rrrr%.bin + d%yyyy%/tdc/deltat_tdc_ltf_%rrrr%.bin + + %yyyy%/lem%yy%_his_%rrrr%.root + d%yyyy%/tdc/lem%yy%_his_%rrrr%.root + %yyyy%/lem%yy%_his_%rrrrr%.root + d%yyyy%/tdc/lem%yy%_his_%rrrrr%.root + \ No newline at end of file diff --git a/tests/run-naming.test.js b/tests/run-naming.test.js index 807576a..e90e402 100644 --- a/tests/run-naming.test.js +++ b/tests/run-naming.test.js @@ -84,9 +84,28 @@ function testCommentsAreSkipped() { const shippable = lib.parseMusrfitStartupXML( fs.readFileSync(path.join(repoRoot, "cgi", "musrfit_startup.xml"), "utf8") ); - assert.deepStrictEqual(Array.from(shippable.dataPaths), ["/psi.ch/group/lmu/public/data"]); - assert.ok(shippable.templates.lem && shippable.templates.lem.length === 1); - assert.ok(shippable.templates.hifi && shippable.templates.hifi.length === 2); + // Data on the standard LMU machines lives under + // /psi.ch/group/lmu/public/data//his/, so the shipped default + // carries one search root per instrument (plus the legacy NEMU mount). + assert.deepStrictEqual(Array.from(shippable.dataPaths), [ + "/psi.ch/group/lmu/public/data/lem/his", + "/psi.ch/group/lmu/public/data/alc/his", + "/psi.ch/group/lmu/public/data/dolly/his", + "/psi.ch/group/lmu/public/data/flame/his", + "/psi.ch/group/lmu/public/data/gpd/his", + "/psi.ch/group/lmu/public/data/gps/his", + "/psi.ch/group/lmu/public/data/hal/his", + "/psi.ch/group/lmu/public/data/ltf/his", + "/psi.ch/group/lmu/public/data/misc/his", + "/psi.ch/group/lmu/public/data/vms/his", + "/mnt/data/nemu/his" + ]); + assert.ok(shippable.templates.lem && shippable.templates.lem.length === 4); + assert.ok(shippable.templates.hifi && shippable.templates.hifi.length === 4); + // The whole pointer set: every data_path root names exactly one instrument. + for (const inst of ["lem", "gps", "ltf", "dolly", "vms", "gpd", "hifi"]) { + assert.ok(shippable.templates[inst] && shippable.templates[inst].length >= 1, inst); + } } function testTemplateExpansion() { @@ -310,8 +329,8 @@ function testAllInstrumentsRunLines() { // [instrument, run, year, accepted sub-path, expected RUN line] ["LEM", 7, "2026", "d2026/tdc/lem26_his_0007.root", "RUN d2026/tdc/lem26_his_0007.root MUE4 PSI MUSR-ROOT"], - ["GPS", 7, "2024", "d2024/tdc/root/deltatbc_tdc_gps_2024_0007.root", - "RUN d2024/tdc/root/deltatbc_tdc_gps_2024_0007.root PIM3 PSI MUSR-ROOT"], + ["GPS", 7, "2024", "d2024/tdc/root/deltat_tdc_gps_2024_0007.root", + "RUN d2024/tdc/root/deltat_tdc_gps_2024_0007.root PIM3 PSI MUSR-ROOT"], ["LTF", 7, "2026", "d2026/tdc/deltat_tdc_ltf_0007.bin", "RUN d2026/tdc/deltat_tdc_ltf_0007.bin PIM3 PSI PSI-BIN"], ["Dolly", 7, "2026", "d2026/tdc/root/deltat_tdc_dolly_2026_0007.root", @@ -320,8 +339,8 @@ function testAllInstrumentsRunLines() { "RUN d2026/tdc/root/deltat_tdc_vms_2026_0007.root PIE1 PSI MUSR-ROOT"], ["GPD", 7, "2010", "d2010/tdc/deltat_tdc_gpd_0007.bin", "RUN d2010/tdc/deltat_tdc_gpd_0007.bin PIE1 PSI PSI-BIN"], - ["FLAME", 7, "2026", "d2026/flame26_his_00007.root", - "RUN d2026/flame26_his_00007.root PIM3 PSI MUSR-ROOT"], + ["FLAME", 7, "2026", "d2026/tdc/root/deltat_tdc_flame_2026_0007.root", + "RUN d2026/tdc/root/deltat_tdc_flame_2026_0007.root PIM3 PSI MUSR-ROOT"], ["HAL", 7, "2026", "d2026/tdc/root/deltat_tdc_hifi_2026_0007.root", "RUN d2026/tdc/root/deltat_tdc_hifi_2026_0007.root PIE3 PSI MUSR-ROOT"] ];