ATLAS Offline Software
Public Member Functions | List of all members
python.UnbinnedHist.UnbinnedHist Class Reference
Inheritance diagram for python.UnbinnedHist.UnbinnedHist:
Collaboration diagram for python.UnbinnedHist.UnbinnedHist:

Public Member Functions

def __new__ (cls, tree, expression, selection='', options='', hist=None, create_hist=False, **kwargs)
 
def get_raw_data (self)
 
def __add__ (self, y)
 
def __radd__ (self, y)
 
def refill (self, bins=100, range=None, inplace=False)
 

Detailed Description

Definition at line 7 of file UnbinnedHist.py.

Member Function Documentation

◆ __add__()

def python.UnbinnedHist.UnbinnedHist.__add__ (   self,
  y 
)

Definition at line 16 of file UnbinnedHist.py.

16  def __add__(self,y):
17  x = self.Clone("New")
18  x.fill_array(y.get_raw_data())
19  x._raw_data = np.append(self._raw_data, y._raw_data)
20  return x

◆ __new__()

def python.UnbinnedHist.UnbinnedHist.__new__ (   cls,
  tree,
  expression,
  selection = '',
  options = '',
  hist = None,
  create_hist = False,
**  kwargs 
)

Definition at line 8 of file UnbinnedHist.py.

8  def __new__(cls, tree, expression, selection='', options='', hist=None, create_hist=False, **kwargs):
9  obj = tree.Draw(expression, selection, options, hist, create_hist, **kwargs)
10  v1 = tree.get_v1()
11  v1.SetSize(obj.entries)
12  obj._raw_data = np.fromiter(v1, np.float)
13  return obj

◆ __radd__()

def python.UnbinnedHist.UnbinnedHist.__radd__ (   self,
  y 
)

Definition at line 21 of file UnbinnedHist.py.

21  def __radd__(self,y):
22  return y.__add__(self)

◆ get_raw_data()

def python.UnbinnedHist.UnbinnedHist.get_raw_data (   self)

Definition at line 14 of file UnbinnedHist.py.

14  def get_raw_data(self):
15  return self._raw_data

◆ refill()

def python.UnbinnedHist.UnbinnedHist.refill (   self,
  bins = 100,
  range = None,
  inplace = False 
)

Definition at line 23 of file UnbinnedHist.py.

23  def refill(self, bins=100, range=None, inplace=False):
24  if np.iterable(bins):
25  self_ = Hist(bins)
26  else:
27  if not range:
28  range = (self.lowerbound(), self.upperbound())
29  self_ = Hist(bins, *range)
30  raw_data = self._raw_data
31  self_.fill_array(raw_data)
32  self_._raw_data = raw_data
33  self_.__class__ = UnbinnedHist
34  return self_

The documentation for this class was generated from the following file: