7 from ROOT
import Belle2
17 print(
"usage: basf2", argvs[0],
"expNo runNo [globalTag]")
28 ''' print calibration status of TOPCal payloads '''
31 ''' print status of a payload given by the argument '''
35 B2ERROR(payload +
' not found')
39 for moduleID
in range(1, 17):
40 for channel
in range(512):
42 if db.isCalibrated(moduleID, channel):
44 print(payload +
': ' + str(calibrated) +
'/' + str(all) +
' calibrated')
47 ''' print status of channel masks '''
49 payload =
'TOPCalChannelMask'
52 B2ERROR(payload +
' not found')
54 active = db.getNumOfActiveChannels()
55 all = db.getNumOfChannels()
56 print(payload +
': ' + str(active) +
'/' + str(all) +
' active')
59 ''' print status of a payload given by the argument '''
63 B2ERROR(payload +
' not found')
67 for moduleID
in range(1, 17):
69 if db.isCalibrated(moduleID):
71 print(payload +
': ' + str(calibrated) +
'/' + str(all) +
' calibrated')
74 ''' print status of a payload given by the argument '''
78 B2ERROR(payload +
' not found')
84 print(payload +
': ' + str(calibrated) +
'/' + str(all) +
' calibrated')
87 ''' print status of time base calibration '''
89 payload =
'TOPCalTimebase'
92 B2ERROR(payload +
' not found')
96 for sampleTimes
in db.getSampleTimes():
97 if sampleTimes.isCalibrated():
99 print(payload +
': ' + str(calibrated) +
'/' + str(all) +
' calibrated')
102 ''' event processing '''
105 print(
'Calibration status of GT =', tag)
106 print(
'Experiment =', expNo,
'Run =', runNo)
125 use_central_database(tag)
131 eventinfosetter = register_module(
'EventInfoSetter')
132 eventinfosetter.param({
'evtNumList': [1],
'runList': [runNo],
'expList': [expNo]})
133 main.add_module(eventinfosetter)