ATLAS Offline Software
Loading...
Searching...
No Matches
python.EventSelectionConfigNObject_unitTest.TestNObjectMinimal Class Reference
Inheritance diagram for python.EventSelectionConfigNObject_unitTest.TestNObjectMinimal:
Collaboration diagram for python.EventSelectionConfigNObject_unitTest.TestNObjectMinimal:

Public Member Functions

 test_minimal_form (self)
 test_extra_selection_form (self)
 test_extra_selection_composes_with_base (self)
 test_all_signs (self)

Detailed Description

Definition at line 22 of file EventSelectionConfigNObject_unitTest.py.

Member Function Documentation

◆ test_all_signs()

python.EventSelectionConfigNObject_unitTest.TestNObjectMinimal.test_all_signs ( self)

Definition at line 49 of file EventSelectionConfigNObject_unitTest.py.

49 def test_all_signs(self):
50 for sym, enum in [("<", "LT"), (">", "GT"), ("==", "EQ"),
51 (">=", "GE"), ("<=", "LE")]:
52 with self.subTest(sign=sym):
53 algs = named(run(f"JET_N 30000 {sym} 2", containers={"jets": "AnaJets"}), "NJET")
54 self.assertEqual(prop(algs[0], "sign"), enum)
55
56
int run(int argc, char *argv[])

◆ test_extra_selection_composes_with_base()

python.EventSelectionConfigNObject_unitTest.TestNObjectMinimal.test_extra_selection_composes_with_base ( self)

Definition at line 40 of file EventSelectionConfigNObject_unitTest.py.

40 def test_extra_selection_composes_with_base(self):
41 for kw, (opt, val) in FAMILY.items():
42 with self.subTest(kw=kw):
43 algs = named(run(f"{kw} mysel 25000 >= 2",
44 containers={opt: f"{val}.baseline"}), TAG[kw])
45 sel = prop(algs[0], "objectSelection")
46 self.assertIn("baseline", sel)
47 self.assertIn("mysel", sel)
48

◆ test_extra_selection_form()

python.EventSelectionConfigNObject_unitTest.TestNObjectMinimal.test_extra_selection_form ( self)

Definition at line 34 of file EventSelectionConfigNObject_unitTest.py.

34 def test_extra_selection_form(self):
35 for kw, (opt, val) in FAMILY.items():
36 with self.subTest(kw=kw):
37 algs = named(run(f"{kw} mysel 25000 >= 2", containers={opt: val}), TAG[kw])
38 self.assertIn("mysel", prop(algs[0], "objectSelection"))
39

◆ test_minimal_form()

python.EventSelectionConfigNObject_unitTest.TestNObjectMinimal.test_minimal_form ( self)

Definition at line 23 of file EventSelectionConfigNObject_unitTest.py.

23 def test_minimal_form(self):
24 for kw, (opt, val) in FAMILY.items():
25 with self.subTest(kw=kw):
26 algs = named(run(f"{kw} 25000 >= 2", containers={opt: val}), TAG[kw])
27 self.assertEqual(len(algs), 1)
28 alg = algs[0]
29 self.assertEqual(alg.getType(), "CP::NObjectPtSelectorAlg")
30 self.assertEqual(prop(alg, "minPt"), 25000.0)
31 self.assertEqual(prop(alg, "sign"), "GE")
32 self.assertEqual(prop(alg, "count"), 2)
33

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