13from basf2
import create_path, process, set_random_seed, statistics, LogLevel, conditions
16from b2test_utils
import skip_test_if_light
25main.add_module(
"EventInfoSetter", evtNumList=[5])
28main.add_module(
'ParticleGun', pdgCodes=[211, -211, 321, -321],
29 momentumGeneration=
"fixed", momentumParams=[3],
30 thetaGeneration=
"uniform", thetaParams=[17, 25])
33main.add_module(
'Progress')
34main.add_module(
'Gearbox')
35main.add_module(
'Geometry', useDB=
False, components=[
'MagneticField',
'ARICH'], logLevel=LogLevel.ERROR)
36main.add_module(
'FullSim', logLevel=LogLevel.ERROR)
38main.add_module(
'SeqRootOutput', outputFileName=
'seqout_test.sroot', logLevel=LogLevel.WARNING)
41sub = multiprocessing.Process(target=process, args=(main,))
46conditions.disable_globaltag_replay()
47readpath = create_path()
48readpath.add_module(
'SeqRootInput', inputFileName=
'seqout_test.sroot')
49readpath.add_module(
'Progress')
53os.remove(
'seqout_test.sroot')
56assert statistics.modules[1].name ==
'Progress'
57assert statistics.modules[1].calls(statistics.EVENT) == 5