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 12 of file DTTtrigWorkflow.py.

Constructor & Destructor Documentation

◆ __init__()

def DTTtrigWorkflow.DTttrigWorkflow.__init__ (   self,
  options 
)

Definition at line 14 of file DTTtrigWorkflow.py.

14  def __init__(self, options):
15  # call parent constructor
16  super( DTttrigWorkflow, self ).__init__( options )
17 
18  self.outpath_command_tag = "TTrigCalibration"
19  # Dict to map workflow modes to output file name
20  output_file_dict ={ "timeboxes" : "DTTimeBoxes.root",
21  "residuals" : 'residuals.root',
22  "validation" : "DQM.root"
23  }
24  # Dict to map workflow modes to output folders in main path
25  self.outpath_workflow_mode_dict = {
26  "timeboxes" : "TimeBoxes",
27  "residuals" : "Residuals",
28  "validation" : "TtrigValidation"
29  }
30  # Dict to map workflow modes to database file name
31  self.output_db_dict = { "timeboxes" : {
32  "write": "ttrig_timeboxes_uncorrected_"
33  + self.tag
34  + ".db",
35  "correction": "ttrig_timeboxes_"
36  + self.tag
37  + ".db"
38  },
39  "residuals" : "ttrig_residuals_" + self.tag + ".db"}
40  self.output_file = output_file_dict[self.options.workflow_mode]
41  self.output_files = [self.output_file]
42 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ add_parser_options()

def DTTtrigWorkflow.DTttrigWorkflow.add_parser_options (   cls,
  subparser_container 
)

CLI creation #.

Definition at line 268 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().

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

◆ get_output_db()

def DTTtrigWorkflow.DTttrigWorkflow.get_output_db (   self,
  workflow_mode,
  command 
)

Definition at line 56 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().

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

◆ prepare_residuals_all()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_all (   self)

Definition at line 214 of file DTTtrigWorkflow.py.

References DTT0WireWorkflow.DTT0WireWorkflow.all_commands, and DTTtrigWorkflow.DTttrigWorkflow.all_commands.

214  def prepare_residuals_all(self):
215  # individual prepare functions for all tasks will be called in
216  # main implementation of all
217  self.all_commands=["submit", "check", "correction", "dump"]
218 

◆ prepare_residuals_check()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_check (   self)

Definition at line 164 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.load_options_command().

164  def prepare_residuals_check(self):
165  self.load_options_command("submit")
166 

◆ prepare_residuals_correction()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction (   self)

