Belle II Software  release-08-01-10
CheckCalibDB Class Reference
Inheritance diagram for CheckCalibDB:
Collaboration diagram for CheckCalibDB:

Public Member Functions

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

Public Attributes

 db
 payload
 
 lastRun
 last run number
 
 bunchTimeSep
 bunch time separation
 

Detailed Description

 print content of TOPCalCommonT0 

Definition at line 33 of file checkDB-commonT0.py.

Member Function Documentation

◆ event()

def event (   self)
 event processing 

Definition at line 51 of file checkDB-commonT0.py.

51  def event(self):
52  ''' event processing '''
53 
54  evtMetaData = Belle2.PyStoreObj('EventMetaData')
55  runNo = 'r' + '{:0=5d}'.format(evtMetaData.getRun())
56 
57  if not self.db:
58  b2.B2ERROR(runNo + ': payload not found')
59  return
60  if not self.db.hasChanged():
61  self.lastRun = runNo
62  return
63  if self.lastRun:
64  print('... to ' + self.lastRun)
65  self.lastRun = None
66 
67  if self.db.isCalibrated():
68  status = 'calibrated'
69  elif self.db.isUnusable():
70  status = 'unusable'
71  elif self.db.isRoughlyCalibrated():
72  status = 'roughly calibrated'
73  else:
74  status = 'default'
75  n = round(self.db.getT0() / self.bunchTimeSep, 0)
76  if n == 0:
77  print(runNo + ': T0 =',
78  round(self.db.getT0(), 4), '+/-', round(self.db.getT0Error(), 4),
79  status)
80  else:
81  print(runNo + ': T0 =',
82  round(self.db.getT0(), 4), '+/-', round(self.db.getT0Error(), 4),
83  status, '-- out of range')
84 
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67

◆ initialize()

def initialize (   self)
 initialize 

Definition at line 36 of file checkDB-commonT0.py.

◆ terminate()

def terminate (   self)
 terminate 

Definition at line 85 of file checkDB-commonT0.py.


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