Belle II Software development
checkEventInfo.py
1#!/usr/bin/env python3
2
3
10import basf2 as b2
11from ROOT import Belle2
12
13
16
17
18# register modules
19eventinfosetter = b2.register_module("EventInfoSetter")
20eventinfoprinter = b2.register_module("EventInfoPrinter")
21
22# set parameters in modules
23param_eventinfosetter = {'expList': [1],
24 'runList': [1],
25 'evtNumList': [1]}
26
27
28class Check_info(b2.Module):
29 ''' check the SVDEventInfo object'''
30
31 def event(self):
32 '''print the SVDEventInfo to string in each event'''
33 eventInfo = Belle2.PyStoreObj('SVDEventInfo')
34 b2.B2INFO(eventInfo.toString())
35
36
37eventinfosetter.param(param_eventinfosetter)
38
39# create path and add modules
40main = b2.create_path()
41main.add_module(eventinfosetter)
42main.add_module(eventinfoprinter)
43
44setInfo = b2.register_module('SVDEventInfoSetter')
45# exemplary settings that overwrite default ones
46# setInfo.param('runType', 1) #transparent
47# setInfo.param('eventType', 1) #local mode
48# setInfo.param('daqMode', 1) #3 samples
49# setInfo.param('triggerBin', 3) #last bin
50# setInfo.param('triggerType', 1) #ecl trigger
51# setInfo.param('crossTalk', True) #cross-talk event
52
53main.add_module(setInfo)
54
55checkInfo = b2.register_module(Check_info())
56main.add_module(checkInfo)
57
58# process
59b2.process(main)
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67