Various test cases for the Quantity Extractor class
Definition at line 17 of file test_quantity_extract.py.
◆ test_h1d()
Test getting the quantities of a TH1d
Definition at line 23 of file test_quantity_extract.py.
25 Test getting the quantities of a TH1d
28 h1 = ROOT.TH1D(
"ext_test1",
"ext_test1", 40, 0, 40.0)
33 rext = RootQuantityExtract(default_extractor())
34 res = rext.extract(h1)
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)
◆ test_ntuple()
◆ test_profile()
The documentation for this class was generated from the following file: