CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
DTTtrigWorkflow.DTttrigWorkflow Class Reference
Inheritance diagram for DTTtrigWorkflow.DTttrigWorkflow:
DTWorkflow.DTWorkflow CLIHelper.CLIHelper CrabHelper.CrabHelper

Public Member Functions

def __init__ (self, options)
 
def add_parser_options (cls, subparser_container)
 CLI creation #. More...
 
def get_output_db (self, workflow_mode, command)
 
def prepare_residuals_all (self)
 
def prepare_residuals_check (self)
 
def prepare_residuals_correction (self)
 
def prepare_residuals_dump (self)
 
def prepare_residuals_submit (self)
 prepare functions for residuals # More...
 
def prepare_timeboxes_all (self)
 
def prepare_timeboxes_check (self)
 
def prepare_timeboxes_correction (self)
 
def prepare_timeboxes_dump (self)
 
def prepare_timeboxes_submit (self)
 Prepare functions for timeboxes #. More...
 
def prepare_timeboxes_write (self)
 
def prepare_validation_all (self)
 
def prepare_validation_check (self)
 
def prepare_validation_submit (self)
 prepare functions for validation # More...
 
def prepare_validation_write (self)
 
def prepare_workflow (self)
 
def summary (self)
 
- Public Member Functions inherited from DTWorkflow.DTWorkflow
def __init__ (self, options)
 
def add_local_calib_db (self, local=False)
 
def add_local_custom_db (self)
 
def add_local_t0_db (self, local=False)
 
def add_local_vdrift_db (self, local=False)
 
def add_preselection (self)
 
def add_raw_option (self)
 
def all (self)
 
def check (self)
 
def check_missing_options (self, requirements_dict)
 
def correction (self)
 
def dump (self)
 
def dump_options (self)
 
def get_config_name (self, command="")
 
def get_output_files (self, crabtask, output_path)
 
def load_options (self, config_file_path)
 
def load_options_command (self, command)
 
def local_path (self)
 
def outpath_workflow_mode_tag (self)
 
def prepare_common_dump (self, db_path)
 
def prepare_common_submit (self)
 
def prepare_common_write (self, do_hadd=True)
 
def prepare_workflow (self)
 
def pset_path (self)
 
def pset_template_base_bath (self)
 
def remote_out_path (self)
 
def result_path (self)
 
def run (self)
 
def runCMSSWtask (self, pset_path="")
 
def submit (self)
 
def tag (self)
 
def user (self)
 
def write (self)
 
def write_pset_file (self)
 
- Public Member Functions inherited from CLIHelper.CLIHelper
def add_parser_options (cls, parser)
 
def fill_required_options_dict (self)
 
def fill_required_options_prepare_dict (self)
 
def get_check_options_parser (cls)
 
def get_common_options_parser (cls)
 
def get_dump_options_parser (cls)
 
def get_input_db_options_parser (cls)
 
def get_local_input_db_options_parser (cls)
 
def get_submission_options_parser (cls)
 
def get_write_options_parser (cls)
 
- Public Member Functions inherited from CrabHelper.CrabHelper
def __init__ (self)
 
def cert_info (self)
 
def check_crabtask (self)
 
def crab (self)
 
def crab_config_filename (self)
 
def crab_config_filepath (self)
 
def crab_taskname (self)
 
def create_crab_config (self)
 
def fill_options_from_crab_config (self)
 
def submit_crab_task (self)
 
def voms_proxy_create (self, passphrase=None)
 
def voms_proxy_time_left (self)
 
def write_crabConfig (self)
 

Public Attributes

 all_commands
 
 outpath_command_tag
 
 outpath_workflow_mode_dict
 
 output_db_dict
 
 output_db_file
 
 output_file
 
 output_files
 
 process
 
 pset_name
 
 pset_template
 
- Public Attributes inherited from DTWorkflow.DTWorkflow
 digilabel
 
 files_reveived
 
 input_files
 
 options
 
 outpath_command_tag
 
 output_files
 
 process
 
 pset_name
 
 required_options_dict
 
 required_options_prepare_dict
 
 run_all_command
 
- Public Attributes inherited from CrabHelper.CrabHelper
 crab_config
 
 crabFunctions
 

