Belle II Software  release-08-01-10
ImportTimeConstants.py
1 #!/usr/bin/env python3
2 
3 
10 
11 # Import KLM time constants payloads.
12 
13 import basf2
14 from ROOT import Belle2
15 
16 basf2.set_log_level(basf2.LogLevel.INFO)
17 
18 timeConstants = Belle2.KLMTimeConstants()
19 timeConstants.setEffLightSpeed(0.5 * Belle2.Const.speedOfLight, Belle2.KLMTimeConstants.c_RPC)
20 timeConstants.setEffLightSpeed(0.5671 * Belle2.Const.speedOfLight, Belle2.KLMTimeConstants.c_BKLM)
21 timeConstants.setEffLightSpeed(0.5671 * Belle2.Const.speedOfLight, Belle2.KLMTimeConstants.c_EKLM)
22 
24 
25 iov = Belle2.IntervalOfValidity(0, 0, 0, -1)
26 db.storeData("KLMTimeConstants", timeConstants, iov)
27 
28 iov = Belle2.IntervalOfValidity(1002, 0, 1002, -1)
29 db.storeData("KLMTimeConstants", timeConstants, iov)
30 
31 iov = Belle2.IntervalOfValidity(1003, 0, 1003, -1)
32 db.storeData("KLMTimeConstants", timeConstants, iov)
A class that describes the interval of experiments/runs for which an object in the database is valid.
Class to store KLM constants related to time.
static Database & Instance()
Instance of a singleton Database.
Definition: Database.cc:42