6 from ROOT
import Belle2
16 print(
"usage: basf2", argvs[0],
"expNo runFirst runLast globalTag/localDB")
20 runFirst = int(argvs[2])
21 runLast = int(argvs[3])
26 ''' print content of TOPCalCommonT0 '''
39 print(
'Common T0 calibration status of GT =', tag)
40 print(
'Experiment =', expNo,
'Runs =', runFirst,
'to', runLast)
44 ''' event processing '''
47 runNo =
'r' +
'{:0=5d}'.format(evtMetaData.getRun())
50 B2ERROR(runNo +
': payload not found')
52 if not self.
db.hasChanged():
59 if self.
db.isCalibrated():
61 elif self.
db.isUnusable():
63 elif self.
db.isRoughlyCalibrated():
64 status =
'roughly calibrated'
69 print(runNo +
': T0 =',
70 round(self.
db.getT0(), 4),
'+/-', round(self.
db.getT0Error(), 4),
73 print(runNo +
': T0 =',
74 round(self.
db.getT0(), 4),
'+/-', round(self.
db.getT0Error(), 4),
75 status,
'-- out of range')
87 use_local_database(tag)
89 use_central_database(tag)
95 evtList = [1
for run
in range(runFirst, runLast + 1)]
96 runList = [run
for run
in range(runFirst, runLast + 1)]
97 expList = [expNo
for run
in range(runFirst, runLast + 1)]
100 eventinfosetter = register_module(
'EventInfoSetter')
101 eventinfosetter.param({
'evtNumList': evtList,
'runList': runList,
'expList': expList})
102 main.add_module(eventinfosetter)