ATLAS Offline Software
Loading...
Searching...
No Matches
python.AODtoNTUP_PILEUP_Skeleton Namespace Reference

Functions

 PRWOutputCfg (flags, output_name="NTUP_PILEUP")
 PileupReweightingProviderCfg (flags, **kwargs)
 PRWSteeringCfg (flags)
 fromRunArgs (runArgs)

Variables

 jobPropertiesDisallowed

Function Documentation

◆ fromRunArgs()

python.AODtoNTUP_PILEUP_Skeleton.fromRunArgs ( runArgs)

Definition at line 39 of file AODtoNTUP_PILEUP_Skeleton.py.

39def fromRunArgs(runArgs):
40 from AthenaCommon.Logging import logging
41 log = logging.getLogger('PRWConfig_tf')
42 log.info( '****************** STARTING AODtoNTUP_PILEUP *****************' )
43
44 log.info('**** Transformation run arguments')
45 log.info(str(runArgs))
46
47 log.info('**** Setting-up configuration flags')
48 from AthenaConfiguration.AllConfigFlags import initConfigFlags
49 flags = initConfigFlags()
50
51 commonRunArgsToFlags(runArgs, flags)
52
53 if hasattr(runArgs, 'inputAODFile'):
54 flags.Input.Files = runArgs.inputAODFile
55 else:
56 raise RuntimeError('No input AOD file defined')
57
58 if hasattr(runArgs, 'outputNTUP_PILEUPFile'):
59 flags.Output.HISTFileName = runArgs.outputNTUP_PILEUPFile # FIXME Add a separate output file type flag??
60 else:
61 log.warning('No output file set')
62 flags.Output.HISTFileName = 'output.NTUP_PILEUP.root' # FIXME Add a separate output file type flag??
63
64 # Pre-include
65 processPreInclude(runArgs, flags)
66
67 # Pre-exec
68 processPreExec(runArgs, flags)
69
70 # To respect --athenaopts
71 flags.fillFromArgs()
72
73 # Lock flags
74 flags.lock()
75
76 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
77 cfg = MainServicesCfg(flags)
78
79 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
80 cfg.merge(PoolReadCfg(flags))
81
82 cfg.merge(PRWSteeringCfg(flags))
83
84 # Post-include
85 processPostInclude(runArgs, flags, cfg)
86
87 # Post-exec
88 processPostExec(runArgs, flags, cfg)
89
90 import time
91 tic = time.time()
92 # Run the final accumulator
93 sc = cfg.run()
94 log.info("Ran PRWConfig_tf in " + str(time.time()-tic) + " seconds")
95
96 sys.exit(not sc.isSuccess())

◆ PileupReweightingProviderCfg()

python.AODtoNTUP_PILEUP_Skeleton.PileupReweightingProviderCfg ( flags,
** kwargs )

Definition at line 20 of file AODtoNTUP_PILEUP_Skeleton.py.

20def PileupReweightingProviderCfg(flags, **kwargs):
21 cfg = ComponentAccumulator()
22 kwargs.setdefault("ConfigOutputStream", "NTUP_PILEUP")
23 from AsgAnalysisAlgorithms.PileupReweightingAlgConfig import PileupReweightingProviderToolCfg
24 kwargs.setdefault("Tool", cfg.addPublicTool(cfg.popToolsAndMerge(PileupReweightingProviderToolCfg(flags))))
25 cfg.addEventAlgo(CompFactory.CP.PileupReweightingProvider(**kwargs))
26 return cfg
27
28

◆ PRWOutputCfg()

python.AODtoNTUP_PILEUP_Skeleton.PRWOutputCfg ( flags,
output_name = "NTUP_PILEUP" )

Definition at line 15 of file AODtoNTUP_PILEUP_Skeleton.py.

15def PRWOutputCfg(flags, output_name="NTUP_PILEUP"):
16 from MuonConfig.MuonConfigUtils import setupHistSvcCfg
17 return setupHistSvcCfg(flags, outFile =flags.Output.HISTFileName, outStream = output_name)
18
19

◆ PRWSteeringCfg()

python.AODtoNTUP_PILEUP_Skeleton.PRWSteeringCfg ( flags)

Definition at line 29 of file AODtoNTUP_PILEUP_Skeleton.py.

29def PRWSteeringCfg(flags):
30 cfg = ComponentAccumulator()
31 cfg.merge(PileupReweightingProviderCfg(flags))
32
33 #include("AthAnalysisBaseComps/SuppressLogging.py") #Optional include to suppress as much athena output as possible
34 #https://gitlab.cern.ch/atlas/athena/-/blob/release/23.0.20/Control/AthAnalysisBaseComps/share/SuppressLogging.py
35 cfg.merge(PRWOutputCfg(flags))
36 return cfg
37
38

Variable Documentation

◆ jobPropertiesDisallowed

python.AODtoNTUP_PILEUP_Skeleton.jobPropertiesDisallowed

Definition at line 9 of file AODtoNTUP_PILEUP_Skeleton.py.