5 from MuonCalibDbOperations.CalibrationSourceConfig
import MuonCalib__gCalibrationSourceConfigs, MuonCalib__CalibrationSourceConfig
9 if len(MuonCalib__gCalibrationSourceConfigs)==0
and not time:
10 print (
"FATAL Cannot generate gasmon source if no time and no other calibration sources are given")
14 cal_time = MuonCalib__gCalibrationSourceConfigs[0].GetTime(reader_cursor)
16 if not isinstance(
type(cal_time), str):
17 tm=time.gmtime(cal_time)
18 cal_time=
str(tm.tm_year) +
str(tm.tm_mon).zfill(2) +
str(tm.tm_mday).zfill(2)
19 imp_str=
"GASMON_RT_" + cal_time +
"_TP"
23 print (
"INFO Getting", imp_str)
25 reader_cursor.execute(
"select head_id, data_schema from ATLAS_MUONCALIB_UM_META.MDT_HEAD where IMPLEMENTATION=:imp", {
'imp':imp_str})
26 gm_head_id, gm_schema= reader_cursor.fetchone()
28 return MuonCalib__CalibrationSourceConfig(
"UM", gm_head_id,
"",
True,
False)