Belle II Software
release-05-01-25
output_udst.py
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
"""Tests udst creation with background BGx1 MC"""
5
6
7
import
basf2
as
b2
8
import
b2test_utils
as
b2tu
9
import
modularAnalysis
as
ma
10
11
12
def
create_udst():
13
"""Create a udst with one event in it."""
14
pa = b2.create_path()
15
ma.inputMdst(
"default"
, b2.find_file(
"analysis/tests/mdst.root"
), path=pa)
16
ma.fillParticleList(
"pi+:all"
,
""
, path=pa)
17
ma.outputUdst(
"test.udst.root"
, particleLists=[
'pi+:all'
], path=pa)
18
b2tu.safe_process(pa, 1)
19
return
20
21
22
def
test_read_udst():
23
"""Check that the udst contains the particles storearray"""
24
pa = b2.create_path()
25
ma.inputMdst(
"default"
,
"test.udst.root"
, path=pa)
26
ma.printDataStore(path=pa)
27
b2tu.safe_process(pa)
28
return
29
30
31
if
__name__ ==
"__main__"
:
32
with
b2tu.clean_working_directory():
33
create_udst()
34
test_read_udst()
analysis
tests
output_udst.py
Generated on Fri Nov 5 2021 03:46:10 for Belle II Software by
1.8.17