We want to make sure that any changes we make to the code don't:
- stop fcl files from working, or
- change the content of the EventNtuple unexpectedly
From EventNtuple/
directory:
. ./validation/test_fcls.sh
This script will run all the supported fcl files over relevant datasets. All tests should report OK
Before making any changes, create an EventNtuple file and run the validation script. This creates a new ROOT file with histograms created from the EventNtuple ntuple:
mu2e -c EventNtuple/fcl/from_mcs_mockdata.fcl -S filelist.txt --TFileName nts.ntuple.before.root
root -l -b EventNtuple/validation/create_val_file.C\(\"nts.ntuple.before.root\",\"val.ntuple.before.root\"\)
To make sure that the contents of the EventNtuple haven't changed, we use valCompare to compare the histograms generated by the create_val_file.C
script:
valCompare -p ntuple-validation-booklet.pdf -r val.ntuple.before.root val.ntuple.after.root
Note that the before
file is created before any changes, and the after
file is created by test_fcls.sh
.
We expect perfect matches between all histograms. However, in some rare instances, we may expect differences. If you see any non-perfect matches, then discuss with the EventNtuple L4.