14from ROOT
import Belle2
17class CreateData(basf2.Module):
19 """create some data"""
22 """reimplementation"""
25 self.obj.registerInDataStore(
'obj')
27 self.array.registerInDataStore(
'array')
30 """reimplementation"""
33 self.obj.obj().setExperiment(19)
36 self.array.appendNew()
39class CheckData(basf2.Module):
41 """check output of CreateData"""
44 """reimplementation"""
50 """reimplementation"""
52 assert self.obj.obj().getExperiment() == 19
53 assert self.array.getEntries() == 13
56class CheckAbsence(basf2.Module):
58 """check output of CreateData"""
61 """reimplementation"""
67 """reimplementation"""
73main.add_module(
'EventInfoSetter')
74main.add_module(CheckAbsence())
77indep.add_module(CreateData())
78indep.add_module(CheckData()).set_name(
"checkdata 1")
79main.add_independent_path(indep)
80main.add_module(CheckAbsence())
83indep2.add_module(CheckAbsence())
84indep2.add_module(CreateData())
85indep2.add_module(CheckData()).set_name(
"checkdata 2")
86main.add_independent_path(indep2, merge_back_event=[
'obj',
'array'])
87main.add_module(CheckData()).set_name(
"checkdata 3")
92print(basf2.statistics)
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.