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

Public Member Functions

 printChannel (self, payload)
 
 printChannelMask (self)
 
 printModule (self, payload)
 
 printCommon (self, payload)
 
 printTimeBase (self)
 
 event (self)
 

Detailed Description

print calibration status of TOPCal payloads

Definition at line 33 of file checkCalibDB.py.

Member Function Documentation

◆ event()

event ( self)
event processing

Definition at line 107 of file checkCalibDB.py.

107 def event(self):
108 ''' event processing '''
109
110 print()
111 print('Calibration status of GT =', tag)
112 print('Experiment =', expNo, 'Run =', runNo)
113 print()
114 self.printTimeBase()
115 self.printChannel('TOPCalChannelT0')
116 self.printModule('TOPCalModuleT0')
117 self.printCommon('TOPCalCommonT0')
118 self.printChannel('TOPCalChannelNoise')
119 self.printChannel('TOPCalChannelPulseHeight')
120 self.printChannel('TOPCalChannelRQE')
121 self.printChannel('TOPCalChannelThresholdEff')
122 self.printChannel('TOPCalChannelThreshold')
123 self.printChannel('TOPCalIntegratedCharge')
124 self.printModule('TOPCalModuleAlignment')
125 self.printChannelMask()
126 print()
127
128
129# Central database

◆ printChannel()

printChannel ( self,
payload )
print status of a payload given by the argument

Definition at line 36 of file checkCalibDB.py.

36 def printChannel(self, payload):
37 ''' print status of a payload given by the argument '''
38
39 db = Belle2.PyDBObj(payload)
40 if not db:
41 b2.B2ERROR(payload + ' not found')
42 return
43 calibrated = 0
44 all_entries = 0
45 for moduleID in range(1, 17):
46 for channel in range(512):
47 all_entries += 1
48 if db.isCalibrated(moduleID, channel):
49 calibrated += 1
50 print(payload + ': ' + str(calibrated) + '/' + str(all_entries) + ' calibrated')
51
Class to access a DBObjPtr from Python.
Definition PyDBObj.h:50

◆ printChannelMask()

printChannelMask ( self)
print status of channel masks

Definition at line 52 of file checkCalibDB.py.

52 def printChannelMask(self):
53 ''' print status of channel masks '''
54
55 payload = 'TOPCalChannelMask'
56 db = Belle2.PyDBObj(payload)
57 if not db:
58 b2.B2ERROR(payload + ' not found')
59 return
60 active = db.getNumOfActiveChannels()
61 all_entries = db.getNumOfChannels()
62 print(payload + ': ' + str(active) + '/' + str(all_entries) + ' active')
63

◆ printCommon()

printCommon ( self,
payload )
print status of a payload given by the argument

Definition at line 79 of file checkCalibDB.py.

79 def printCommon(self, payload):
80 ''' print status of a payload given by the argument '''
81
82 db = Belle2.PyDBObj(payload)
83 if not db:
84 b2.B2ERROR(payload + ' not found')
85 return
86 calibrated = 0
87 all_entries = 1
88 if db.isCalibrated():
89 calibrated += 1
90 print(payload + ': ' + str(calibrated) + '/' + str(all_entries) + ' calibrated')
91

◆ printModule()

printModule ( self,
payload )
print status of a payload given by the argument

Definition at line 64 of file checkCalibDB.py.

64 def printModule(self, payload):
65 ''' print status of a payload given by the argument '''
66
67 db = Belle2.PyDBObj(payload)
68 if not db:
69 b2.B2ERROR(payload + ' not found')
70 return
71 calibrated = 0
72 all_entries = 0
73 for moduleID in range(1, 17):
74 all_entries += 1
75 if db.isCalibrated(moduleID):
76 calibrated += 1
77 print(payload + ': ' + str(calibrated) + '/' + str(all_entries) + ' calibrated')
78

◆ printTimeBase()

printTimeBase ( self)
print status of time base calibration

Definition at line 92 of file checkCalibDB.py.

92 def printTimeBase(self):
93 ''' print status of time base calibration '''
94
95 payload = 'TOPCalTimebase'
96 db = Belle2.PyDBObj(payload)
97 if not db:
98 b2.B2ERROR(payload + ' not found')
99 return
100 calibrated = 0
101 all_entries = 8192
102 for sampleTimes in db.getSampleTimes():
103 if sampleTimes.isCalibrated():
104 calibrated += 1
105 print(payload + ': ' + str(calibrated) + '/' + str(all_entries) + ' calibrated')
106

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