ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCafJobs
python
LArNoiseSkeleton.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2
3
import
sys
4
5
from
PyJobTransforms.CommonRunArgsToFlags
import
commonRunArgsToFlags
6
from
PyJobTransforms.TransformUtils
import
processPreExec, processPreInclude, processPostExec, processPostInclude
7
from
LArCafJobs.LArNoiseConfig
import
LArNoiseCfg
8
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
9
10
11
def
fromRunArgs
(runArgs):
12
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
13
14
flags=initConfigFlags()
15
16
from
LArCafJobs.LArNoiseFlags
import
addNoiseFlags
17
addNoiseFlags(flags)
18
19
commonRunArgsToFlags(runArgs, flags)
20
21
processPreInclude(runArgs, flags)
22
processPreExec(runArgs, flags)
23
24
flags.Input.Files=runArgs.inputESDFile
25
if
hasattr(runArgs,
"outputNTUP_LARNOISEFile"
):
26
flags.LArNoise.outNtupLAr=runArgs.outputNTUP_LARNOISEFile
27
28
if
hasattr(runArgs,
"outputNTUP_HECNOISEFile"
):
29
flags.LArNoise.HECNoiseNtup=runArgs.outputNTUP_HECNOISEFile
30
31
if
not
hasattr(runArgs,
"conditionsTag"
)
or
runArgs.conditionsTag==
"CURRENT"
:
32
print
(
"Resolving 'CURRENT' express conditions tag ..."
)
33
sys.path.append(
'/afs/cern.ch/user/a/atlcond/utils22/'
)
34
from
CondUtilsLib.AtlCoolBKLib
import
resolveAlias
35
resolver=resolveAlias()
36
currentGlobalES=resolver.getCurrentES().
replace
(
"*"
,
"ST"
)
37
print
(
"Found "
,currentGlobalES)
38
flags.IOVDb.GlobalTag=currentGlobalES
39
else
:
40
flags.IOVDb.GlobalTag=runArgs.conditionsTag
41
42
if
hasattr(runArgs,
"skipEvents"
):
43
flags.Exec.SkipEvents=runArgs.skipEvents
44
45
if
hasattr(runArgs,
"maxEvents"
):
46
flags.Exec.MaxEvents=runArgs.maxEvents
47
48
flags.Trigger.doID=
False
49
50
# To respect --athenaopts
51
flags.fillFromArgs()
52
53
flags.lock()
54
55
cfg=MainServicesCfg(flags)
56
cfg.merge(LArNoiseCfg(flags))
57
58
processPostInclude(runArgs, flags, cfg)
59
processPostExec(runArgs, flags, cfg)
60
61
# Run the final accumulator
62
sc = cfg.run()
63
sys.exit(
not
sc.isSuccess())
print
void print(char *figname, TCanvas *c1)
Definition
TRTCalib_StrawStatusPlots.cxx:26
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition
hcg.cxx:312
LArNoiseSkeleton.fromRunArgs
fromRunArgs(runArgs)
Definition
LArNoiseSkeleton.py:11
Generated on
for ATLAS Offline Software by
1.17.0