5 import FWCore.ParameterSet.Config
as cms
6 from DTWorkflow
import DTWorkflow
8 log = logging.getLogger(__name__)
11 """ This class creates and performce / submits vdrift workflow jobs"""
14 super(DTT0WireWorkflow, self).
__init__(options)
22 """ Generalized function to prepare workflow dependent on workflow mode"""
23 function_name =
"prepare_" + self.options.workflow_mode +
"_" + self.options.command
26 fill_function = getattr(self, function_name)
27 except AttributeError:
28 errmsg =
"Class `{}` does not implement `{}`"
29 raise NotImplementedError(errmsg.format(my_cls.__class__.__name__,
31 log.debug(
"Preparing workflow with function %s" % function_name)
40 self.process.GlobalTag.globaltag = self.options.globaltag
41 self.process.dtT0WireCalibration.rootFileName = self.
output_file
60 vdrift_parser = subparser_container.add_parser(
"T0Wire",
67 vdrift_subparsers = vdrift_parser.add_subparsers( dest=
"workflow_mode",
68 help=
"Possible workflow modes",)
70 vdrift_segment_subparser = vdrift_subparsers.add_parser(
"all",
76 vdrift_segment_subparsers = vdrift_segment_subparser.add_subparsers( dest=
"command",
77 help=
"Possible commands for all")
78 vdrift_segment_submit_parser = vdrift_segment_subparsers.add_parser(
80 parents=[super(DTT0WireWorkflow,cls).get_common_options_parser(),
81 super(DTT0WireWorkflow,cls).get_submission_options_parser(),
82 super(DTT0WireWorkflow,cls).get_local_input_db_options_parser(),
83 super(DTT0WireWorkflow,cls).get_input_db_options_parser()],
84 help =
"Run job locally as GRID submission is not supported for T0 Calibration")
86 vdrift_segment_all_parser = vdrift_segment_subparsers.add_parser(
88 parents=[super(DTT0WireWorkflow,cls).get_common_options_parser(),
89 super(DTT0WireWorkflow,cls).get_submission_options_parser(),
90 super(DTT0WireWorkflow,cls).get_input_db_options_parser(),
91 super(DTT0WireWorkflow,cls).get_local_input_db_options_parser(),
93 help =
"Perform all steps: submit, check in this order")
def add_parser_options
CLI creation #.
outpath_workflow_mode_dict
def prepare_common_submit