Source code for km3dq_common.detector_fact_classes

#!/usr/bin/env python3

# from km3dq_common.common_library import get_run_properties_from_db

###############################################################################
[docs] class DetectorFact(dict): """ Detector fact classes ingeriting from a dict https://realpython.com/inherit-python-dict/ """ def __init__(self): dict.__init__(self, hardware="", location="", position=0, status="", upi=0, site="", det="", time="", following_run=0, comment="", waveform="", documentation="", author="")
[docs] def set_following_run(self): self.following_run = 100
# # Date # rp_db = get_run_properties_from_db(det, "") # try: # date_start = int(rp_db[run_start]['UNIXSTARTTIME'])/1e3 # date_start_strf = time.strftime("%a, %d %b %Y %H:%M", # time.localtime(int(date_start))) # time_range = (f"{date_start_strf} - ") # except KeyError: # print("Unable to retrieve the run start from the db") # sys.exit()