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 TOPCalModuleT0 '''
45 print(
'Module T0 calibration status of GT =', tag)
46 print(
'Experiment =', expNo,
'Runs =', runFirst,
'to', runLast)
50 ''' event processing '''
53 runNo =
'r' +
'{:0=5d}'.format(evtMetaData.getRun())
56 b2.B2ERROR(runNo +
': payload not found')
58 if not self.
dbdb.hasChanged():
62 print(
'... to ' + self.
lastRunlastRun)
66 for slot
in range(1, 17):
67 if self.
dbdb.isCalibrated(slot):
69 elif self.
dbdb.isUnusable(slot):
73 print(
' slot' +
'{:0=2d}'.format(slot) +
': T0 =',
74 round(self.
dbdb.getT0(slot), 4),
'+/-', round(self.
dbdb.getT0Error(slot), 4),
81 print(
'... to ' + self.
lastRunlastRun)
87 b2.conditions.append_testing_payloads(tag)
89 b2.conditions.append_globaltag(tag)
92 main = b2.create_path()
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 = b2.register_module(
'EventInfoSetter')
101 eventinfosetter.param({
'evtNumList': evtList,
'runList': runList,
'expList': expList})
102 main.add_module(eventinfosetter)
Class to access a DBObjPtr from Python.
a (simplified) python wrapper for StoreObjPtr.