Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10490

RHist::GetEntries is wrong after adding histograms

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: master
    • Fix Version/s: None
    • Component/s: Core Libraries
    • Labels:
      None
    • Environment:
      • ROOT master
      • Any plateform
    • Development:

      Description

      Filling two RH1D histograms and adding them using ROOT::Experimental::Add( h1, h2 ) results in the wrong number of entries. The reason is the way the histograms are merged:

      https://root.cern/doc/master/RHist_8hxx_source.html#l00308

      It is using ApplyXC which fills the bin content to the target histograms. This is wrong, as the bin currently being filled may have been filled via multiple Fill() calls. So the final number of entries after merging is n original entries + nbins from the "from" histogram.

        Attachments

          Activity

            People

            Assignee:
            hgraslan Hadrien Benjamin Grasland
            Reporter:
            bcbd981df57199462f8e Remi Ete
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: