8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
10 from IOVDbSvc.IOVDbSvcConfig
import addFolders
15 name =
'TrigLiveFractionCondAlg'
19 if flags.IOVDb.DatabaseInstance ==
'COMP200':
20 folder =
'/TRIGGER/LUMI/PerBcidDeadtime'
23 result.merge (addFolders (flags, folder,
'TRIGGER', tag=
'HEAD',
24 className=
'AthenaAttributeList'))
26 kwargs[
'DeadtimeFolderInputKey'] = folder
27 kwargs[
'LuminosityInputKey'] =
'LuminosityCondData'
29 from LumiBlockComps.LuminosityCondAlgConfig
import LuminosityCondAlgCfg
30 result.merge (LuminosityCondAlgCfg (flags))
33 kwargs[
'DeadtimeFolderInputKey'] =
''
34 kwargs[
'LuminosityInputKey'] =
''
37 TrigLiveFractionCondAlg=CompFactory.TrigLiveFractionCondAlg
38 alg = TrigLiveFractionCondAlg (name,
39 TrigLiveFractionOutputKey =
'TrigLiveFractionCondData',
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
53 acc1 = TrigLiveFractionCondAlgCfg (flags1)
54 acc1.printCondAlgs(summariseProps=
True)
59 flags3.Input.Files = defaultTestFiles.RAW_RUN2
60 flags3.Input.ProjectName =
'data12_8TeV'
62 acc3 = TrigLiveFractionCondAlgCfg (flags3)
63 acc3.printCondAlgs(summariseProps=
True)
64 print (
'IOVDbSvc:', acc3.getService(
'IOVDbSvc').Folders)
69 flags4.Input.Files = defaultTestFiles.ESD
71 acc4 = TrigLiveFractionCondAlgCfg (flags4)
72 acc4.printCondAlgs(summariseProps=
True)