Additional Inherited Members

- Static Public Member Functions inherited from DTWorkflow.DTWorkflow
def addPoolDBESSource (process, moduleName, record, tag, connect='sqlite_file:', label='')
 

Detailed Description

This class creates and performce / submits ttrig workflow jobs

Definition at line 11 of file DTTtrigWorkflow.py.

Constructor & Destructor Documentation

def DTTtrigWorkflow.DTttrigWorkflow.__init__ (   self,
  options 
)

Definition at line 13 of file DTTtrigWorkflow.py.

13  def __init__(self, options):
14  # call parent constructor
15  super( DTttrigWorkflow, self ).__init__( options )
16 
17  self.outpath_command_tag = "TTrigCalibration"
18  # Dict to map workflow modes to output file name
19  output_file_dict ={ "timeboxes" : "DTTimeBoxes.root",
20  "residuals" : 'residuals.root',
21  "validation" : "DQM.root"
22  }
23  # Dict to map workflow modes to output folders in main path
25  "timeboxes" : "TimeBoxes",
26  "residuals" : "Residuals",
27  "validation" : "TtrigValidation"
28  }
29  # Dict to map workflow modes to database file name
30  self.output_db_dict = { "timeboxes" : {
31  "write": "ttrig_timeboxes_uncorrected_"
32  + self.tag
33  + ".db",
34  "correction": "ttrig_timeboxes_"
35  + self.tag
36  + ".db"
37  },
38  "residuals" : "ttrig_residuals_" + self.tag + ".db"}
39  self.output_file = output_file_dict[self.options.workflow_mode]
40  self.output_files = [self.output_file]
41 

Member Function Documentation

def DTTtrigWorkflow.DTttrigWorkflow.add_parser_options (   cls,
  subparser_container 
)

CLI creation #.

Definition at line 262 of file DTTtrigWorkflow.py.

References CLIHelper.CLIHelper.get_check_options_parser(), CLIHelper.CLIHelper.get_common_options_parser(), CLIHelper.CLIHelper.get_dump_options_parser(), CLIHelper.CLIHelper.get_input_db_options_parser(), CLIHelper.CLIHelper.get_local_input_db_options_parser(), CLIHelper.CLIHelper.get_submission_options_parser(), and CLIHelper.CLIHelper.get_write_options_parser().

