Skip to content

DQM bin-by-bin test failing since we moved to ROOT 6.3.6 #49452

@smuzaffar

Description

@smuzaffar

https://github.com/cms-sw/cmssw/blob/master/DQMServices/FileIO/scripts/compareHistograms.py which we run to compare DQM root files is failing we error like [a] (see #49419) It looks like root change root-project/root#18735 (backport for root 6.36 : root-project/root#18846 ) might be causing this error.

Do we need to update compareHistograms.py for ROOT 6.36 ?
We should also have a simople unit test in IBs to run ompareHistograms.py e.g. a simple command

compareHistograms.py -b a/DQM_V0001_R000000001__Global__CMSSW_X_Y_Z__RECO.root -p b/DQM_V0001_R000000001__Global__CMSSW_X_Y_Z__RECO.root -o result -n N -t M -r CMSSW_VERSION

should be enough to catch such errors in IBs

[a]

PR file successfully opened
Traceback (most recent call last):
  File "/cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/49419/49598/CMSSW_16_0_X_2025-11-21-1100/bin/el8_amd64_gcc13/compareHistograms.py", line 345, in <module>
    create_dif(args.base_file, args.pr_file, args.pr_number, args.test_number, cmssw_version, args.num_processes, args.output_dir)
  File "/cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/49419/49598/CMSSW_16_0_X_2025-11-21-1100/bin/el8_amd64_gcc13/compareHistograms.py", line 80, in create_dif
    compare(shared_paths, pr_flat_dict, base_flat_dict, paths_to_save_in_pr, paths_to_save_in_base)
  File "/cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/49419/49598/CMSSW_16_0_X_2025-11-21-1100/bin/el8_amd64_gcc13/compareHistograms.py", line 182, in compare
    pr_array = np.array(pr_item)
  File "/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02916/el8_amd64_gcc13/lcg/root/6.36.05-302290958d85790e78b48654c2f216ba/lib/ROOT/_pythonization/_uhi.py", line 367, in _getitem
    uhi_index = _compute_common_index(self, index)
  File "/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02916/el8_amd64_gcc13/lcg/root/6.36.05-302290958d85790e78b48654c2f216ba/lib/ROOT/_pythonization/_uhi.py", line 223, in _compute_common_index
    return [_compute_uhi_index(self, idx, axis, include_flow_bins) for axis, idx in enumerate(index)]
  File "/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02916/el8_amd64_gcc13/lcg/root/6.36.05-302290958d85790e78b48654c2f216ba/lib/ROOT/_pythonization/_uhi.py", line 223, in <listcomp>
    return [_compute_uhi_index(self, idx, axis, include_flow_bins) for axis, idx in enumerate(index)]
  File "/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02916/el8_amd64_gcc13/lcg/root/6.36.05-302290958d85790e78b48654c2f216ba/lib/ROOT/_pythonization/_uhi.py", line 192, in _compute_uhi_index
    return _process_index_for_axis(self, index, axis)
  File "/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02916/el8_amd64_gcc13/lcg/root/6.36.05-302290958d85790e78b48654c2f216ba/lib/ROOT/_pythonization/_uhi.py", line 180, in _process_index_for_axis
    raise IndexError(f"Histogram index {index - 1} out of range for axis {axis}. Valid range: (0,{nbins})")
IndexError: Histogram index 30 out of range for axis 0. Valid range: (0,30)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions