Belle II Software development
ImportTimeResolution.py
1#!/usr/bin/env python3
2
3
10
11# Import KLM time resolution payloads.
12
13import sys
14from ROOT import Belle2
15
16mc = False
17if (len(sys.argv) >= 2):
18 if (sys.argv[1] == 'mc'):
19 mc = True
20
21timeResolution = Belle2.KLMTimeResolution()
24while (index != index2.end()):
25 channel = index.getKLMChannelNumber()
26 timeResolution.setTimeResolution(channel, 3.0)
27 index.increment()
28
30
31if (mc):
32 iov = Belle2.IntervalOfValidity(0, 0, 0, -1)
33 db.storeData("KLMTimeResolution", timeResolution, iov)
34
35 iov = Belle2.IntervalOfValidity(1002, 0, 1002, -1)
36 db.storeData("KLMTimeResolution", timeResolution, iov)
37
38 iov = Belle2.IntervalOfValidity(1003, 0, 1003, -1)
39 db.storeData("KLMTimeResolution", timeResolution, iov)
40
41else:
42 iov = Belle2.IntervalOfValidity(0, 0, -1, -1)
43 db.storeData("KLMTimeResolution", timeResolution, iov)
A class that describes the interval of experiments/runs for which an object in the database is valid.
KLM channel index.
Class to store KLM time resolution in the database.
static Database & Instance()
Instance of a singleton Database.
Definition: Database.cc:42