Refactoring #1918

Revise IHistogram class family

Added by dmitry almost 2 years ago. Updated over 1 year ago.

Status:BacklogStart date:06 Dec 2017
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Currently IHistogram class contains methods like getXaxis(), getYaxis(), getYmin(), getYmax(), etc., which imply its being two-dimensional. They should adhere to Histogram2D, while IHistogram should be a common interface for Histogram1D and Histogram2D

History

#1 Updated by pospelov over 1 year ago

  • Subject changed from Remove dependency on dimensions from IHistogram class to Revise IHistogram class family
  • Status changed from New to Backlog

Possible improvements (to be discussed):

  • Remove dependency on dimensions from IHistogram class
  • Provide a way to sum-up two histograms with weights
  • Provide a way to project along one of the axis by summing whole content along the other axis.
  • Provide a way to add numpy array to histogram content with given weight.
  • Revise IHistogram return type in Python context

Python doesn't have dynamic_cast, so construction like real_data = ba.Histogram2D.dynamicCast(real_data) is required to access Histogram2D methods
See FitAlongSlices.py example

  • Revise all static methods in IHistogram class
  • Remove all 'get' and 'set' prefixes

Also available in: Atom PDF