4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from LArCalibProcessing.LArCalib_OFCPhysConfig
import LArOFCPhysCfg
6 from LArCalibProcessing.LArCalib_PileUpAutoCorrConfig
import LArPileUpAutoCorrCfg
7 from LArCalibProcessing.LArCalib_OFPhasePickerConfig
import LArOFPhasePickerCfg
24 if __name__==
"__main__":
29 parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
30 parser.add_argument(
'-r',
'--run', dest=
'run', default=
str(0x7FFFFFFF), help=
'Run number to query input DB', type=str)
31 parser.add_argument(
'-i',
'--insqlite', dest=
'insql', default=
"freshConstants_AP.db", help=
'Input sqlite file containing the (merged) output of the AP.', type=str)
32 parser.add_argument(
'-o',
'--outsqlite', dest=
'outsql', default=
"freshConstants_merged.db", help=
'Output sqlite file', type=str)
33 parser.add_argument(
'--poolfile', dest=
'poolfile', default=
"freshConstants_pp.pool.root", help=
'Output pool file', type=str)
34 parser.add_argument(
'--rootfile', dest=
'rootfile', default=
"freshConstants_pp.root", help=
'Output ROOT file', type=str)
35 parser.add_argument(
'--iovstart',dest=
"iovstart", default=0, help=
"IOV start (run-number)", type=int)
36 parser.add_argument(
'--isSC', dest=
'supercells', default=
False, help=
'is SC data ?', type=bool)
37 parser.add_argument(
'--poolcat', dest=
'poolcat', default=
"freshConstants.xml", help=
'Catalog of POOL files', type=str)
38 parser.add_argument(
'--Ncoll',dest=
'Ncoll', default=60, help=
'Number of MinBias collision assumed for pile-up OFCs', type=int)
39 args = parser.parse_args()
40 if help
in args
and args.help
is not None and args.help:
48 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
51 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
52 from LArCalibProcessing.LArCalibConfigFlags
import addLArCalibFlags
58 flags.LArCalib.Input.RunNumbers = [
int(args.run),]
59 flags.LArCalib.Input.Database = args.insql
60 flags.IOVDb.SqliteInput=args.insql
61 flags.IOVDb.SqliteFolders=(
"/LAR/ElecCalibOfl/PhysWaves/RTM",
"/LAR/ElecCalibOfl/AutoCorrs/AutoCorr",
"/LAR/ElecCalibOfl/AutoCorrs/PhysicsAutoCorr")
63 flags.LArCalib.Output.ROOTFile = args.rootfile
64 flags.LArCalib.Output.POOLFile = args.poolfile
66 flags.IOVDb.DBConnection=
"sqlite://;schema="+args.outsql +
";dbname=CONDBR2"
69 flags.IOVDb.GlobalTag =
"LARCALIB-RUN2-00"
71 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
72 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
75 flags.LArCalib.Input.Files = [ ]
76 flags.LArCalib.OFC.Ncoll = args.Ncoll
77 flags.LArCalib.IOVStart = args.iovstart
79 flags.LArCalib.PhysACuseHG=
True
80 flags.LArCalib.OFC.ShapeCorrection=
True
81 flags.LArCalib.OFC.UsePhysCalibTDiff =
False
83 flags.LAr.doAlign=
False
84 flags.Input.RunNumbers=flags.LArCalib.Input.RunNumbers
92 cfg.getService(
"PoolSvc").ReadCatalog+=[
"xmlcatalog_file:%s"%args.poolcat,]
93 cfg.getService(
"PoolSvc").WriteCatalog=
"xmlcatalog_file:%s"%args.poolcat
95 sys.exit(cfg.run(1).isFailure())