19 return logging.getLogger(__name__)
26 class PostProcessingRunMixin(EmptyRun):
27 """Post-process the basf2 job output"""
30 postprocess_only =
False
33 """Parse the command-line post-processing arguments"""
35 postprocess_argument_group = argument_parser.add_argument_group(
"Postprocessing arguments")
36 postprocess_argument_group.add_argument(
41 dest=
'postprocess_only',
42 help=
'Only run the post processing of this run.',)
44 return argument_parser
47 """Post-process the basf2 job output"""
54 """By default, do nothing. (may be overridden)"""
57 class BrowseTFileOnTerminateRunMixin(PostProcessingRunMixin):
58 """Browse interactively the basf2 job output"""
61 output_file_name =
None
66 """Parse the command-line TFile-browsing arguments"""
69 postprocess_argument_group = argument_parser
70 for group
in argument_parser._action_groups:
71 if group.title ==
"Postprocessing arguments":
72 postprocess_argument_group = group
75 postprocess_argument_group.add_argument(
81 help=
'Show generated plots in a TBrowser immediatly.',)
83 return argument_parser
86 """Browse the TFile interactively"""
89 root_utils.root_browse(tfile)
90 input(
"Close with return key.")
96 """Configure for basf2 job output ROOT TFile"""
99 root_output_file =
None
102 """Parse the command-line output-file-specification argument"""
104 argument_parser.add_argument(
106 help=
'Output file to which the simulated events shall be written.'
109 return argument_parser
112 """Create a new basf2 path and add the RootOutput module to it"""
def create_argument_parser(self, **kwds)
output_file_name
There is no default for the name of the output TFile.
bool show_results
By default, do not show the browsing results.
def create_argument_parser(self, **kwds)
bool postprocess_only
By default, browse the output TFile too.
def create_argument_parser(self, **kwds)
root_output_file
There is no default for the name of the output TFile.