Skip to content

Commit 59c2c16

Browse files
committed
validation histograms workflow
1 parent e8d2c8c commit 59c2c16

File tree

7 files changed

+24
-12
lines changed

7 files changed

+24
-12
lines changed

.github/workflows/fitting_check.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run PyROOT Tests
1+
name: Validate CMS Open Data ttbar analysis
22

33
on:
44
push:
@@ -19,33 +19,41 @@ jobs:
1919
- name: Set up ROOT environment
2020
run: |
2121
sudo apt-get update
22-
sudo apt-get install -y dpkg-dev cmake g++ gcc binutils libx11-dev libncurses5-dev libssl-dev \
23-
libxpm-dev libxft-dev libxml2-dev libz-dev libxext-dev python3-dev
22+
sudo apt-get install -y dpkg-dev cmake g++ gcc binutils libx11-dev libncurses5-dev libssl-dev libxpm-dev \
23+
libxft-dev libxml2-dev libz-dev libxext-dev python3-dev git libtbb-dev libgif-dev xrootd-client python3
24+
pip install numpy plotting distributed tqdm uproot
2425
wget https://root.cern/download/root_v6.32.04.Linux-ubuntu22.04-x86_64-gcc11.4.tar.gz
2526
tar -xzvf root_v6.32.04.Linux-ubuntu22.04-x86_64-gcc11.4.tar.gz
2627
source root/bin/thisroot.sh
2728
echo "ROOT is set up"
2829
29-
- name: Run PyROOT script
30+
- name: Run Analysis
3031
run: |
3132
source root/bin/thisroot.sh
32-
sudo apt-get install binutils cmake dpkg-dev g++ gcc libssl-dev git libx11-dev \
33-
libxext-dev libxft-dev libxpm-dev python3 libtbb-dev libgif-dev xrootd-client
34-
pip install numpy plotting distributed tqdm
3533
cd analyses/cms-open-data-ttbar/
3634
python analysis.py --n-max-files-per-sample 1 --remote-data-prefix='root://eospublic.cern.ch//eos/root-eos/AGC' --validation 1
3735
38-
- name: Run comparsion
36+
- name: Run validation sequences
3937
run: |
4038
source root/bin/thisroot.sh
4139
cd analyses/cms-open-data-ttbar/
40+
python validate_histograms.py --histos histograms.root --reference reference/histos_1_file_per_process.json > output_histograms.txt
4241
python reference/fitResults/validate_fit_result.py > output.txt
4342
44-
- name: Compare output with expected
43+
- name: Compare fitResults output with expected
4544
run: |
46-
diff analyses/cms-open-data-ttbar/output.txt analyses/cms-open-data-ttbar/reference/fitResults/workflow/file1
45+
diff analyses/cms-open-data-ttbar/output.txt .github/workflows/validation/fitResuts_1_file_validation_reference.yml
46+
47+
- name: FitResults validation
48+
if: failure() # This step will be executed if the diff command finds differences
49+
run: |
50+
echo "Test failed: fitResults validation output does not match expected result."
51+
52+
- name: Compare histograms validation output with expected
53+
run: |
54+
diff analyses/cms-open-data-ttbar/output_histograms.txt .github/workflows/validation/histograms_1_file_validation_reference.yml
4755
48-
- name: Check for differences
56+
- name: Histograms validationw
4957
if: failure() # This step will be executed if the diff command finds differences
5058
run: |
51-
echo "Test failed: Output does not match expected result."
59+
echo "Test failed: Histograms validation output does not match expected result."
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Validating 'histograms.root' against reference 'reference/histos_1_file_per_process.json'...
2+
All good!
19.7 KB
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Validating 'histograms.root' against reference 'reference/histos_1_file_per_process.json'...
2+
All good!
Binary file not shown.
80.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)