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

Public Member Functions

 test_one_tree_per_region (self)
 test_rntuple_one_ntuple_per_region (self)
 test_single_region_is_unchanged (self)

Detailed Description

Definition at line 39 of file EventSelectionConfigSplitOutput_unitTest.py.

Member Function Documentation

◆ test_one_tree_per_region()

python.EventSelectionConfigSplitOutput_unitTest.TestSplitOutput.test_one_tree_per_region ( self)

Definition at line 40 of file EventSelectionConfigSplitOutput_unitTest.py.

40 def test_one_tree_per_region(self):
41 algs, streams = run_split(["SR", "CR", "SUB_hidden"])
42 for region in ["SR", "CR"]:
43 stream = f"ANALYSIS_{region}"
44 for alg in named(algs, f"TreeMaker_{region}") + named(algs, f"NTupleMaker_{region}"):
45 self.assertEqual(prop(alg, "RootStreamName"), stream)
46 filler = named(algs, f"TreeFiller_{region}")
47 self.assertEqual(len(filler), 1)
48 self.assertEqual(prop(filler[0], "RootStreamName"), stream)
49 self.assertEqual(prop(filler[0], "EventSelection"), f"pass_{region}_%SYS%,as_char")
50 self.assertIn(stream, streams) # requested, so the runner declares it
51 # no combined tree and no tree for SUB-regions
52 self.assertEqual(len([a for a in algs if a.getType() == "CP::TreeMakerAlg"]), 2)
53 self.assertNotIn("ANALYSIS", streams) # so the runners write no tree.root
54

◆ test_rntuple_one_ntuple_per_region()

python.EventSelectionConfigSplitOutput_unitTest.TestSplitOutput.test_rntuple_one_ntuple_per_region ( self)

Definition at line 55 of file EventSelectionConfigSplitOutput_unitTest.py.

55 def test_rntuple_one_ntuple_per_region(self):
56 algs, streams = run_split(["SR", "CR"], outputFormat="RNTuple")
57 self.assertEqual(len([a for a in algs if a.getType() == "CP::RNtupleTreeMakerAlg"]), 2)
58 for region in ["SR", "CR"]:
59 maker = named(algs, f"RNtupleMaker_{region}")
60 self.assertEqual(len(maker), 1)
61 self.assertEqual(prop(maker[0], "OutputStreamName"), f"ANALYSIS_{region}")
62 self.assertEqual(prop(maker[0], "EventSelection"), f"pass_{region}_%SYS%,as_char")
63 self.assertIn(f"ANALYSIS_{region}", streams)
64

◆ test_single_region_is_unchanged()

python.EventSelectionConfigSplitOutput_unitTest.TestSplitOutput.test_single_region_is_unchanged ( self)

Definition at line 65 of file EventSelectionConfigSplitOutput_unitTest.py.

65 def test_single_region_is_unchanged(self):
66 algs, streams = run_split(["SR", "SUB_hidden"])
67 makers = [a for a in algs if a.getType() == "CP::TreeMakerAlg"]
68 self.assertEqual(len(makers), 1)
69 self.assertEqual(prop(makers[0], "RootStreamName"), "ANALYSIS")
70 fillers = [a for a in algs if a.getType() == "CP::TreeFillerAlg"]
71 self.assertEqual(len(fillers), 1)
72 self.assertEqual(prop(fillers[0], "EventSelection", ""), "")
73 self.assertIn("ANALYSIS", streams)
74 self.assertNotIn("ANALYSIS_SR", streams)
75
76

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