12 from basf2
import Module
13 from ROOT
import Belle2
14 from basf2
import B2DEBUG, B2FATAL
20 module which sets time in EventMetaData from detector raw data
22 Author: bjoern.spruck@belle2.org
26 detectorlist =
"SVD CDC ECL TOP"
38 B2FATAL(
"no EventMetaData object")
44 """Calculate the time in ns since epoch from UnixTime and Accelerator Clock count"""
46 return it.GetTTUtime(0) * 1000000000 + int(round(it.GetTTCtime(0) / 0.127216))
50 if not self.
metameta.isValid():
51 B2FATAL(
"no valid EventMetaData object in this event")
54 t = self.
metameta.getTime()
62 self.
metameta.setTime(t)
65 B2DEBUG(1,
"No time for EventMetaData extracted as no raw data entries were available from selected detectors")
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.