ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JpsiUpsilonTools
python
runJpsiAlg.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
4
if
__name__ ==
"__main__"
:
5
# import the flags and set them
6
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
7
flags = initConfigFlags()
8
flags.Exec.MaxEvents = 150
9
10
# use one of the predefined files
11
from
AthenaConfiguration.TestDefaults
import
defaultTestFiles
12
flags.Input.Files = defaultTestFiles.AOD_RUN2_MC
13
flags.Input.isMC=
True
14
flags.fillFromArgs()
15
16
# lock the flags
17
flags.lock()
18
#flags.dump()
19
20
# create basic infrastructure
21
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
22
acc = MainServicesCfg(flags)
23
from
AthenaPoolCnvSvc.PoolReadConfig
import
PoolReadCfg
24
acc.merge(PoolReadCfg(flags))
#!!!!! THIS IS IMPORTANT
25
# add the algorithm to the configuration
26
from
JpsiUpsilonTools.JpsiUpsilonToolsConfig
import
JpsiAlgCfg
27
acc.merge(JpsiAlgCfg(flags,
"JpsiAlgTest"
))
28
29
# debug printout
30
acc.printConfig(withDetails=
True
, summariseProps=
True
)
31
32
# run the job
33
status = acc.run()
34
35
# report the execution status (0 ok, else error)
36
import
sys
37
sys.exit(
not
status.isSuccess())
Generated on
for ATLAS Offline Software by
1.17.0