comparator Compare::Histograms does not check on equal amount of bins

Issue #154 resolved
Jochem Snuverink created an issue

Compare::Histograms(TH1 h1, TH1 h2) loops over the bins of h1, while accessing the bins of h2 with the same loop index. This could result in an out of bound access. The method should check before the loop that the number of bins are equal.

That this is not imaginary is shown in the fieldmaps branch, where the number of bins is currently not equal to the reference histos (possibly needs another issue): http://abp-cdash.web.cern.ch/abp-cdash/testDetails.php?test=131778&build=29502

Comparison of "PlossPEHisto" of type TH1 Failed
Parameter          file1 / file2          
Entries              100 / 100            
Bins                   9 / 10             
X Mean          0.125735 / 0.10275        
X RMS          0.0285915 / 0.0445667      
Integral            0.85 / 1              
Chi^2    44.1613 vs tolerance of 40

Comments (1)

  1. Log in to comment