3 from AthenaConfiguration.ComponentFactory
import CompFactory
8 from LArCalibProcessing.LArCalibBaseConfig
import LArCalibBaseCfg
11 if flags.LArCalib.isSC:
12 ckey=
"LArOnOffIdMapSC"
17 result.addEventAlgo(CompFactory.LArFlatFromFile(SuperCells=flags.LArCalib.isSC,
18 CablingKey=ckey,NGains=ngain,
20 SingleInput=flags.LArCalib.Input.Files[0],
21 Folder=flags.LArCalib.DetCellParams.Folder,
22 Blob=flags.LArCalib.Input.SubDet,
23 checkInput=flags.LArCalib.doValidation
26 from RegistrationServices.OutputConditionsAlgConfig
import OutputConditionsAlgCfg
28 outputFile=
"dummy.root",
29 ObjectList=[
"CondAttrListCollection#"+flags.LArCalib.DetCellParams.Folder, ],
30 IOVTagList=[flags.LArCalib.Input.Type],
31 Run1=flags.LArCalib.IOVStart,
32 Run2=flags.LArCalib.IOVEnd
36 result.addService(CompFactory.IOVRegistrationSvc(RecreateFolders =
True, SVFolder=
False,
37 OverrideNames = [flags.LArCalib.Input.SubDet], OverrideTypes = [
"Blob16M"]))
38 result.getService(
"IOVDbSvc").DBInstance=
""
41 from McEventSelector.McEventSelectorConfig
import McEventSelectorCfg
43 RunNumber = flags.LArCalib.Input.RunNumbers[0],
47 TimeStampInterval = 1))
51 if __name__==
"__main__":
57 parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
58 parser.add_argument(
'-i',
'--infile', dest=
'infile', default=
"", help=
'Input file with constants`', type=str)
59 parser.add_argument(
'-f',
'--folder', dest=
'fld', default=
"", help=
'Folder for constants`', type=str)
60 parser.add_argument(
'-t',
'--tag', dest=
'tag', default=
"", help=
'Folder tag for constants`', type=str)
61 parser.add_argument(
'-b',
'--blob', dest=
'blb', default=
"", help=
'Blob name for constants`', type=str)
62 parser.add_argument(
'-o',
'--outfile', dest=
'outfile', default=
"Float.db", help=
'Output sqlite file', type=str)
63 parser.add_argument(
'-c',
'--isSC', dest=
'supercells', default=
False, action=
"store_true", help=
'is SC data ?')
64 parser.add_argument(
'-m',
'--nocheck', dest=
'check', default=
True, action=
"store_false", help=
'check input file ?')
66 args = parser.parse_args()
67 if help
in args
and args.help
is not None and args.help:
71 for _, value
in args._get_kwargs():
75 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
77 from LArCalibProcessing.LArCalibConfigFlags
import addLArCalibFlags
81 flags.LArCalib.isSC = args.supercells
82 flags.LArCalib.Input.RunNumbers = [404400,]
83 flags.Input.RunNumbers=flags.LArCalib.Input.RunNumbers
85 flags.IOVDb.DatabaseInstance=
"CONDBR2"
86 flags.IOVDb.DBConnection=
"sqlite://;schema=" + args.outfile +
";dbname=CONDBR2"
88 flags.LAr.doAlign=
False
89 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
90 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
93 flags.IOVDb.GlobalTag =
"LARCALIB-RUN2-00"
96 flags.LArCalib.DetCellParams.Folder=args.fld
97 flags.LArCalib.Input.Files=[args.infile]
98 flags.LArCalib.Input.Type=args.tag
99 flags.LArCalib.Input.SubDet=args.blb
101 flags.LArCalib.doValidation=args.check
105 flags.Exec.OutputLevel = INFO
107 flags.Detector.GeometryID =
False
108 flags.Detector.GeometryITk =
False
109 flags.Detector.GeometryHGTD =
False
110 flags.Detector.GeometryCalo =
False
111 flags.Detector.GeometryMuon =
False
112 flags.Detector.GeometryForward =
False
116 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg