14 from ROOT
import Belle2
24 print(
"usage: basf2", argvs[0],
"expNo runNo [globalTag]")
35 ''' print calibration status of TOPCal payloads '''
38 ''' print status of a payload given by the argument '''
42 b2.B2ERROR(payload +
' not found')
46 for moduleID
in range(1, 17):
47 for channel
in range(512):
49 if db.isCalibrated(moduleID, channel):
51 print(payload +
': ' + str(calibrated) +
'/' + str(all_entries) +
' calibrated')
54 ''' print status of channel masks '''
56 payload =
'TOPCalChannelMask'
59 b2.B2ERROR(payload +
' not found')
61 active = db.getNumOfActiveChannels()
62 all_entries = db.getNumOfChannels()
63 print(payload +
': ' + str(active) +
'/' + str(all_entries) +
' active')
66 ''' print status of a payload given by the argument '''
70 b2.B2ERROR(payload +
' not found')
74 for moduleID
in range(1, 17):
76 if db.isCalibrated(moduleID):
78 print(payload +
': ' + str(calibrated) +
'/' + str(all_entries) +
' calibrated')
81 ''' print status of a payload given by the argument '''
85 b2.B2ERROR(payload +
' not found')
91 print(payload +
': ' + str(calibrated) +
'/' + str(all_entries) +
' calibrated')
94 ''' print status of time base calibration '''
96 payload =
'TOPCalTimebase'
99 b2.B2ERROR(payload +
' not found')
103 for sampleTimes
in db.getSampleTimes():
104 if sampleTimes.isCalibrated():
106 print(payload +
': ' + str(calibrated) +
'/' + str(all_entries) +
' calibrated')
109 ''' event processing '''
112 print(
'Calibration status of GT =', tag)
113 print(
'Experiment =', expNo,
'Run =', runNo)
120 self.
printChannelprintChannel(
'TOPCalChannelPulseHeight')
122 self.
printChannelprintChannel(
'TOPCalChannelThresholdEff')
125 self.
printModuleprintModule(
'TOPCalModuleAlignment')
132 b2.conditions.append_globaltag(tag)
135 main = b2.create_path()
138 eventinfosetter = b2.register_module(
'EventInfoSetter')
139 eventinfosetter.param({
'evtNumList': [1],
'runList': [runNo],
'expList': [expNo]})
140 main.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)