Belle II Software  release-08-01-10
TestQuantityExtract Class Reference
Inheritance diagram for TestQuantityExtract:
Collaboration diagram for TestQuantityExtract:

Public Member Functions

def test_h1d (self)
 
def test_profile (self)
 
def test_ntuple (self)
 

Detailed Description

Various test cases for the Quantity Extractor class

Definition at line 17 of file test_quantity_extract.py.

Member Function Documentation

◆ test_h1d()

def test_h1d (   self)
Test getting the quantities of a TH1d

Definition at line 23 of file test_quantity_extract.py.

23  def test_h1d(self):
24  """
25  Test getting the quantities of a TH1d
26  """
27 
28  h1 = ROOT.TH1D("ext_test1", "ext_test1", 40, 0, 40.0)
29  h1.Fill(10.0)
30  h1.Fill(20.0)
31  h1.Fill(30.0)
32 
33  rext = RootQuantityExtract(default_extractor())
34  res = rext.extract(h1)
35 
36  self.assertIn("mean_x", res)
37  self.assertAlmostEqual(res["mean_x"], 20)
38  self.assertIn("mean_y", res)
39  self.assertAlmostEqual(res["mean_y"], 0.075)
40  self.assertIn("mean_y_zero_suppressed", res)
41  self.assertAlmostEqual(res["mean_y_zero_suppressed"], 1.0)
42  self.assertIn("entries", res)
43 

◆ test_ntuple()

def test_ntuple (   self)
Test getting the quanities contained in a TNtuple

Definition at line 62 of file test_quantity_extract.py.

◆ test_profile()

def test_profile (   self)
Test getting the quantities of a TProfile

Definition at line 44 of file test_quantity_extract.py.


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