24b2.set_log_level(b2.LogLevel.ERROR)
27main = b2.create_path()
30eventinfosetter = b2.register_module(
'EventInfoSetter')
31eventinfosetter.param(
'evtNumList', [10000])
32main.add_module(eventinfosetter)
35gearbox = b2.register_module(
'Gearbox')
36main.add_module(gearbox)
39geometry = b2.register_module(
'Geometry')
40geometry.param(
'useDB',
False)
41geometry.param(
'components', [
'TOP'])
42main.add_module(geometry)
47 calpulse = b2.register_module(
'TOPCalPulseGenerator')
48 calpulse.param(
'asicChannels', [0])
49 calpulse.param(
'moduleIDs', [moduleID])
50 calpulse.param(
'amplitude', 750.0)
51 main.add_module(calpulse)
54 topdigi = b2.register_module(
'TOPDigitizer')
55 topdigi.param(
'useSampleTimeCalibration',
True)
56 main.add_module(topdigi)
59 calpulse = b2.register_module(
'TOPDoublePulseGenerator')
60 calpulse.param(
'asicChannels', [0])
61 calpulse.param(
'moduleIDs', [moduleID])
62 calpulse.param(
'useDatabase',
True)
63 calpulse.param(
'outputFileName',
'usedSampleTimes.root')
64 main.add_module(calpulse)
68calib = b2.register_module(
'TOPTimeBaseCalibrator')
69calib.param(
'moduleID', moduleID)
70calib.param(
'minTimeDiff', 40)
71calib.param(
'maxTimeDiff', 80)
72calib.param(
'directoryName',
'tbc')
73calib.param(
'method', 1)
74calib.param(
'useFallingEdge',
False)
75calib.logging.log_level = b2.LogLevel.INFO
79progress = b2.register_module(
'Progress')
80main.add_module(progress)
87print(b2.statistics(b2.statistics.TERM))