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
21 theLArHVScaleCorr2Ntuple = CompFactory.LArHVScaleCorr2Ntuple(
"LArHVScaleCorr2Ntuple")
22 theLArHVScaleCorr2Ntuple.AddFEBTempInfo =
False
23 theLArHVScaleCorr2Ntuple.OffId=
True
24 result.addEventAlgo(theLArHVScaleCorr2Ntuple)
27 if os.path.exists(rootfile):
29 result.addService(CompFactory.NTupleSvc(Output = [
"FILE1 DATAFILE='"+rootfile+
"' OPT='NEW'" ]))
30 result.setAppProperty(
"HistogramPersistency",
"ROOT")
34 if __name__==
"__main__":
36 from time
import strptime
37 from calendar
import timegm
41 print(
"%s <time> <outputfile> <globaltag>" % sys.argv[0])
46 ts=strptime(sys.argv[1]+
'/UTC',
'%Y-%m-%d:%H:%M:%S/%Z')
47 TimeStamp=
int(timegm(ts))
48 TimeStamp_ns=TimeStamp*1000000000
49 except ValueError
as e:
50 print(
"ERROR in time specification, use e.g. 2007-05-25:14:01:00")
54 from LArCalibProcessing.TimeStampToRunLumi
import TimeStampToRunLumi
59 print(
"WARNING: Failed to convert time",TimeStamp_ns,
"into a run/lumi number. Using 'infinite' run-number",rlb[0])
62 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
64 from LArCalibProcessing.LArCalibConfigFlags
import addLArCalibFlags
67 flags.Input.RunNumbers=[rlb[0]]
68 flags.Input.TimeStamps=[TimeStamp]
70 flags.IOVDb.DatabaseInstance=
"CONDBR2"
71 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
72 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
74 rootfile=
"hvcorr_read.root"
79 flags.IOVDb.GlobalTag=sys.argv[3]
86 print(
"Start running...")