14 from ROOT
import Belle2
24 print(
"usage: basf2", argvs[0],
"expNo runFirst runLast globalTag/localDB")
28 runFirst = int(argvs[2])
29 runLast = int(argvs[3])
34 ''' print content of TOPCalCommonT0 '''
47 print(
'Common T0 calibration status of GT =', tag)
48 print(
'Experiment =', expNo,
'Runs =', runFirst,
'to', runLast)
52 ''' event processing '''
55 runNo =
'r' +
'{:0=5d}'.format(evtMetaData.getRun())
58 b2.B2ERROR(runNo +
': payload not found')
60 if not self.
dbdb.hasChanged():
64 print(
'... to ' + self.
lastRunlastRun)
67 if self.
dbdb.isCalibrated():
69 elif self.
dbdb.isUnusable():
71 elif self.
dbdb.isRoughlyCalibrated():
72 status =
'roughly calibrated'
77 print(runNo +
': T0 =',
78 round(self.
dbdb.getT0(), 4),
'+/-', round(self.
dbdb.getT0Error(), 4),
81 print(runNo +
': T0 =',
82 round(self.
dbdb.getT0(), 4),
'+/-', round(self.
dbdb.getT0Error(), 4),
83 status,
'-- out of range')
89 print(
'... to ' + self.
lastRunlastRun)
95 b2.conditions.append_testing_payloads(tag)
97 b2.conditions.append_globaltag(tag)
100 main = b2.create_path()
103 evtList = [1
for run
in range(runFirst, runLast + 1)]
104 runList = [run
for run
in range(runFirst, runLast + 1)]
105 expList = [expNo
for run
in range(runFirst, runLast + 1)]
108 eventinfosetter = b2.register_module(
'EventInfoSetter')
109 eventinfosetter.param({
'evtNumList': evtList,
'runList': runList,
'expList': expList})
110 main.add_module(eventinfosetter)
Class to access a DBObjPtr from Python.
a (simplified) python wrapper for StoreObjPtr.
bunchTimeSep
bunch time separation