12 from ROOT
import Belle2
14 b2.set_random_seed(
"something important")
17 b2.logging.set_info(b2.LogLevel.FATAL, b2.logging.get_info(b2.LogLevel.ERROR))
19 main = b2.create_path()
20 input = b2.register_module(
'B2BIIMdstInput')
21 input.param(
'inputFileNames', [
22 b2.find_file(
'b2bii/tests/chaintest_1.mdst'),
23 b2.find_file(
'b2bii/tests/chaintest_2.mdst')
25 main.add_module(input)
26 processed_event_numbers = []
31 Test module which writes out the processed event numbers
32 into the global processed_event_numbers list
39 global processed_event_numbers
41 processed_event_numbers.append(emd.obj().getEvent())
48 expected_event_numbers = [3, 1, 2, 4, 6, 5, 8, 9, 3, 4, 2, 1, 7, 6]
49 assert expected_event_numbers == processed_event_numbers
56 main = b2.create_path()
57 input = b2.register_module(
'B2BIIMdstInput')
58 input.param(
'inputFileNames', [
59 b2.find_file(
'b2bii/tests/chaintest_1.mdst'),
60 b2.find_file(
'b2bii/tests/chaintest_2.mdst')
62 input.param(
'entrySequences', [
'1:2,4:6',
'0,2:3,5:100'])
63 main.add_module(input)
66 expected_event_numbers = [1, 2, 6, 5, 8, 3, 2, 1, 6]
67 processed_event_numbers = []
70 assert expected_event_numbers == processed_event_numbers
77 main = b2.create_path()
78 input = b2.register_module(
'B2BIIMdstInput')
79 input.param(
'inputFileNames', [
80 b2.find_file(
'b2bii/tests/chaintest_1.mdst'),
81 b2.find_file(
'b2bii/tests/chaintest_2.mdst')
83 input.param(
'entrySequences', [
':',
'2:3,5:100'])
84 main.add_module(input)
87 expected_event_numbers = [3, 1, 2, 4, 6, 5, 8, 9, 2, 1, 6]
88 processed_event_numbers = []
90 assert expected_event_numbers == processed_event_numbers
97 main = b2.create_path()
98 input = b2.register_module(
'B2BIIMdstInput')
99 input.param(
'inputFileNames', [
100 b2.find_file(
'b2bii/tests/chaintest_1.mdst'),
101 b2.find_file(
'b2bii/tests/chaintest_2.mdst')
103 input.param(
'entrySequences', [
'',
'2:3,5:100'])
104 main.add_module(input)
107 expected_event_numbers = [2, 1, 6]
108 processed_event_numbers = []
110 assert expected_event_numbers == processed_event_numbers
a (simplified) python wrapper for StoreObjPtr.