3 from AthenaConfiguration.ComponentFactory
import CompFactory
4 from AthenaConfiguration.MainServicesConfig
import MainEvgenServicesCfg
8 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
11 from LArCabling.LArCablingConfig
import LArOnOffIdMappingCfg
14 from LArBadChannelTool.LArBadChannelConfig
import LArBadChannelCfg
17 from LArConfiguration.LArElecCalibDBConfig
import LArElecCalibDBCfg
20 result.addEventAlgo(CompFactory.LArHVScaleCorr2Ntuple(
"LArHVScaleCorr2Ntuple", AddFEBTempInfo =
False, OffId=
True))
23 from LArConfiguration.LArElecCalibDBConfig
import LArElecCalibDBSCCfg
26 from LArCabling.LArCablingConfig
import LArOnOffIdMappingSCCfg
31 result.addEventAlgo(CompFactory.LArHVScaleCorr2Ntuple(
"LArSCHVScaleCorr2Ntuple", AddFEBTempInfo =
False, OffId=
True,
32 ContainerKey=
"LArHVScaleCorrSC",isSC =
True, BadChanKey =
"LArBadChannelSC"))
36 if os.path.exists(rootfile):
38 result.addService(CompFactory.NTupleSvc(Output = [
"FILE1 DATAFILE='"+rootfile+
"' OPT='NEW'" ]))
39 result.setAppProperty(
"HistogramPersistency",
"ROOT")
43 if __name__==
"__main__":
45 from time
import strptime
46 from calendar
import timegm
50 print(
"%s <time> <outputfile> <globaltag>" % sys.argv[0])
55 ts=strptime(sys.argv[1]+
'/UTC',
'%Y-%m-%d:%H:%M:%S/%Z')
56 TimeStamp=
int(timegm(ts))
57 TimeStamp_ns=TimeStamp*1000000000
58 except ValueError
as e:
59 print(
"ERROR in time specification, use e.g. 2007-05-25:14:01:00")
63 from LArCalibProcessing.TimeStampToRunLumi
import TimeStampToRunLumi
68 print(
"WARNING: Failed to convert time",TimeStamp_ns,
"into a run/lumi number. Using 'infinite' run-number",rlb[0])
71 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
73 from LArCalibProcessing.LArCalibConfigFlags
import addLArCalibFlags
76 flags.Input.RunNumbers=[rlb[0]]
77 flags.Input.TimeStamps=[TimeStamp]
79 flags.IOVDb.DatabaseInstance=
"CONDBR2"
80 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
81 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
83 rootfile=
"hvcorr_read.root"
88 flags.IOVDb.GlobalTag=sys.argv[3]
95 print(
"Start running...")