Belle II Software development
CheckCalibDB Class Reference
Inheritance diagram for CheckCalibDB:

Public Member Functions

 initialize (self)
 
 event (self)
 
 terminate (self)
 

Public Attributes

 db = Belle2.PyDBObj('TOPCalModuleT0')
 payload
 
 lastRun = None
 last run number
 

Detailed Description

print content of TOPCalModuleT0

Definition at line 32 of file checkDB-moduleT0.py.

Member Function Documentation

◆ event()

event ( self)
event processing

Definition at line 48 of file checkDB-moduleT0.py.

48 def event(self):
49 ''' event processing '''
50
51 evtMetaData = Belle2.PyStoreObj('EventMetaData')
52 runNo = 'r' + f'{evtMetaData.getRun():05d}'
53
54 if not self.db:
55 b2.B2ERROR(runNo + ': payload not found')
56 return
57 if not self.db.hasChanged():
58 self.lastRun = runNo
59 return
60 if self.lastRun:
61 print('... to ' + self.lastRun)
62 self.lastRun = None
63
64 print(runNo + ':')
65 for slot in range(1, 17):
66 if self.db.isCalibrated(slot):
67 status = 'calibrated'
68 elif self.db.isUnusable(slot):
69 status = 'unusable'
70 else:
71 status = 'default'
72 print(' slot' + f'{slot:02d}' + ': T0 =',
73 round(self.db.getT0(slot), 4), '+/-', round(self.db.getT0Error(slot), 4),
74 status)
75
a (simplified) python wrapper for StoreObjPtr.
Definition PyStoreObj.h:67

◆ initialize()

initialize ( self)
initialize

Definition at line 35 of file checkDB-moduleT0.py.

35 def initialize(self):
36 ''' initialize '''
37
38
39 self.db = Belle2.PyDBObj('TOPCalModuleT0')
40
41 self.lastRun = None
42
43 print()
44 print('Module T0 calibration status of GT =', tag)
45 print('Experiment =', expNo, 'Runs =', runFirst, 'to', runLast)
46 print()
47
Class to access a DBObjPtr from Python.
Definition PyDBObj.h:50

◆ terminate()

terminate ( self)
terminate

Definition at line 76 of file checkDB-moduleT0.py.

76 def terminate(self):
77 ''' terminate '''
78
79 if self.lastRun:
80 print('... to ' + self.lastRun)
81 self.lastRun = None
82
83
84# Database

Member Data Documentation

◆ db

db = Belle2.PyDBObj('TOPCalModuleT0')

payload

Definition at line 39 of file checkDB-moduleT0.py.

◆ lastRun

lastRun = None

last run number

Definition at line 41 of file checkDB-moduleT0.py.


The documentation for this class was generated from the following file: