-
Notifications
You must be signed in to change notification settings - Fork 18
Comparisons and Checks
In order to comare the content of two ROOT files, you could use the Artus tool
compareRootFiles.py [-a] <file1.root> <file2.root>
CMSSW provides the tool
edmDumpEventContent <file.root>
to list the content of EDM files (e.g. AOD or miniAOD).
Artus configurations are JSON dictionaries. The can be either JSON files like the one that the Artus Wrapper constructs, the TObjString config
in an Artus output file or just strings containing the content "{\"key" : \"value\"}"
. Every script in Artus, which takes a JSON configuration as input, accepts these three kinds of configurations.
Artus Configurations can be compared with the script
artusConfigDiff.py [-h]
To compare just two files, do
artusConfigDiff.py <output1.root> <output2.root>
Two pipelines in the same file are compared with
artusConfigDiff.py <output.root> <output.root> -1 <pipeline 1> -2 <pipeline 2>
The script outputs the differences in a way similar to diff
, but it might be convenient to use the printed meld
command to see the differences side-by-side.
Artus saves the current revisions of all important repositories into the configuration, which is also written to every ROOT output file. This way, it is clear, which code version has been used to result in a given output file (excluding local changes, which is also a motivation to commit changes before running Artus on a batch system).
Based on two Artus output files, you can retrieve the changes in the related code by doing
cd $CMSSW_BASE/src/<repository>
artusRepositoryDiff.py <output1.root> <output2.root>
The output is optimised for git and GitHub and will print both a git diff
command and also a link to a GitHub page showing the differences.
HarryPlotter saves the (full) JSON configuration, which is needed to reproduce a plot, together with the plot (file ending with .json
in the same directory). The plot can be reproduced with
higgsplot.py -j <json config> [other options]
(In case no Higgs-related features have been used, you can also use harry.py
instead of higgsplot.py
.)