ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
CoolLumiUtilities
python
FillParamsCondAlgConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
#
3
# File: CoolLumiUtilities/python/FillParamsCondAlgConfig.py
4
# Created: May 2019, sss
5
# Purpose: Configure FillParamsCondAlg.
6
#
7
8
from
AthenaConfiguration.ComponentFactory
import
CompFactory
9
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
10
from
IOVDbSvc.IOVDbSvcConfig
import
addFolders
11
12
def
FillParamsCondAlgCfg
(flags):
13
name =
'FillParamsCondAlg'
14
result = ComponentAccumulator()
15
16
# Should only be used for Run 1.
17
if
flags.IOVDb.DatabaseInstance !=
'COMP200'
:
18
return
result
19
20
folder =
'/TDAQ/OLC/LHC/FILLPARAMS'
21
# Mistakenly created as multi-version folder, must specify HEAD
22
result.merge (addFolders (flags, folder,
'TDAQ'
, tag=
'HEAD'
,
23
className=
'AthenaAttributeList'
))
24
25
FillParamsCondAlg=CompFactory.FillParamsCondAlg
26
alg = FillParamsCondAlg (name,
27
FillParamsFolderInputKey = folder,
28
FillParamsOutputKey =
'FillParamsCondData'
)
29
30
result.addCondAlgo (alg)
31
return
result
32
33
34
if
__name__ ==
"__main__"
:
35
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
36
from
AthenaConfiguration.TestDefaults
import
defaultTestFiles
37
38
print
(
'--- data'
)
39
flags1 = initConfigFlags()
40
flags1.Input.Files = defaultTestFiles.RAW_RUN2
41
flags1.Input.ProjectName =
'data12_8TeV'
42
flags1.lock()
43
acc1 = FillParamsCondAlgCfg (flags1)
44
acc1.printCondAlgs(summariseProps=
True
)
45
print
(
'IOVDbSvc:'
, acc1.getService(
'IOVDbSvc'
).Folders)
46
acc1.wasMerged()
47
48
print
(
'--- default'
)
49
flags2 = initConfigFlags()
50
flags2.Input.Files = defaultTestFiles.RAW_RUN2
51
flags2.lock()
52
acc2 = FillParamsCondAlgCfg (flags2)
53
acc2.printCondAlgs(summariseProps=
True
)
54
print
(
'IOVDbSvc:'
, acc2.getServices())
55
acc2.wasMerged()
python.FillParamsCondAlgConfig.FillParamsCondAlgCfg
FillParamsCondAlgCfg(flags)
Definition
FillParamsCondAlgConfig.py:12
Generated on
for ATLAS Offline Software by
1.17.0