262  def add_parser_options(cls, subparser_container):
263  ttrig_parser = subparser_container.add_parser( "ttrig",
264  #parents=[mutual_parent_parser, common_parent_parser],
265  help = "" ) # What does ttrig
266 
267 
268  ################################################################
269  # Sub parser options for workflow modes #
270  ################################################################
271  ttrig_subparsers = ttrig_parser.add_subparsers( dest="workflow_mode",
272  help="Possible workflow modes",)
273  ## Add all workflow modes for ttrig
274  ttrig_timeboxes_subparser = ttrig_subparsers.add_parser( "timeboxes",
275  help = "" )
276  ttrig_residuals_subparser = ttrig_subparsers.add_parser( "residuals",
277  help = "" )
278  ttrig_validation_subparser = ttrig_subparsers.add_parser( "validation",
279  help = "" )
280  ################################################################
281  # Sub parser options for workflow mode timeboxes #
282  ################################################################
283  ttrig_timeboxes_subparsers = ttrig_timeboxes_subparser.add_subparsers( dest="command",
284  help="Possible commands for timeboxes")
285  ttrig_timeboxes_submit_parser = ttrig_timeboxes_subparsers.add_parser(
286  "submit",
287  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
288  super(DTttrigWorkflow,cls).get_submission_options_parser(),
289  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
290  help = "Submit job to the GRID via crab3")
291 
292  ttrig_timeboxes_check_parser = ttrig_timeboxes_subparsers.add_parser(
293  "check",
294  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
295  super(DTttrigWorkflow,cls).get_check_options_parser(),],
296  help = "Check status of submitted jobs")
297 
298  ttrig_timeboxes_write_parser = ttrig_timeboxes_subparsers.add_parser(
299  "write",
300  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
301  super(DTttrigWorkflow,cls).get_write_options_parser()
302  ],
303  help = "Write result from root output to text file")
304 
305  ttrig_timeboxes_correction_parser = ttrig_timeboxes_subparsers.add_parser(
306  "correction",
307  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
308  super(DTttrigWorkflow,cls).get_local_input_db_options_parser()
309  ],
310  help = "Perform correction on uncorrected ttrig database")
311 
312  ttrig_timeboxes_dump_parser = ttrig_timeboxes_subparsers.add_parser(
313  "dump",
314  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
315  super(DTttrigWorkflow,cls).get_dump_options_parser()],
316  help = "Dump database to text file")
317 
318  ttrig_timeboxes_all_parser = ttrig_timeboxes_subparsers.add_parser(
319  "all",
320  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
321  super(DTttrigWorkflow,cls).get_submission_options_parser(),
322  super(DTttrigWorkflow,cls).get_check_options_parser(),
323  super(DTttrigWorkflow,cls).get_input_db_options_parser(),
324  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
325  super(DTttrigWorkflow,cls).get_write_options_parser(),
326  super(DTttrigWorkflow,cls).get_dump_options_parser()
327  ],
328  help = "Perform all steps: submit, check, write, correction,"\
329  "dump in this order")
330 
331  ################################################################
332  # Sub parser options for workflow mode residuals #
333  ################################################################
334  ttrig_residuals_subparsers = ttrig_residuals_subparser.add_subparsers( dest="command",
335  help="Possible commands for residuals")
336  ttrig_residuals_submit_parser = ttrig_residuals_subparsers.add_parser(
337  "submit",
338  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
339  super(DTttrigWorkflow,cls).get_submission_options_parser(),
340  super(DTttrigWorkflow,cls).get_check_options_parser(),
341  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
342  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
343  help = "Submit job to the GRID via crab3")
344 
345  ttrig_residuals_check_parser = ttrig_residuals_subparsers.add_parser(
346  "check",
347  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
348  super(DTttrigWorkflow,cls).get_check_options_parser(),],
349  help = "Check status of submitted jobs")
350 
351  ttrig_residuals_correct_parser = ttrig_residuals_subparsers.add_parser(
352  "correction",
353  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
354  super(DTttrigWorkflow,cls).get_write_options_parser(),
355  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
356  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
357  help = "Perform residual corrections")
358  ttrig_residuals_correct_parser.add_argument("--globaltag",
359  help="Alternative globalTag. Otherwise the gt for sunmission is used")
360 
361  ttrig_residuals_dump_parser = ttrig_residuals_subparsers.add_parser(
362  "dump",
363  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
364  super(DTttrigWorkflow,cls).get_dump_options_parser()],
365  help = "Dump database to text file")
366 
367  ttrig_residuals_all_parser = ttrig_residuals_subparsers.add_parser(
368  "all",
369  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
370  super(DTttrigWorkflow,cls).get_submission_options_parser(),
371  super(DTttrigWorkflow,cls).get_check_options_parser(),
372  super(DTttrigWorkflow,cls).get_write_options_parser(),
373  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
374  super(DTttrigWorkflow,cls).get_dump_options_parser(),
375  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
376  help = "Perform all steps: submit, check, correct, dump")
377 
378  ################################################################
379  # Sub parser options for workflow mode validation #
380  ################################################################
381  ttrig_validation_subparsers = ttrig_validation_subparser.add_subparsers( dest="command",
382  help="Possible commands for residuals")
383 
384  ttrig_validation_submit_parser = ttrig_validation_subparsers.add_parser(
385  "submit",
386  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
387  super(DTttrigWorkflow,cls).get_submission_options_parser(),
388  super(DTttrigWorkflow,cls).get_check_options_parser(),
389  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
390  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
391  help = "Submit job to the GRID via crab3")
392 
393 
394  ttrig_validation_check_parser = ttrig_validation_subparsers.add_parser(
395  "check",
396  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
397  super(DTttrigWorkflow,cls).get_check_options_parser(),],
398  help = "Check status of submitted jobs")
399 
400  ttrig_validation_write_parser = ttrig_validation_subparsers.add_parser(
401  "write",
402  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
403  super(DTttrigWorkflow,cls).get_write_options_parser()],
404  help = "Create summary for validation")
405 
406  ttrig_validation_all_parser = ttrig_validation_subparsers.add_parser(
407  "all",
408  parents=[super(DTttrigWorkflow,cls).get_common_options_parser(),
409  super(DTttrigWorkflow,cls).get_submission_options_parser(),
410  super(DTttrigWorkflow,cls).get_check_options_parser(),
411  super(DTttrigWorkflow,cls).get_write_options_parser(),
412  super(DTttrigWorkflow,cls).get_local_input_db_options_parser(),
413  super(DTttrigWorkflow,cls).get_input_db_options_parser()],
414  help = "Perform all steps: submit, check, summary")
415 
def get_common_options_parser(cls)
Definition: CLIHelper.py:5
def get_dump_options_parser(cls)
Definition: CLIHelper.py:133
def get_input_db_options_parser(cls)
Definition: CLIHelper.py:50
def get_local_input_db_options_parser(cls)
Definition: CLIHelper.py:65
def get_submission_options_parser(cls)
Definition: CLIHelper.py:79
def add_parser_options(cls, subparser_container)
CLI creation #.
def get_write_options_parser(cls)
Definition: CLIHelper.py:123
def get_check_options_parser(cls)
Definition: CLIHelper.py:111
def DTTtrigWorkflow.DTttrigWorkflow.get_output_db (   self,
  workflow_mode,
  command 
)

Definition at line 55 of file DTTtrigWorkflow.py.

References DTTtrigWorkflow.DTttrigWorkflow.output_db_dict.

Referenced by DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_dump(), DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_correction(), and DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_dump().

55  def get_output_db(self, workflow_mode, command):
56  output_db_file = self.output_db_dict[workflow_mode]
57  if isinstance(output_db_file, dict):
58  return output_db_file[command]
59  return output_db_file
def get_output_db(self, workflow_mode, command)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_all (   self)

Definition at line 211 of file DTTtrigWorkflow.py.

References DTTtrigWorkflow.DTttrigWorkflow.all_commands.

212  # individual prepare functions for all tasks will be called in
213  # main implementation of all
214  self.all_commands=["submit", "check", "correction", "dump"]
215 
def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_check (   self)

Definition at line 161 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.load_options_command().

162  self.load_options_command("submit")
163 
def load_options_command(self, command)
Definition: DTWorkflow.py:402
def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction (   self)

Definition at line 164 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.add_local_calib_db(), DTWorkflow.DTWorkflow.add_local_custom_db(), DTWorkflow.DTWorkflow.add_local_vdrift_db(), DTTtrigWorkflow.DTttrigWorkflow.get_output_db(), DTWorkflow.DTWorkflow.load_options_command(), tools.loadCmsProcess(), DTTtrigWorkflow.DTttrigWorkflow.output_file, DTWorkflow.DTWorkflow.prepare_common_write(), DTTtrigWorkflow.DTttrigWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), str, and DTWorkflow.DTWorkflow.write_pset_file().

165  self.pset_name = "dtTTrigResidualCorrection_cfg.py"
166  self.pset_template = 'CalibMuon.DTCalibration.dtTTrigResidualCorrection_cfg'
168  self.load_options_command("submit")
169  self.process.source.firstRun = cms.untracked.uint32(self.options.run)
170  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
171 
172  tag = self.prepare_common_write()
173  if self.options.inputT0DB:
174  log.warning("Option inputT0DB not supported for residual corrections")
175 
176  if self.options.inputDBTag:
177  self.add_local_custom_db(local=True)
178  if self.options.inputVDriftDB:
179  self.add_local_vdrift_db(local=True)
180  if self.options.inputCalibDB:
181  self.add_local_calib_db(local=True)
182  # Change DB label if running on Cosmics
183  if self.options.datasettype == "Cosmics":
184  self.process.dtTTrigResidualCorrection.dbLabel = 'cosmics'
185  self.process.dtTTrigResidualCorrection.correctionAlgoConfig.dbLabel = 'cosmics'
186  ttrig_ResidCorr_db = os.path.abspath( os.path.join(self.result_path,
187  self.get_output_db("residuals", "write")))
188  self.process.PoolDBOutputService.connect = 'sqlite_file:%s' % ttrig_ResidCorr_db
189  rootfile_path = os.path.abspath( os.path.join(self.result_path, self.output_file))
190  merged_file = os.path.join(self.result_path, self.output_file)
191  self.process.dtTTrigResidualCorrection.correctionAlgoConfig.residualsRootFile = merged_file
192  self.write_pset_file()
193 
def add_local_vdrift_db(self, local=False)
Definition: DTWorkflow.py:146
def add_local_calib_db(self, local=False)
Definition: DTWorkflow.py:161
def load_options_command(self, command)
Definition: DTWorkflow.py:402
def prepare_common_write(self, do_hadd=True)
Definition: DTWorkflow.py:210
def loadCmsProcess(psetPath)
Definition: tools.py:55
def get_output_db(self, workflow_mode, command)
def write_pset_file(self)
Definition: DTWorkflow.py:375
#define str(s)
def add_local_custom_db(self)
Definition: DTWorkflow.py:181
def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_dump (   self)

Definition at line 194 of file DTTtrigWorkflow.py.

References DTTtrigWorkflow.DTttrigWorkflow.get_output_db(), DTWorkflow.DTWorkflow.load_options_command(), DTWorkflow.DTWorkflow.prepare_common_dump(), DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), and DTWorkflow.DTWorkflow.write_pset_file().

195  self.pset_name = 'dumpDBToFile_ResidCorr_cfg.py'
196  self.pset_template = 'CalibMuon.DTCalibration.dumpDBToFile_ttrig_cfg'
197  if self.options.input_dumpDB:
198  dbpath = os.path.abspath(self.options.input_dumpDB)
199  else:
200  try:
201  test = self.result_path
202  self.load_options_command("write")
203  except:
204  pass
205  dbpath = os.path.abspath( os.path.join(self.result_path,
206  self.get_output_db("residuals",
207  "write")))
208  self.prepare_common_dump(dbpath)
209  self.write_pset_file()
210 
def load_options_command(self, command)
Definition: DTWorkflow.py:402
def prepare_common_dump(self, db_path)
Definition: DTWorkflow.py:227
def get_output_db(self, workflow_mode, command)
def write_pset_file(self)
Definition: DTWorkflow.py:375
def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_submit (   self)

prepare functions for residuals #

Definition at line 145 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.add_local_calib_db(), objects.autophobj.float, tools.loadCmsProcess(), DTTtrigWorkflow.DTttrigWorkflow.output_file, DTWorkflow.DTWorkflow.prepare_common_submit(), DTTtrigWorkflow.DTttrigWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_template, str, and DTWorkflow.DTWorkflow.write_pset_file().

146  self.pset_name = 'dtResidualCalibration_cfg.py'
147  self.pset_template = 'CalibMuon.DTCalibration.dtResidualCalibration_cfg'
148  if self.options.datasettype == "Cosmics":
149  self.pset_template = 'CalibMuon.DTCalibration.dtResidualCalibration_cosmics_cfg'
151  #~ self.process.GlobalTag.globaltag = cms.string(self.options.globaltag)
152  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
153  self.process.dtResidualCalibration.rootFileName = self.output_file
154  self.prepare_common_submit()
155  if self.options.histoRange:
156  self.process.dtResidualCalibration.histogramRange = cms.double(float(self.options.histoRange))
157  if self.options.inputCalibDB:
158  self.add_local_calib_db()
159  self.write_pset_file()
160 
def add_local_calib_db(self, local=False)
Definition: DTWorkflow.py:161
def prepare_residuals_submit(self)
prepare functions for residuals #
def loadCmsProcess(psetPath)
Definition: tools.py:55
def prepare_common_submit(self)
Definition: DTWorkflow.py:192
def write_pset_file(self)
Definition: DTWorkflow.py:375
#define str(s)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_all (   self)

Definition at line 137 of file DTTtrigWorkflow.py.

138  # individual prepare functions for all tasks will be called in
139  # main implementation of all
140  self.all_commands=["submit", "check", "write", "correction", "dump"]
141 
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_check (   self)

Definition at line 79 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.load_options_command().

80  self.load_options_command("submit")
81 
def load_options_command(self, command)
Definition: DTWorkflow.py:402
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_correction (   self)

Definition at line 98 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.add_local_calib_db(), DTTtrigWorkflow.DTttrigWorkflow.get_output_db(), DTWorkflow.DTWorkflow.load_options_command(), tools.loadCmsProcess(), DTTtrigWorkflow.DTttrigWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), str, tnp::TagProbePair.tag, cond::persistency::IOVProxyData.tag, cond::persistency::IOVEditorData.tag, MeasurementEstimator::OpaquePayload.tag, Inspector.Inspector.tag, Entry< T >.tag, BeamSpotFakeConditions.tag, MCPdgIndexFilter.tag, cond::Tag_t.tag, TrackListMerger::TkEDGetTokenss.tag, MuIsolatorResultProducer< BT >::DepositConf.tag, DQMNet::CoreObject.tag, personalPlayback.FrameworkJob.tag, DTWorkflow.DTWorkflow.tag(), and DTWorkflow.DTWorkflow.write_pset_file().

99  self.load_options_command("submit")
100  self.pset_name = 'dtTTrigCorrection_cfg.py'
101  self.pset_template = "CalibMuon.DTCalibration.dtTTrigCorrection_cfg"
102  ttrig_timeboxes_db = "ttrig_timeboxes_"+ self.tag + ".db"
103  ttrig_timeboxes_db = os.path.join(self.result_path,
104  self.get_output_db("timeboxes", "correction"))
106  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
107  self.process.source.firstRun = self.options.run
108  self.process.PoolDBOutputService.connect = 'sqlite_file:%s' % ttrig_timeboxes_db
109 
110  if not self.options.inputCalibDB:
111  self.options.inputCalibDB = os.path.join(self.result_path,
112  self.get_output_db( "timeboxes", "write" ) )
113  if self.options.inputVDriftDB:
114  log.warning("Options inputVDriftDB has no effect for timeboxes correction")
115  if self.options.inputT0DB:
116  log.warning("Options inputT0DB has no effect for timeboxes correction")
117  self.add_local_calib_db(local=True)
118  self.write_pset_file()
119 
def add_local_calib_db(self, local=False)
Definition: DTWorkflow.py:161
def load_options_command(self, command)
Definition: DTWorkflow.py:402
def loadCmsProcess(psetPath)
Definition: tools.py:55
def get_output_db(self, workflow_mode, command)
def write_pset_file(self)
Definition: DTWorkflow.py:375
#define str(s)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_dump (   self)

Definition at line 120 of file DTTtrigWorkflow.py.

References DTTtrigWorkflow.DTttrigWorkflow.get_output_db(), DTWorkflow.DTWorkflow.load_options_command(), DTWorkflow.DTWorkflow.prepare_common_dump(), DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), and DTWorkflow.DTWorkflow.write_pset_file().

121  self.pset_name = 'dumpDBToFile_ResidCorr_cfg.py'
122  self.pset_template = 'CalibMuon.DTCalibration.dumpDBToFile_ttrig_cfg'
123  if self.options.input_dumpDB:
124  try:
125  test = self.result_path
126  self.load_options_command("correction")
127  except:
128  pass
129  dbpath = os.path.abspath(self.options.input_dumpDB)
130  else:
131  dbpath = os.path.abspath( os.path.join(self.result_path,
132  self.get_output_db("timeboxes",
133  "correction")))
134  self.prepare_common_dump(dbpath)
135  self.write_pset_file()
136 
def load_options_command(self, command)
Definition: DTWorkflow.py:402
def prepare_common_dump(self, db_path)
Definition: DTWorkflow.py:227
def get_output_db(self, workflow_mode, command)
def write_pset_file(self)
Definition: DTWorkflow.py:375
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_submit (   self)

Prepare functions for timeboxes #.

Definition at line 63 of file DTTtrigWorkflow.py.

64  self.pset_name = 'dtTTrigCalibration_cfg.py'
65  self.pset_template = 'CalibMuon.DTCalibration.dtTTrigCalibration_cfg'
66  if self.options.datasettype == "Cosmics":
67  self.pset_template = 'CalibMuon.DTCalibration.dtTTrigCalibration_cosmics_cfg'
68  log.debug('Using pset template ' + self.pset_template)
70  self.process.GlobalTag.globaltag = self.options.globaltag
71  self.process.dtTTrigCalibration.rootFileName = self.output_file
72  self.process.dtTTrigCalibration.digiLabel = self.digilabel
73 
74  if self.options.inputDBTag:
75  self.add_local_custom_db()
77  self.write_pset_file()
78 
def prepare_timeboxes_submit(self)
Prepare functions for timeboxes #.
def loadCmsProcess(psetPath)
Definition: tools.py:55
def prepare_common_submit(self)
Definition: DTWorkflow.py:192
def write_pset_file(self)
Definition: DTWorkflow.py:375
def add_local_custom_db(self)
Definition: DTWorkflow.py:181
def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_write (   self)

Definition at line 82 of file DTTtrigWorkflow.py.

83  self.output_db_file = self.output_db_dict[self.options.workflow_mode]
84  if isinstance(self.output_db_dict[self.options.workflow_mode], dict):
85  self.output_db_file = self.output_db_file[self.options.command]
87  merged_file = os.path.join(self.result_path, self.output_file)
88  ttrig_uncorrected_db = os.path.join(self.result_path,
89  self.get_output_db("timeboxes", "write"))
90  self.pset_name = 'dtTTrigWriter_cfg.py'
91  self.pset_template = "CalibMuon.DTCalibration.dtTTrigWriter_cfg"
93  self.process.dtTTrigWriter.rootFileName = "file:///" + merged_file
94  self.process.PoolDBOutputService.connect = 'sqlite_file:%s' % ttrig_uncorrected_db
95  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
96  self.write_pset_file()
97 
def prepare_common_write(self, do_hadd=True)
Definition: DTWorkflow.py:210
def loadCmsProcess(psetPath)
Definition: tools.py:55
def get_output_db(self, workflow_mode, command)
def write_pset_file(self)
Definition: DTWorkflow.py:375
#define str(s)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_all (   self)

Definition at line 253 of file DTTtrigWorkflow.py.

254  # individual prepare functions for all tasks will be called in
255  # main implementation of all
256  self.all_commands=["submit", "check","write"]
257 
def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_check (   self)

Definition at line 231 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.load_options_command().

232  self.load_options_command("submit")
233 
def load_options_command(self, command)
Definition: DTWorkflow.py:402
def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_submit (   self)

prepare functions for validation #

Definition at line 220 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.add_local_calib_db(), tools.loadCmsProcess(), DTWorkflow.DTWorkflow.prepare_common_submit(), DTTtrigWorkflow.DTttrigWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_template, str, and DTWorkflow.DTWorkflow.write_pset_file().

221  self.pset_name = 'dtCalibValidation_cfg.py'
222  self.pset_template = 'CalibMuon.DTCalibration.dtCalibValidation_cfg'
223  if self.options.datasettype == "Cosmics":
224  self.pset_template = 'CalibMuon.DTCalibration.dtCalibValidation_cosmics_cfg'
226  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
227  self.prepare_common_submit()
228  self.add_local_calib_db()
229  self.write_pset_file()
230 
def add_local_calib_db(self, local=False)
Definition: DTWorkflow.py:161
def loadCmsProcess(psetPath)
Definition: tools.py:55
def prepare_common_submit(self)
Definition: DTWorkflow.py:192
def prepare_validation_submit(self)
prepare functions for validation #
def write_pset_file(self)
Definition: DTWorkflow.py:375
#define str(s)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_write (   self)

Definition at line 234 of file DTTtrigWorkflow.py.

References tools.loadCmsProcess(), DTWorkflow.DTWorkflow.local_path(), DTWorkflow.DTWorkflow.prepare_common_write(), DTTtrigWorkflow.DTttrigWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), str, and DTWorkflow.DTWorkflow.write_pset_file().

235  self.pset_name = 'dtDQMClient_cfg.py'
236  self.pset_template = 'CalibMuon.DTCalibration.dtDQMClient_cfg'
238  self.prepare_common_write(do_hadd = False)
239  dqm_files = glob.glob(os.path.join( self.local_path,
240  "unmerged_results",
241  "DQM_*.root"))
242  dqm_files[:] = ["file://"+txt for txt in dqm_files]
243  self.process.source.fileNames = dqm_files
244  self.process.dqmSaver.dirName = os.path.abspath(self.result_path)
245  self.process.dqmSaver.workflow = str(self.options.datasetpath)
246  if self.process.DQMStore.collateHistograms == True:
247  self.process.dqmSaver.forceRunNumber = self.options.run
248  self.write_pset_file()
249 
def prepare_common_write(self, do_hadd=True)
Definition: DTWorkflow.py:210
def loadCmsProcess(psetPath)
Definition: tools.py:55
def write_pset_file(self)
Definition: DTWorkflow.py:375
#define str(s)
def DTTtrigWorkflow.DTttrigWorkflow.prepare_workflow (   self)
Generalized function to prepare workflow dependent on workflow mode

Definition at line 42 of file DTTtrigWorkflow.py.

Referenced by DTWorkflow.DTWorkflow.run().

42  def prepare_workflow(self):
43  """ Generalized function to prepare workflow dependent on workflow mode"""
44  function_name = "prepare_" + self.options.workflow_mode + "_" + self.options.command
45  try:
46  fill_function = getattr(self, function_name)
47  except AttributeError:
48  errmsg = "Class `{}` does not implement `{}`"
49  raise NotImplementedError( errmsg.format(self.__class__.__name__,
50  function_name))
51  log.debug("Preparing workflow with function %s" % function_name)
52  # call chosen function
53  fill_function()
54 
def DTTtrigWorkflow.DTttrigWorkflow.summary (   self)

Definition at line 250 of file DTTtrigWorkflow.py.

250  def summary(self):
251  pass
252 

Member Data Documentation

DTTtrigWorkflow.DTttrigWorkflow.outpath_command_tag
DTTtrigWorkflow.DTttrigWorkflow.outpath_workflow_mode_dict

Definition at line 24 of file DTTtrigWorkflow.py.

Referenced by DTWorkflow.DTWorkflow.outpath_workflow_mode_tag().

DTTtrigWorkflow.DTttrigWorkflow.output_db_dict

Definition at line 30 of file DTTtrigWorkflow.py.

Referenced by DTTtrigWorkflow.DTttrigWorkflow.get_output_db().

DTTtrigWorkflow.DTttrigWorkflow.output_db_file

Definition at line 83 of file DTTtrigWorkflow.py.

DTTtrigWorkflow.DTttrigWorkflow.output_files

Definition at line 40 of file DTTtrigWorkflow.py.

DTTtrigWorkflow.DTttrigWorkflow.process

Definition at line 69 of file DTTtrigWorkflow.py.

Referenced by DTWorkflow.DTWorkflow.add_local_calib_db(), DTWorkflow.DTWorkflow.add_local_custom_db(), DTWorkflow.DTWorkflow.add_local_t0_db(), DTWorkflow.DTWorkflow.add_local_vdrift_db(), DTWorkflow.DTWorkflow.add_preselection(), DTWorkflow.DTWorkflow.add_raw_option(), ConfigBuilder.ConfigBuilder.addExtraStream(), ConfigBuilder.ConfigBuilder.completeInputCommand(), ConfigBuilder.ConfigBuilder.doNotInlineEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.dumpPython(), ConfigBuilder.ConfigBuilder.PrintAllModules.leave(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.open(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.outputEventContent(), ConfigBuilder.ConfigBuilder.prepare(), ConfigBuilder.ConfigBuilder.prepare_ALCA(), ConfigBuilder.ConfigBuilder.prepare_DQM(), ConfigBuilder.ConfigBuilder.prepare_HLT(), ConfigBuilder.ConfigBuilder.prepare_LHE(), ConfigBuilder.ConfigBuilder.prepare_PATFILTER(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_write(), DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_correction(), ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_submit(), DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_write(), runTauIdMVA.TauIDEmbedder.processDeepProducer(), ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), ConfigBuilder.ConfigBuilder.scheduleSequence(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.setProcess(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.setProperty().