12from ROOT
import Belle2
14b2.set_random_seed(
"something important")
17b2.logging.set_info(b2.LogLevel.FATAL, b2.logging.get_info(b2.LogLevel.ERROR))
19main = b2.create_path()
20input = b2.register_module(
'B2BIIMdstInput')
21input.param(
'inputFileNames', [
22 b2.find_file(
'b2bii/tests/chaintest_1.mdst'),
23 b2.find_file(
'b2bii/tests/chaintest_2.mdst')
26processed_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())
48expected_event_numbers = [3, 1, 2, 4, 6, 5, 8, 9, 3, 4, 2, 1, 7, 6]
49assert expected_event_numbers == processed_event_numbers
56main = b2.create_path()
57input = b2.register_module(
'B2BIIMdstInput')
58input.param(
'inputFileNames', [
59 b2.find_file(
'b2bii/tests/chaintest_1.mdst'),
60 b2.find_file(
'b2bii/tests/chaintest_2.mdst')
62input.param(
'entrySequences', [
'1:2,4:6',
'0,2:3,5:100'])
66expected_event_numbers = [1, 2, 6, 5, 8, 3, 2, 1, 6]
67processed_event_numbers = []
70assert expected_event_numbers == processed_event_numbers
77main = b2.create_path()
78input = b2.register_module(
'B2BIIMdstInput')
79input.param(
'inputFileNames', [
80 b2.find_file(
'b2bii/tests/chaintest_1.mdst'),
81 b2.find_file(
'b2bii/tests/chaintest_2.mdst')
83input.param(
'entrySequences', [
':',
'2:3,5:100'])
87expected_event_numbers = [3, 1, 2, 4, 6, 5, 8, 9, 2, 1, 6]
88processed_event_numbers = []
90assert expected_event_numbers == processed_event_numbers
97main = b2.create_path()
98input = b2.register_module(
'B2BIIMdstInput')
99input.param(
'inputFileNames', [
100 b2.find_file(
'b2bii/tests/chaintest_1.mdst'),
101 b2.find_file(
'b2bii/tests/chaintest_2.mdst')
103input.param(
'entrySequences', [
'',
'2:3,5:100'])
104main.add_module(input)
107expected_event_numbers = [2, 1, 6]
108processed_event_numbers = []
110assert expected_event_numbers == processed_event_numbers
a (simplified) python wrapper for StoreObjPtr.