8 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
9 from AthenaConfiguration.ComponentFactory
import CompFactory
10 from AthenaConfiguration.Enums
import ProductionStep
11 from IOVDbSvc.IOVDbSvcConfig
import addFolders
15 name =
'BunchLumisCondAlg'
19 if flags.IOVDb.DatabaseInstance !=
'COMP200':
22 folder =
'/TDAQ/OLC/BUNCHLUMIS'
23 if flags.Common.isOverlay:
26 folder =
'<channelSelection>101,102,103,201,211</channelSelection> ' + folder
28 result.merge (addFolders (flags, folder,
'TDAQ',
29 className=
'CondAttrListCollection'))
31 from CoolLumiUtilities.FillParamsCondAlgConfig
import FillParamsCondAlgCfg
33 fpalg = result.getCondAlgo (
'FillParamsCondAlg')
35 BunchLumisCondAlg=CompFactory.BunchLumisCondAlg
36 alg = BunchLumisCondAlg (name,
37 BunchLumisFolderInputKey = folder,
38 FillParamsInputKey = fpalg.FillParamsOutputKey,
39 BunchLumisOutputKey =
'BunchLumisCondData')
41 result.addCondAlgo (alg)
45 if __name__ ==
"__main__":
46 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
47 from AthenaConfiguration.TestDefaults
import defaultTestFiles
51 flags1.Input.Files = defaultTestFiles.RAW_RUN2
52 flags1.Input.ProjectName =
'data12_8TeV'
54 acc1 = BunchLumisCondAlgCfg (flags1)
55 acc1.printCondAlgs(summariseProps=
True)
56 print (
'IOVDbSvc:', acc1.getService(
'IOVDbSvc').Folders)
59 print (
'--- data+overlay')
61 flags2.Input.Files = defaultTestFiles.RAW_RUN2
62 flags2.Input.ProjectName =
'data12_8TeV'
63 flags2.Common.ProductionStep = ProductionStep.Overlay
65 acc2 = BunchLumisCondAlgCfg (flags2)
66 acc2.printCondAlgs(summariseProps=
True)
67 print (
'IOVDbSvc:', acc2.getService(
'IOVDbSvc').Folders)
72 flags3.Input.Files = defaultTestFiles.RAW_RUN2
74 acc3 = BunchLumisCondAlgCfg (flags3)
75 acc3.printCondAlgs(summariseProps=
True)
76 print (
'IOVDbSvc:', acc3.getServices())