Coverage for src/km3dq_common/detector_fact_classes.py: 0%
5 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-25 11:58 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-25 11:58 +0000
1#!/usr/bin/env python3
3# from km3dq_common.common_library import get_run_properties_from_db
5###############################################################################
6class DetectorFact(dict):
7 """
8 Detector fact classes ingeriting from a dict
9 https://realpython.com/inherit-python-dict/
10 """
11 def __init__(self):
12 dict.__init__(self,
13 hardware="",
14 location="",
15 position=0,
16 status="",
17 upi=0,
18 site="",
19 det="",
20 time="",
21 following_run=0,
22 comment="",
23 waveform="",
24 documentation="",
25 author="")
27 def set_following_run(self):
28 self.following_run = 100
29 # # Date
30 # rp_db = get_run_properties_from_db(det, "")
31 # try:
32 # date_start = int(rp_db[run_start]['UNIXSTARTTIME'])/1e3
33 # date_start_strf = time.strftime("%a, %d %b %Y %H:%M",
34 # time.localtime(int(date_start)))
35 # time_range = (f"{date_start_strf} - ")
36 # except KeyError:
37 # print("Unable to retrieve the run start from the db")
38 # sys.exit()