Belle II Software development
EmptyRun Class Reference
Inheritance diagram for EmptyRun:
MinimalRun PostProcessingRunMixin RunMixin ReadOrGenerateEventsRun HarvestingRunMixin BrowseTFileOnTerminateRunMixin RootOutputRunMixin WireHitPreparerRunMixin StandardEventGenerationRun ReadOrGenerateTrackedEventsRun BackgroundClusterFilterTrainingRun FeasibleAxialSegmentPairFilterTrainingRun FeasibleSegmentPairFilterTrainingRun FeasibleSegmentRelationFilterTrainingRun FeasibleTrackRelationFilterTrainingRun RealisticAxialSegmentPairFilterTrainingRun RealisticSegmentPairFilterTrainingRun RealisticSegmentPairRelationFilterTrainingRun RealisticSegmentRelationFilterTrainingRun RealisticTrackRelationFilterTrainingRun SegmentTrackFilterTrainingRun TrackFilterTrainingRun HarvestingRun ClusterFilterValidationRun SegmentPairCreationValidationRun HarvestingRunMixin TrackingValidationRun TrainingRunMixin

Public Member Functions

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

Static Public Attributes

str description = "Empty execution of basf2"
 Description of the run setup to be displayed on command line.
 

Detailed Description

Configure for a bare-bones basf2 job

Definition at line 27 of file minimal.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
**  kwds 
)
Constructor

Reimplemented in CDCDisplayRun.

Definition at line 35 of file minimal.py.

35 def __init__(self, **kwds):
36 """Constructor"""
37 if kwds:
38 raise ValueError("Received_unknown unknown argument")
39

Member Function Documentation

◆ adjust_path()

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

Reimplemented in HarvestingRunMixin.

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()

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

Reimplemented in ReadOrGenerateEventsRun, and CDCDisplayRun.

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()

def configure_and_execute_from_commandline (   self)
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()

def configure_from_commandline (   self)
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()

def create_argument_parser (   self,
**  kwds 
)
Parse the command-line arguments to a basf2 job script

Reimplemented in HarvestingRunMixin, ReadOrGenerateEventsRun, MinimalRun, PostProcessingRunMixin, BrowseTFileOnTerminateRunMixin, RootOutputRunMixin, ReadOrGenerateTrackedEventsRun, TrackingValidationRun, CDCDisplayRun, TrainingRunMixin, WireHitPreparerRunMixin, ClusterFilterValidationRun, ElossHarvestingRun, LegendreBinningValidationRun, SegmentFitValidationRun, SegmentPairCreationValidationRun, SegmentPairFitValidationRun, and FacetFilterTrainingRun.

Definition at line 84 of file minimal.py.

84 def create_argument_parser(self, **kwds):
85 """Parse the command-line arguments to a basf2 job script"""
86 argument_parser = utilities.ArgumentParser(description=self.description, **kwds)
87 return argument_parser
88

◆ create_path()

◆ execute()

def execute (   self)
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()

def name (   self)
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

◆ run()

def run (   self,
  path 
)
Process the basf2 path

Reimplemented in PostProcessingRunMixin.

Definition at line 58 of file minimal.py.

58 def run(self, path):
59 """Process the basf2 path"""
60 # Run basf2 module path #
61
62 get_logger().info('Start processing')
63 basf2.print_path(path)
64 basf2.process(path)
65 get_logger().info("\n%s", str(basf2.statistics))
66

Member Data Documentation

◆ description

str description = "Empty execution of basf2"
static

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

Definition at line 33 of file minimal.py.


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