ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArRecUtils
python
LArADC2MeVCondAlgConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
4
from
AthenaConfiguration.ComponentFactory
import
CompFactory
5
from
AthenaConfiguration.Enums
import
LHCPeriod
6
7
def
LArADC2MeVCondAlgCfg
(flags):
8
from
LArCabling.LArCablingConfig
import
LArOnOffIdMappingCfg
9
from
LArConfiguration.LArElecCalibDBConfig
import
LArElecCalibDBCfg
10
from
LArGeoAlgsNV.LArGMConfig
import
LArGMCfg
11
12
result=ComponentAccumulator()
13
result.merge(LArOnOffIdMappingCfg(flags))
14
result.merge(LArGMCfg(flags))
#Needed for identifier helpers
15
16
theADC2MeVCondAlg=CompFactory.LArADC2MeVCondAlg(LArADC2MeVKey =
'LArADC2MeV'
)
17
18
theADC2MeVCondAlg.NGains= 2
if
flags.GeoModel.Run==LHCPeriod.Run4
and
flags.IOVDb.UseCREST
else
3
19
20
if
flags.Input.isMC:
21
requiredConditions=[
"Ramp"
,
"DAC2uA"
,
"uA2MeV"
,
"MphysOverMcal"
,
"HVScaleCorr"
]
22
theADC2MeVCondAlg.LAruA2MeVKey=
"LAruA2MeVSym"
23
theADC2MeVCondAlg.LArDAC2uAKey=
"LArDAC2uASym"
24
theADC2MeVCondAlg.LArRampKey=
"LArRampSym"
25
theADC2MeVCondAlg.LArMphysOverMcalKey=
"LArMphysOverMcalSym"
26
theADC2MeVCondAlg.LArHVScaleCorrKey=
"LArHVScaleCorr"
27
theADC2MeVCondAlg.UseFEBGainTresholds=
False
28
else
:
# not MC:
29
requiredConditions=[
"Ramp"
,
"DAC2uA"
,
"uA2MeV"
,
"MphysOverMcal"
,
"HVScaleCorr"
]
30
from
LArRecUtils.LArFebConfigCondAlgConfig
import
LArFebConfigCondAlgCfg
31
if
'COMP200'
in
flags.IOVDb.DatabaseInstance:
# Run1 case
32
theADC2MeVCondAlg.LAruA2MeVKey=
"LAruA2MeVSym"
33
theADC2MeVCondAlg.LArDAC2uAKey=
"LArDAC2uASym"
34
result.merge(LArFebConfigCondAlgCfg(flags))
35
36
result.merge(LArElecCalibDBCfg(flags,requiredConditions))
37
result.addCondAlgo(theADC2MeVCondAlg,primary=
True
)
38
return
result
39
40
41
if
__name__ ==
"__main__"
:
42
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
43
from
AthenaConfiguration.TestDefaults
import
defaultTestFiles, defaultGeometryTags
44
45
print
(
'--- data'
)
46
flags1 = initConfigFlags()
47
flags1.Input.Files = defaultTestFiles.RAW_RUN2
48
flags1.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
49
flags1.lock()
50
acc1 = LArADC2MeVCondAlgCfg (flags1)
51
acc1.printCondAlgs(summariseProps=
True
)
52
print
(
'IOVDbSvc:'
, acc1.getService(
'IOVDbSvc'
).Folders)
53
acc1.wasMerged()
54
55
print
(
'--- mc'
)
56
flags2 = initConfigFlags()
57
flags2.Input.Files = defaultTestFiles.ESD
58
flags2.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
59
flags2.lock()
60
acc2 = LArADC2MeVCondAlgCfg (flags2)
61
acc2.printCondAlgs(summariseProps=
True
)
62
print
(
'IOVDbSvc:'
, acc2.getService(
'IOVDbSvc'
).Folders)
63
acc2.wasMerged()
python.LArADC2MeVCondAlgConfig.LArADC2MeVCondAlgCfg
LArADC2MeVCondAlgCfg(flags)
Definition
LArADC2MeVCondAlgConfig.py:7
Generated on
for ATLAS Offline Software by
1.17.0