ATLAS Offline Software
Loading...
Searching...
No Matches
testPMGTruthWeightsAlg Namespace Reference

Functions

 get_parser ()
 run ()

Variables

str _input_help = "with no inputs use ASG_TEST_FILE_MC"

Detailed Description

Test to run PMGTruthWeightsAlg

Function Documentation

◆ get_parser()

testPMGTruthWeightsAlg.get_parser ( )

Definition at line 18 of file testPMGTruthWeightsAlg.py.

18def get_parser():
19 parser = ArgumentParser(description=__doc__)
20 parser.add_argument('input_files', nargs='*', help=_input_help)
21 parser.add_argument('-m', '--max-events', type=int, const=10, nargs='?')
22 parser.add_argument('-d', '--debug-logs', action='store_true')
23 return parser.parse_args()
24

◆ run()

testPMGTruthWeightsAlg.run ( )

Definition at line 25 of file testPMGTruthWeightsAlg.py.

25def run():
26 args = get_parser()
27 flags = initConfigFlags()
28 flags.Input.Files = args.input_files or [os.environ['ASG_TEST_FILE_MC']]
29 if args.debug_logs:
30 flags.Exec.OutputLevel = DEBUG
31 if args.max_events:
32 flags.Exec.MaxEvents = args.max_events
33 ca = MainServicesCfg(flags)
34 ca.merge(PoolReadCfg(flags))
35
36 ca.merge(PMGTruthWeightAlgCfg(flags))
37
38 ca.run()
39
Definition run.py:1

Variable Documentation

◆ _input_help

str testPMGTruthWeightsAlg._input_help = "with no inputs use ASG_TEST_FILE_MC"
protected

Definition at line 7 of file testPMGTruthWeightsAlg.py.