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