Belle II Software development
PostProcessingRunMixin Class Reference
Inheritance diagram for PostProcessingRunMixin:
EmptyRun BrowseTFileOnTerminateRunMixin ClusterFilterValidationRun SegmentPairCreationValidationRun TrackingValidationRun CombinedSVDTrackingValidation CombinedSVDTrackingValidationBkg SVDHoughTrackingValidation SVDHoughTrackingValidationBkg Standalone VXDTF2TrackingValidation VXDTF2TrackingValidationBkg CDCAutomaton CDCAutomaton CDCCR CDCCombined CDCCombined CDCFull CDCFull CDCLegendre CDCLegendre CosmicsAxialHough CosmicsHough Cosmics InvertedFullBkg Full FullBkg fullTrackingValidation_plusECL Full Muon CKFBkg toCDCCKFValidationBkg toCDCfromEclCKF toCDCfromEclCKF

Public Member Functions

 create_argument_parser (self, **kwds)
 
 run (self, path)
 
 postprocess (self)
 
 name (self)
 
 configure_and_execute_from_commandline (self)
 
 execute (self)
 
 configure_from_commandline (self)
 
 configure (self, arguments)
 
 create_path (self)
 
 adjust_path (self, path)
 

Static Public Attributes

bool postprocess_only = False
 By default, browse the output TFile too.
 
str description = "Empty execution of basf2"
 Description of the run setup to be displayed on command line.
 

Detailed Description

Post-process the basf2 job output

Definition at line 25 of file mixins.py.

Member Function Documentation

◆ adjust_path()

adjust_path ( self,
path )
inherited
Hook that gives the opportunity to check the path for consistency before processing it

Reimplemented in VXDTF2TrackingValidation, and VXDTF2TrackingValidationBkg.

Definition at line 94 of file minimal.py.

94 def adjust_path(self, path):
95 """Hook that gives the opportunity to check the path for consistency before processing it"""
96
97# Minimal run stub defining some general parameters
98
99

◆ configure()

configure ( self,
arguments )
inherited
Save the command-line arguments as key-value pairs

Reimplemented in ReadOrGenerateEventsRun.

Definition at line 73 of file minimal.py.

73 def configure(self, arguments):
74 """Save the command-line arguments as key-value pairs"""
75 # Simply translate the arguments that have
76 # the same name as valid instance arguments
77 for (key, value) in list(vars(arguments).items()):
78 if value is None:
79 continue
80 if hasattr(self, key):
81 get_logger().info("Setting %s to %s", key, value)
82 setattr(self, key, value)
83

◆ configure_and_execute_from_commandline()

configure_and_execute_from_commandline ( self)
inherited
Configure basf2 job script from command-line arguments then run it

Definition at line 45 of file minimal.py.

45 def configure_and_execute_from_commandline(self):
46 """Configure basf2 job script from command-line arguments then run it"""
47 self.configure_from_commandline()
48 self.execute()
49

◆ configure_from_commandline()

configure_from_commandline ( self)
inherited
Convert the command-line arguments to a basf2 job script

Definition at line 67 of file minimal.py.

67 def configure_from_commandline(self):
68 """Convert the command-line arguments to a basf2 job script"""
69 argument_parser = self.create_argument_parser()
70 arguments = argument_parser.parse_args()
71 self.configure(arguments)
72

◆ create_argument_parser()

create_argument_parser ( self,
** kwds )
Parse the command-line post-processing arguments

Reimplemented from EmptyRun.

Reimplemented in ClusterFilterValidationRun, SegmentPairCreationValidationRun, BrowseTFileOnTerminateRunMixin, and TrackingValidationRun.

Definition at line 31 of file mixins.py.

31 def create_argument_parser(self, **kwds):
32 """Parse the command-line post-processing arguments"""
33 argument_parser = super().create_argument_parser(**kwds)
34 postprocess_argument_group = argument_parser.add_argument_group("Postprocessing arguments")
35 postprocess_argument_group.add_argument(
36 '-po',
37 '--postprocess-only',
38 action='store_true',
39 default=self.postprocess_only,
40 dest='postprocess_only',
41 help='Only run the post processing of this run.',)
42
43 return argument_parser
44

◆ create_path()

◆ execute()

execute ( self)
inherited
Create the basf2 path then run the job

Reimplemented in ReadOrGenerateEventsRun.

Definition at line 50 of file minimal.py.

50 def execute(self):
51 """Create the basf2 path then run the job"""
52 # Create path and run #
53
54 path = self.create_path()
55 self.adjust_path(path)
56 self.run(path)
57

◆ name()

name ( self)
inherited
provide name of this object

Definition at line 41 of file minimal.py.

41 def name(self):
42 """provide name of this object"""
43 return self.__class__.__name__
44

◆ postprocess()

postprocess ( self)
By default, do nothing. (may be overridden)

Reimplemented in BrowseTFileOnTerminateRunMixin.

Definition at line 52 of file mixins.py.

52 def postprocess(self):
53 """By default, do nothing. (may be overridden)"""
54
55

◆ run()

run ( self,
path )
Post-process the basf2 job output

Reimplemented from EmptyRun.

Definition at line 45 of file mixins.py.

45 def run(self, path):
46 """Post-process the basf2 job output"""
47 if not self.postprocess_only:
48 super().run(path)
49
50 self.postprocess()
51

Member Data Documentation

◆ description

str description = "Empty execution of basf2"
staticinherited

Description of the run setup to be displayed on command line.

Definition at line 33 of file minimal.py.

◆ postprocess_only

bool postprocess_only = False
static

By default, browse the output TFile too.

Post-process the basf2 job output

Definition at line 29 of file mixins.py.


The documentation for this class was generated from the following file: