13from ROOT
import Belle2
23 print(
"usage: basf2", argvs[0],
"expNo runNo [globalTag]")
34 ''' print calibration status of TOPCal payloads '''
37 ''' print status of a payload given by the argument '''
41 b2.B2ERROR(payload +
' not found')
45 for moduleID
in range(1, 17):
46 for channel
in range(512):
48 if db.isCalibrated(moduleID, channel):
50 print(payload +
': ' + str(calibrated) +
'/' + str(all_entries) +
' calibrated')
53 ''' print status of channel masks '''
55 payload =
'TOPCalChannelMask'
58 b2.B2ERROR(payload +
' not found')
60 active = db.getNumOfActiveChannels()
61 all_entries = db.getNumOfChannels()
62 print(payload +
': ' + str(active) +
'/' + str(all_entries) +
' active')
65 ''' print status of a payload given by the argument '''
69 b2.B2ERROR(payload +
' not found')
73 for moduleID
in range(1, 17):
75 if db.isCalibrated(moduleID):
77 print(payload +
': ' + str(calibrated) +
'/' + str(all_entries) +
' calibrated')
80 ''' print status of a payload given by the argument '''
84 b2.B2ERROR(payload +
' not found')
90 print(payload +
': ' + str(calibrated) +
'/' + str(all_entries) +
' calibrated')
93 ''' print status of time base calibration '''
95 payload =
'TOPCalTimebase'
98 b2.B2ERROR(payload +
' not found')
102 for sampleTimes
in db.getSampleTimes():
103 if sampleTimes.isCalibrated():
105 print(payload +
': ' + str(calibrated) +
'/' + str(all_entries) +
' calibrated')
108 ''' event processing '''
111 print(
'Calibration status of GT =', tag)
112 print(
'Experiment =', expNo,
'Run =', runNo)
131 b2.conditions.append_globaltag(tag)
134main = b2.create_path()
137eventinfosetter = b2.register_module(
'EventInfoSetter')
138eventinfosetter.param({
'evtNumList': [1],
'runList': [runNo],
'expList': [expNo]})
139main.add_module(eventinfosetter)
Class to access a DBObjPtr from Python.
def printModule(self, payload)
def printChannelMask(self)
def printCommon(self, payload)
def printChannel(self, payload)