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:
python validation/test_fcls.py --tests validation/commands.txt --datasets validation/datasets_XXXXX.txt
where XXXXXX is any of MDC2020, MDC2025, or Run1B.
This script will run all the supported fcl files over relevant datasets. The output should be self-explanatory.
The reason for separating the commands from the datasets is so that we can easily change to a different set of datasets with new simulation campaigns, as well as update datasets in currently-supported simulation campaigns.
You can comment out commands in the commands.txt with a # to focus on failing tests
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_rooutil.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.
To make sure roodask is working, you can run the following calidation script:
. ./EventNtuple/validation/roodask_test.sh
From a clean login do:
cd /to/a/new/working/area
export MYSS=eventntuple
export MYENV=prof
mu2einit
smack local $MYSS/$MYENV simjob
cd $MYSS
source ./setup-env.sh
spack env activate $MYENV
spack add event-ntuple@main
spack develop event-ntuple@main
spack concretize -f 2>&1 | tee c_$(date +%F-%H-%M-%S).log
spack install 2>&1 | tee i_$(date +%F-%H-%M-%S).log
... fix any errors and re-run install command ...
... once fixed ...
cd $MYENV/event-ntuple/
git remote rename origin mu2e
git remote add -f origin git@github.com:YourGitHubUserName/EventNtuple.git
git checkout --no-track -b cmake-fix mu2e/main
# git add, commit, and push as usual
Note: these are based on the instructions here