Definition at line 167 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(), DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, DTT0WireWorkflow.DTT0WireWorkflow.output_file, DTTtrigWorkflow.DTttrigWorkflow.output_file, DTWorkflow.DTWorkflow.prepare_common_write(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, DTWorkflow.DTWorkflow.result_path(), str, and DTWorkflow.DTWorkflow.write_pset_file().

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

◆ prepare_residuals_dump()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_dump (   self)

Definition at line 197 of file DTTtrigWorkflow.py.

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

197  def prepare_residuals_dump(self):
198  self.pset_name = 'dumpDBToFile_ResidCorr_cfg.py'
199  self.pset_template = 'CalibMuon.DTCalibration.dumpDBToFile_ttrig_cfg'
200  if self.options.input_dumpDB:
201  dbpath = os.path.abspath(self.options.input_dumpDB)
202  else:
203  try:
204  test = self.result_path
205  self.load_options_command("write")
206  except:
207  pass
208  dbpath = os.path.abspath( os.path.join(self.result_path,
209  self.get_output_db("residuals",
210  "write")))
211  self.prepare_common_dump(dbpath)
212  self.write_pset_file()
213 

◆ prepare_residuals_submit()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_submit (   self)

prepare functions for residuals #

Definition at line 146 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.add_local_calib_db(), nano_mu_digi_cff.float, tools.loadCmsProcess(), DTCalibrationWorker.DTCalibrationWorker.options, DTWorkflow.DTWorkflow.options, DTT0WireWorkflow.DTT0WireWorkflow.output_file, DTTtrigWorkflow.DTttrigWorkflow.output_file, DTWorkflow.DTWorkflow.prepare_common_submit(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTT0WireWorkflow.DTT0WireWorkflow.pset_name, DTTtrigWorkflow.DTttrigWorkflow.pset_name, DTT0WireWorkflow.DTT0WireWorkflow.pset_template, DTTtrigWorkflow.DTttrigWorkflow.pset_template, str, and DTWorkflow.DTWorkflow.write_pset_file().

146  def prepare_residuals_submit(self):
147  self.pset_name = 'dtResidualCalibration_cfg.py'
148  self.pset_template = 'CalibMuon.DTCalibration.dtResidualCalibration_cfg'
149  if self.options.datasettype == "Cosmics":
150  self.pset_template = 'CalibMuon.DTCalibration.dtResidualCalibration_cosmics_cfg'
151  self.process = tools.loadCmsProcess(self.pset_template)
152  #~ self.process.GlobalTag.globaltag = cms.string(self.options.globaltag)
153  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
154  self.process.dtResidualCalibration.rootFileName = self.output_file
155  self.prepare_common_submit()
156  if self.options.fromMuons:
157  self.process.dtResidualCalibration.Muons = cms.InputTag("muons")
158  if self.options.histoRange:
159  self.process.dtResidualCalibration.histogramRange = cms.double(float(self.options.histoRange))
160  if self.options.inputCalibDB:
161  self.add_local_calib_db()
162  self.write_pset_file()
163 
def loadCmsProcess(psetPath)
Definition: tools.py:54
#define str(s)

◆ prepare_timeboxes_all()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_all (   self)

Definition at line 138 of file DTTtrigWorkflow.py.

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

◆ prepare_timeboxes_check()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_check (   self)

Definition at line 80 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.load_options_command().

80  def prepare_timeboxes_check(self):
81  self.load_options_command("submit")
82 

◆ prepare_timeboxes_correction()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_correction (   self)

Definition at line 99 of file DTTtrigWorkflow.py.

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

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

◆ prepare_timeboxes_dump()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_dump (   self)

Definition at line 121 of file DTTtrigWorkflow.py.

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

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

◆ prepare_timeboxes_submit()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_submit (   self)

Prepare functions for timeboxes #.

Definition at line 64 of file DTTtrigWorkflow.py.

64  def prepare_timeboxes_submit(self):
65  self.pset_name = 'dtTTrigCalibration_cfg.py'
66  self.pset_template = 'CalibMuon.DTCalibration.dtTTrigCalibration_cfg'
67  if self.options.datasettype == "Cosmics":
68  self.pset_template = 'CalibMuon.DTCalibration.dtTTrigCalibration_cosmics_cfg'
69  log.debug('Using pset template ' + self.pset_template)
70  self.process = tools.loadCmsProcess(self.pset_template)
71  self.process.GlobalTag.globaltag = self.options.globaltag
72  self.process.dtTTrigCalibration.rootFileName = self.output_file
73  self.process.dtTTrigCalibration.digiLabel = self.digilabel
74 
75  if self.options.inputDBTag:
76  self.add_local_custom_db()
77  self.prepare_common_submit()
78  self.write_pset_file()
79 
def loadCmsProcess(psetPath)
Definition: tools.py:54

◆ prepare_timeboxes_write()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_timeboxes_write (   self)

Definition at line 83 of file DTTtrigWorkflow.py.

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

◆ prepare_validation_all()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_all (   self)

Definition at line 259 of file DTTtrigWorkflow.py.

259  def prepare_validation_all(self):
260  # individual prepare functions for all tasks will be called in
261  # main implementation of all
262  self.all_commands=["submit", "check","write"]
263 

◆ prepare_validation_check()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_check (   self)

Definition at line 237 of file DTTtrigWorkflow.py.

References DTWorkflow.DTWorkflow.load_options_command().

237  def prepare_validation_check(self):
238  self.load_options_command("submit")
239 

◆ prepare_validation_submit()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_submit (   self)

prepare functions for validation #

Definition at line 223 of file DTTtrigWorkflow.py.

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

223  def prepare_validation_submit(self):
224  self.pset_name = 'dtCalibValidation_cfg.py'
225  self.pset_template = 'CalibMuon.DTCalibration.dtCalibValidation_cfg'
226  if self.options.datasettype == "Cosmics":
227  self.pset_template = 'CalibMuon.DTCalibration.dtCalibValidation_cosmics_cfg'
228  if self.options.fromMuons:
229  self.pset_template = 'CalibMuon.DTCalibration.dtCalibValidationFromMuons_cfg'
230  self.process = tools.loadCmsProcess(self.pset_template)
231  self.process.GlobalTag.globaltag = cms.string(str(self.options.globaltag))
232  self.prepare_common_submit()
233  if self.options.inputCalibDB:
234  self.add_local_calib_db()
235  self.write_pset_file()
236 
def loadCmsProcess(psetPath)
Definition: tools.py:54
#define str(s)

◆ prepare_validation_write()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_validation_write (   self)

Definition at line 240 of file DTTtrigWorkflow.py.

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

240  def prepare_validation_write(self):
241  self.pset_name = 'dtDQMClient_cfg.py'
242  self.pset_template = 'CalibMuon.DTCalibration.dtDQMClient_cfg'
243  self.process = tools.loadCmsProcess(self.pset_template)
244  self.prepare_common_write(do_hadd = False)
245  dqm_files = glob.glob(os.path.join( self.local_path,
246  "unmerged_results",
247  "DQM_*.root"))
248  dqm_files[:] = ["file://"+txt for txt in dqm_files]
249  self.process.source.fileNames = dqm_files
250  self.process.dqmSaver.dirName = os.path.abspath(self.result_path)
251  self.process.dqmSaver.workflow = str(self.options.datasetpath)
252  if self.process.DQMStore.collateHistograms == True:
253  self.process.dqmSaver.forceRunNumber = self.options.run
254  self.write_pset_file()
255 
def loadCmsProcess(psetPath)
Definition: tools.py:54
#define str(s)

◆ prepare_workflow()

def DTTtrigWorkflow.DTttrigWorkflow.prepare_workflow (   self)
Generalized function to prepare workflow dependent on workflow mode

Definition at line 43 of file DTTtrigWorkflow.py.

References __class__< T >.__class__(), DTCalibrationWorker.DTCalibrationWorker.options, and DTWorkflow.DTWorkflow.options.

Referenced by DTWorkflow.DTWorkflow.run().

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

◆ summary()

def DTTtrigWorkflow.DTttrigWorkflow.summary (   self)

Definition at line 256 of file DTTtrigWorkflow.py.

256  def summary(self):
257  pass
258 

Member Data Documentation

◆ all_commands

◆ outpath_command_tag

DTTtrigWorkflow.DTttrigWorkflow.outpath_command_tag

◆ outpath_workflow_mode_dict

DTTtrigWorkflow.DTttrigWorkflow.outpath_workflow_mode_dict

Definition at line 25 of file DTTtrigWorkflow.py.

Referenced by DTWorkflow.DTWorkflow.outpath_workflow_mode_tag().

◆ output_db_dict

DTTtrigWorkflow.DTttrigWorkflow.output_db_dict

Definition at line 31 of file DTTtrigWorkflow.py.

Referenced by DTTtrigWorkflow.DTttrigWorkflow.get_output_db().

◆ output_db_file

DTTtrigWorkflow.DTttrigWorkflow.output_db_file

Definition at line 84 of file DTTtrigWorkflow.py.

◆ output_file

◆ output_files

DTTtrigWorkflow.DTttrigWorkflow.output_files

Definition at line 41 of file DTTtrigWorkflow.py.

◆ process

DTTtrigWorkflow.DTttrigWorkflow.process

Definition at line 70 of file DTTtrigWorkflow.py.

Referenced by adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.__init__(), 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.addCommon(), ConfigBuilder.ConfigBuilder.addConditions(), ConfigBuilder.ConfigBuilder.addCustomise(), ConfigBuilder.ConfigBuilder.addMaxEvents(), ConfigBuilder.ConfigBuilder.addOutput(), ConfigBuilder.ConfigBuilder.addSource(), ConfigBuilder.ConfigBuilder.addStandardSequences(), ConfigBuilder.ConfigBuilder.build_production_info(), ConfigBuilder.ConfigBuilder.completeInputCommand(), adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.convertModuleToMiniAODInput(), ConfigBuilder.ConfigBuilder.finalizeFastSimHLT(), ConfigBuilder.ConfigBuilder.load(), runTauIdMVA.TauIDEmbedder.load_againstElectronMVA6(), ConfigBuilder.ConfigBuilder.loadAndRemember(), runTauIdMVA.TauIDEmbedder.loadMVA_WPs_run2_2017(), ConfigBuilder.ConfigBuilder.loadPhase2GTMenu(), ConfigBuilder.ConfigBuilder.prepare(), ConfigBuilder.ConfigBuilder.prepare_DIGI(), ConfigBuilder.ConfigBuilder.prepare_DQM(), ConfigBuilder.ConfigBuilder.prepare_GEN(), ConfigBuilder.ConfigBuilder.prepare_HLT(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_meantimer_write(), ConfigBuilder.ConfigBuilder.prepare_PATFILTER(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_correction(), DTTtrigWorkflow.DTttrigWorkflow.prepare_residuals_submit(), DTVdriftWorkflow.DTvdriftWorkflow.prepare_segment_write(), ConfigBuilder.ConfigBuilder.prepare_SKIM(), 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(), runTauIdMVA.TauIDEmbedder.runTauID(), ConfigBuilder.ConfigBuilder.scheduleSequence(), runTauIdMVA.TauIDEmbedder.tauIDMVAinputs(), and DTWorkflow.DTWorkflow.write_pset_file().

◆ pset_name

◆ pset_template