Skip to content

Commit 02d2472

Browse files
benedikt-voelkelBenedikt Volkel
andauthored
RelVal wrapper (#465)
* adjust to new RelVal JSON format * unify test names and remove spaces Co-authored-by: Benedikt Volkel <benedikt.volkel@cern.ch>
1 parent fa90373 commit 02d2472

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

RelVal/ReleaseValidation.C

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ void SelectCriticalHistos()
850850
struct results CompareChiSquare(TH1* hA, TH1* hB, double val)
851851
{
852852
struct results res;
853-
res.testname = "Chi2 test";
853+
res.testname = "test_chi2";
854854
res.critical = true;
855855

856856
res.passed = true;
@@ -936,7 +936,7 @@ struct results CompareChiSquare(TH1* hA, TH1* hB, double val)
936936
struct results CompareBinContent(TH1* hA, TH1* hB, double val)
937937
{
938938
struct results res;
939-
res.testname = "Bin cont test";
939+
res.testname = "test_bin_cont";
940940

941941
res.critical = true;
942942

@@ -1009,7 +1009,7 @@ struct results CompareBinContent(TH1* hA, TH1* hB, double val)
10091009
struct results CompareNentr(TH1* hA, TH1* hB, double val)
10101010
{
10111011
struct results res;
1012-
res.testname = "Num entries test";
1012+
res.testname = "test_num_entries";
10131013

10141014
res.critical = false;
10151015

@@ -1073,7 +1073,7 @@ void WriteToJson(TH2F* hSumCheck, TH2F* hSumTests){
10731073
std::ofstream jsonout("Summary.json");
10741074
jsonout << "{\n";
10751075

1076-
jsonout << " \"Summary\":{\n";
1076+
jsonout << " \"test_summary\":{\n";
10771077
for(int i=1;i<=nhists;i++){
10781078
double res = hSumCheck->GetBinContent(1,i);
10791079
const char* label = hSumCheck->GetYaxis()->GetBinLabel(i);

RelVal/o2dpg_release_validation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ def rel_val(args):
5252
def inspect(args):
5353
res = None
5454
with open(args.file, "r") as f:
55-
res = json.load(f)
55+
# NOTE For now care about the summary. However, we have each test individually, so we could do a more detailed check in the future
56+
res = json.load(f)["test_summary"]
5657
for s in args.severity:
5758
names = res.get(s)
5859
if not names:

0 commit comments

Comments
 (0)