A <python> variable block previously saw only the parameters of the single
collection the variable is linked to via 'col', injected as bare names plus
par[]/parErr[]. To compute variables for several collections one therefore
needed a separate block per collection.
Now every loaded collection is additionally injected as coll[]/collErr[]
dictionaries, addressable both by integer index (matching 'col <idx>' /
'select <idx>') and by collection name; index and name keys reference the same
per-parameter dict. A single block placed after all 'var = python' declarations
can thus compute - and combine - variables for any collection, e.g.
coll[0]['Sigma'] or coll['NAME.db']['Sigma'].
The bound-collection bare names / par[] / parErr[] are unchanged, so existing
scripts and GUI variables keep working. The collection list is threaded through
PmuppScript::var_cmd and the GUI add()/check() paths into PVarHandler.
Verified: a one-block script using both an index key and a name key reproduces
the numeric output of the equivalent two-block script bit-for-bit.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
getPythonBlock() always returned the first <python> ... </python>
entry of the script, so when several 'var X = python' declarations
each had their own block, every declaration after the first one
re-ran the first block and the read-back of the requested variable
failed. Thread the script index through var_cmd into getPythonBlock,
which now scans from that position onwards. Each declaration is
paired with the next block in script order.
Previously only y-errors were rendered. The IPC data file format now
includes x-errors per point (x, xPosErr, xNegErr, y, yPosErr, yNegErr,
...). Both the live canvas (PMuppCanvas) and the ROOT macro exports
(GUI and script path) propagate x-errors to TGraphAsymmErrors;
x-errors default to 0.0 when the parameter carries none.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Variables can now be computed by an embedded Python3 interpreter in addition
to the Boost.Spirit X3 expression engine. A <python> ... </python> block
receives all collection parameters as per-run lists (bare names, plus
par[]/parErr[] dictionaries as a fallback for names that are not valid Python
identifiers such as 'lambda') and must assign <name> and <name>Err; errors are
user supplied. Works both in the GUI variable dialog and in scripts.
The feature is optional and only enabled when ROOT is built with TPython
(CMake target ROOT::ROOTTPython); otherwise it compiles out. See MUPP_PY.README
for ROOT configure requirements and usage.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add ${HDF5_LIBRARIES} to PMusr link dependencies so HDF5 C++ symbols
(H5::DataType, H5::PredType, etc.) used in PRunDataHandler.cpp resolve.
- Add ${FFTW3_INCLUDE} to musrRootValidation and write_musrRoot_runHeader
include paths; both pull in PMusr.h which transitively includes fftw3.h.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Generate git-revision.h into CMAKE_BINARY_DIR/src/ (which is in the
include path) instead of the source tree. Remove the header from
add_executable() source lists, and add missing add_dependencies on
git_revision for all Qt5/Qt6 targets.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace execute_process with add_custom_target so the git revision
check runs on every build, not just on cmake configure.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>